Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LdaModel documentation update -remove claim that it accepts CSC matrix as input #2832

Merged
merged 2 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Changes
* No more wheels for x32 platforms (if you need x32 binaries, please build them yourself).
(__[menshikh-iv](https://github.com/menshikh-iv)__, [#6](https://github.com/RaRe-Technologies/gensim-wheels/pull/6))

### :books: Tutorial and doc improvements

* Clear up LdaModel documentation - remove claim that it accepts CSC matrix as input (PR [#2832](https://github.com/RaRe-Technologies/gensim/pull/2832), [@FyzHsn](https://github.com/FyzHsn))

## :warning: 3.8.x will be the last gensim version to support Py2.7. Starting with 4.0.0, gensim will only support Py3.5 and above

## 3.8.1, 2019-09-23
Expand Down
14 changes: 8 additions & 6 deletions gensim/models/ldamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ def __init__(self, corpus=None, num_topics=100, id2word=None,

Parameters
----------
corpus : {iterable of list of (int, float), scipy.sparse.csc}, optional
corpus : iterable of list of (int, float), optional
Stream of document vectors or sparse matrix of shape (`num_documents`, `num_terms`).
If you have a CSC in-memory matrix, you can convert it to a
streamed corpus with the help of gensim.matutils.Sparse2Corpus.
If not given, the model is left untrained (presumably because you want to call
:meth:`~gensim.models.ldamodel.LdaModel.update` manually).
num_topics : int, optional
Expand Down Expand Up @@ -626,7 +628,7 @@ def inference(self, chunk, collect_sstats=False):

Parameters
----------
chunk : {list of list of (int, float), scipy.sparse.csc}
chunk : list of list of (int, float)
The corpus chunk on which the inference step will be performed.
collect_sstats : bool, optional
If set to True, also collect (and return) sufficient statistics needed to update the model's topic-word
Expand Down Expand Up @@ -725,7 +727,7 @@ def do_estep(self, chunk, state=None):

Parameters
----------
chunk : {list of list of (int, float), scipy.sparse.csc}
chunk : list of list of (int, float)
The corpus chunk on which the inference step will be performed.
state : :class:`~gensim.models.ldamodel.LdaState`, optional
The state to be updated with the newly accumulated sufficient statistics. If none, the models
Expand Down Expand Up @@ -803,7 +805,7 @@ def log_perplexity(self, chunk, total_docs=None):

Parameters
----------
chunk : {list of list of (int, float), scipy.sparse.csc}
chunk : list of list of (int, float)
The corpus chunk on which the inference step will be performed.
total_docs : int, optional
Number of docs used for evaluation of the perplexity.
Expand Down Expand Up @@ -845,7 +847,7 @@ def update(self, corpus, chunksize=None, decay=None, offset=None,

Parameters
----------
corpus : {iterable of list of (int, float), scipy.sparse.csc}, optional
corpus : iterable of list of (int, float), optional
Stream of document vectors or sparse matrix of shape (`num_documents`, `num_terms`) used to update the
model.
chunksize : int, optional
Expand Down Expand Up @@ -1060,7 +1062,7 @@ def bound(self, corpus, gamma=None, subsample_ratio=1.0):

Parameters
----------
corpus : {iterable of list of (int, float), scipy.sparse.csc}, optional
corpus : iterable of list of (int, float), optional
Stream of document vectors or sparse matrix of shape (`num_documents`, `num_terms`) used to estimate the
variational bounds.
gamma : numpy.ndarray, optional
Expand Down