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

Wrong LDA hyperparameter offset (downweighting factor tau0)? #3138

Open
jonaschn opened this issue May 11, 2021 · 1 comment
Open

Wrong LDA hyperparameter offset (downweighting factor tau0)? #3138

jonaschn opened this issue May 11, 2021 · 1 comment

Comments

@jonaschn
Copy link
Contributor

I observed that the hyperparameter offset (introduced as downweighting factor in aa56561) which corresponds to tau_0 from Hoffman et al. is set differently compared to the original algorithm proposed by Hoffman.

    self._tau0 = tau0 + 1

When passing tau0 to his algorithm, tau0 + 1 is actually used in the calculation of rhot:

    rhot = pow(self._tau0 + self._updatect, -self._kappa)

This line is used here and here.

The commit edc3ce5 in gensim further changes the computation of rho (in order to pay attention to multi-pass algorithm as discussed in #298:

https://github.com/RaRe-Technologies/gensim/blob/351456b4f7d597e5a4522e71acedf785b2128ca1/gensim/models/ldamodel.py#L963-L967

I wonder if there is any rationale behind this decision to deviate from Hoffman's tau0 or if this was unintended?

@jonaschn
Copy link
Contributor Author

I find this resource helpful: https://vb-learning-rate-demo.herokuapp.com to see how the parameters offset (tau) and decay (kappa) affect the learning rate of the online VB method

The source code by @ecoronado92 could be found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant