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

R crashes when STM model converge #89

Closed
adeldaoud opened this issue Aug 18, 2017 · 6 comments
Closed

R crashes when STM model converge #89

adeldaoud opened this issue Aug 18, 2017 · 6 comments

Comments

@adeldaoud
Copy link

Relatively frequently R crashes when STM model converge. See image below for one example after a 30h+ estimation session. This has happened on two different computers, with different data sizes. I have not been able to identify any specific patterns leading to these crashes—as the crashes do not seem to be deterministic.

The model estimation settings is usually:

# full
Year <- year(df$date) # year data from the enviroment

stmFit.full <- stm(out$documents, out$vocab, K = 0, prevalence =~ s(Year) , 
              max.em.its = 150, init.type = "Spectral", seed = 300, verbose = T)

Any ideas what is going on?

image

@adeldaoud
Copy link
Author

adeldaoud commented Aug 20, 2017

I have now made sure that R, Rstudio, and all packages are up to date, but the model still crashes. Happy to share data if it helps to identify the problems.

@bstewart
Copy link
Owner

For anyone else following this issue- we've learned a lot more. It seems to be specific to Windows machines and particularly problematic with ngroups>1. We are still investigating but others with this problem, please feel free to share your experiences here.

@bstewart
Copy link
Owner

We've continued to pursue this and it seems to be a bug with matrixStats on large matrices and only on Windows.

bstewart added a commit that referenced this issue Aug 27, 2017
This should address the crashing issue on windows- waiting for full
testing but this shouldn’t affect much in the meantime.
@bstewart
Copy link
Owner

Okay- this is now fixed in the version in the master branch.

Huge thanks to @adeldaoud for both finding the bug initially but also doing a ton of testing to help narrow down the cause.

@cschwem2er
Copy link

cschwem2er commented Sep 7, 2017

Hi Brandon,

will these fixes hit CRAN before mid October? I'd love to use the latest stm version for teaching a text analysis class.

@bstewart
Copy link
Owner

bstewart commented Sep 7, 2017

Definitely. I should have a submission in the CRAN queue by Friday actually, we are just making some tweaks to the vignette.

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

3 participants