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

respect stochastic SVD params in LsiModel #75

Closed
piskvorky opened this issue Feb 12, 2012 · 1 comment
Closed

respect stochastic SVD params in LsiModel #75

piskvorky opened this issue Feb 12, 2012 · 1 comment
Labels
bug Issue described a bug difficulty medium Medium issue: required good gensim understanding & python skills

Comments

@piskvorky
Copy link
Owner

Currently, the extra_samples and power_iters parameters to LsiModel are only used in the multi-pass variant (=when onepass is False).

Pass them also to the one-pass variant, for consistency and greater flexibility.

Alternatively, mention explicitly in the docs that they are not used, to avoid confusion.

This issue was brought up by Brian Murphy at http://groups.google.com/group/gensim/browse_thread/thread/6de956d4300ab7da

@piskvorky
Copy link
Owner Author

Fix outline:

In file gensim/models/lsimodel.py, the internal calls to SVD are done from LsiModel objects via calls to Projection objects (found in the same file).

  • wherever there is an internal call to SVD (i.e. lines such as update = Projection(self.num_terms, self.num_topics, job) in LsiModel, pass on self.extra_samples and self.power_iters to the Projection constructor as well.
  • make Projection accept these extra constructor parameters, and use them for its internal stochastic_svd call, replacing the hardwired P2_EXTRA_ITERS and P2_EXTRA_DIMS values.
  • add a unit-test that checks all works as expected

@ghost ghost mentioned this issue Aug 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue described a bug difficulty medium Medium issue: required good gensim understanding & python skills
Projects
None yet
Development

No branches or pull requests

1 participant