Skip to content

Commit

Permalink
Merge pull request #1 from xh2/patch-1
Browse files Browse the repository at this point in the history
Make docs clearer on `alpha` parameter in LDA model
  • Loading branch information
xh2 committed Jul 24, 2020
2 parents c0e0169 + 03c8bb9 commit 7791b74
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gensim/models/ldamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def __init__(self, corpus=None, num_topics=100, id2word=None,
Can be set to an 1D array of length equal to the number of expected topics that expresses
our a-priori belief for the each topics' probability.
Alternatively default prior selecting strategies can be employed by supplying a string:
* 'asymmetric': Uses a fixed normalized asymmetric prior of `1.0 / topicno`.
* 'symmetric': Default; uses a fixed symmetric prior per topic,
* 'asymmetric': Uses a fixed normalized asymmetric prior of `1.0 / (topic_index + sqrt(topic_no))`,
* 'auto': Learns an asymmetric prior from the corpus (not available if `distributed==True`).
eta : {float, np.array, str}, optional
A-priori belief on word probability, this can be:
Expand Down Expand Up @@ -536,7 +537,8 @@ def init_dir_prior(self, prior, name):
If `name` == 'alpha', then the prior can be:
* an 1D array of length equal to the number of expected topics,
* 'asymmetric': Uses a fixed normalized asymmetric prior of `1.0 / topicno`.
* 'symmetric': Uses a fixed symmetric prior per topic,
* 'asymmetric': Uses a fixed normalized asymmetric prior of `1.0 / (topic_index + sqrt(topic_no))`,
* 'auto': Learns an asymmetric prior from the corpus.
name : {'alpha', 'eta'}
Whether the `prior` is parameterized by the alpha vector (1 parameter per topic)
Expand Down

0 comments on commit 7791b74

Please sign in to comment.