Comments (4)
I should also add that I tried removing and reinstalling the package to no avail.
from ldatuning.
I am on the same platform and ran the code successfully:
> library("topicmodels")
> data("AssociatedPress", package="topicmodels")
> dtm <- AssociatedPress[1:10, ]
> result <- FindTopicsNumber(
+ dtm,
+ topics = seq(from = 2, to = 15, by = 1),
+ metrics = c("Griffiths2004", "CaoJuan2009", "Arun2010", "Deveaud2014"),
+ method = "Gibbs",
+ control = list(seed = 77),
+ mc.cores = 2L,
+ verbose = TRUE, return_models = T
+ )
fit models... done.
calculate metrics:
Griffiths2004... done.
CaoJuan2009... done.
Arun2010... done.
Deveaud2014... done.
> result
topics LDA_model Griffiths2004 CaoJuan2009 Arun2010 Deveaud2014
1 15 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15297.82 0.5047240 15.92711 0.1362596
2 14 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15338.24 0.4927860 15.36552 0.1406462
3 13 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15319.82 0.4944709 15.80569 0.1504368
4 12 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15326.94 0.4756351 15.81278 0.1594651
5 11 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15293.55 0.4347111 15.23313 0.1770861
6 10 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15291.00 0.3829542 14.93706 0.1969989
7 9 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15303.87 0.3379840 14.71664 0.2181424
8 8 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15256.30 0.3061726 14.78140 0.2435689
9 7 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15259.80 0.2746812 14.82908 0.2746203
10 6 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15251.04 0.2612029 15.28425 0.3101625
11 5 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15226.91 0.1875260 15.34470 0.3718687
12 4 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15242.86 0.1779016 16.29708 0.4323482
13 3 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15266.66 0.1600736 16.97832 0.5318997
14 2 <S4 class ‘LDA_Gibbs’ [package “topicmodels”] with 16 slots> -15349.79 0.1169522 18.47430 0.6989189
And session:
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] topicmodels_0.2-11 ldatuning_1.0.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 rstudioapi_0.11 xml2_1.3.2 magrittr_1.5 tidyselect_1.1.0 munsell_0.5.0 tm_0.7-7 colorspace_1.4-1 R6_2.4.1
[10] rlang_0.4.7 dplyr_1.0.2 tools_4.0.2 parallel_4.0.2 grid_4.0.2 gtable_0.3.0 xfun_0.16 tinytex_0.25 modeltools_0.2-23
[19] ellipsis_0.3.1 tibble_3.0.3 lifecycle_0.2.0 crayon_1.3.4 gmp_0.6-0 NLP_0.2-0 purrr_0.3.4 ggplot2_3.3.2 vctrs_0.3.4
[28] glue_1.4.2 slam_0.1-47 Rmpfr_0.8-1 compiler_4.0.2 pillar_1.4.6 generics_0.0.2 scales_1.1.1 stats4_4.0.2 pkgconfig_2.0.3
I see that the error seems to be generated by a function from the Rmpfr
package, and I don't see it in your environment. My version is 0.8-1; you might make sure this package is available and up-to-date. If this is the cause, we can make the dependency explicit.
If that doesn't work, I also see here that the BLAS directories are different. Do you have a current XCode installation on your machine? If I had to guess, I'd think that the XCode install would need to occur before the R installation occurs so that R finds the right libraries.
Hope that helps!
from ldatuning.
@titaniumtroop Thank you! Yesterday I tested it on an RStudio AMI and it worked, so I realized the error was with my machine. Let me troubleshoot these two suggestions today and see if I can see which it is.
from ldatuning.
Any update on this? Can the issue be closed?
from ldatuning.
Related Issues (20)
- Typo in man page HOT 1
- fit models...Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: invalid argument type HOT 3
- FindTopicsNumber stop working HOT 1
- return_models = T causes error in FindTopicsNumber_plot HOT 1
- Error in checkForRemoteErrors(val) : 2 nodes produced errors; first error: Each row of the input matrix needs to contain at least one non-zero entry HOT 2
- crash with Apple M1chip HOT 4
- Status of each k in verbose mode HOT 1
- Check needed for NCOL(dtm) <= # of topics HOT 6
- Biterm topic model tuning
- Deveaud 2014 correctly implemented?
- Performance of FindTopicsNumber on big datasets HOT 1
- warning message running "FindTopicsNumber_plot"
- Warning message: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as of ggplot2 3.3.4. HOT 1
- Porting this package to use text2vec instead of topicmodels HOT 4
- add option to load-balance model-fitting HOT 2
- Error: "Each row of the input matrix needs to contain at least one non-zero entry" HOT 3
- Arun 2010 correctly implemented? HOT 19
- Error in seq_len(m) : argument must be coercible to non-negative integer HOT 1
- Delete HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ldatuning.