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

“underflow” when running sLDA #6

Open
niyikai opened this issue Jan 15, 2018 · 4 comments
Open

“underflow” when running sLDA #6

niyikai opened this issue Jan 15, 2018 · 4 comments

Comments

@niyikai
Copy link

niyikai commented Jan 15, 2018

There is no problem when running on small dataset, but “underflow” happens when I change to the large data. Can someone help with this problem? Why this error happens and how to solve it.

@bearnshaw
Copy link
Contributor

@niyikai It would be helpful if you posted the error with traceback here.

@niyikai
Copy link
Author

niyikai commented Jan 18, 2018

@bearnshaw Thank you so much, here is the traceback

start iterations
gsl: exp.c:113: ERROR: underflow
Default GSL error handler invoked.
Abort trap: 6

@bearnshaw
Copy link
Contributor

Hmm, hard to tell where the underflow is without the compiled c file. My guess is that in one of the log likelihood functions in _topic_models.pyx, a zero or very small number is being passed to one of the lngamma functions. We use lngamma instead of gamma to protect against overflow, but it looks like it might be better to have some logic that chooses which to use depending on the size of the input. Feel free to test that out and submit a pull request if it works.

@niyikai
Copy link
Author

niyikai commented Mar 20, 2018

@bearnshaw Thanks a lot! I found that the real cause was my computer did not have enough memory.

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

2 participants