Reputation: 109
I am using LDA for Topic Modelling in Python.Gensim implementation of LDA allows us to set alpha as 'auto' as below:
alpha ({numpy.ndarray, str}, optional) –
’asymmetric’: Uses a fixed normalized asymmetric prior of 1.0 / topicno.
’auto’: Learns an asymmetric prior from the corpus (not available if distributed==True).
For LDA Mallet wrapper provided in Gensim there is no option of setting alpha as auto.
Is there way to learn alpha from the corpus in LDA Mallet?
Upvotes: 1
Views: 1016
Reputation: 1844
This is in the optimize_interval
argument. From the wrapper documentation:
optimize_interval (int, optional) – Optimize hyperparameters every optimize_interval iterations
So although alpha is originally set (or left as the default), if you set optimize_interval
then every n iterations, the alpha and beta will be optimised automatically.
Upvotes: 2