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

Some tests have Model Terminated Before Convergence Reached in the log: is it an expected behavior? #287

Open
barracuda156 opened this issue Apr 19, 2024 · 0 comments

Comments

@barracuda156
Copy link

@bstewart Could you please advise on this?

While tests are reported as passing, the following looks questionable:

R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library(testthat)
> library(stm)
stm v1.3.7 successfully loaded. See ?stm for help. 
 Papers, resources, and other materials at structuraltopicmodel.com
> 
> test_check("stm")
Building corpus... 
Converting to Lower Case... 
Removing punctuation... 
Removing stopwords... 
Removing numbers... 
Stemming... 
Creating Output... 
Removed 1098 of 1102 terms (3659 of 4143 tokens) due to sparselevel of 0.8 
Removing 2 of 4 terms (223 of 377 tokens) due to frequency 
Removing 117 Documents with No Words 
Your corpus now has 135 documents, 2 terms and 154 tokens.Beginning Spectral Initialization 
	 Calculating the gram matrix...
	 Finding anchor words...
 	...
	 Recovering initialization...
 	...............
Initialization complete.
.................................................................................................................
Completed E-Step (0 seconds). 
Completed M-Step. 
Completing Iteration 1 (approx. per word bound = -5.898) 
.................................................................................................................
Completed E-Step (0 seconds). 
Completed M-Step. 
Model Terminated Before Convergence Reached 
Building corpus... 
Converting to Lower Case... 
Removing punctuation... 
Removing stopwords... 
Removing numbers... 
Stemming... 
Creating Output... 
Removing 640 of 1102 terms (640 of 3789 tokens) due to frequency 
Your corpus now has 341 documents, 462 terms and 3149 tokens.Beginning Spectral Initialization 
	 Calculating the gram matrix...
	 Finding anchor words...
 	...
	 Recovering initialization...
 	....
Initialization complete.
.................................................................................................................
Completed E-Step (0 seconds). 
Completed M-Step. 
Completing Iteration 1 (approx. per word bound = -5.626) 
.................................................................................................................
Completed E-Step (0 seconds). 
Completed M-Step. 
Model Terminated Before Convergence Reached 
Beginning Random Initialization 
....................................................................................................
Completed E-Step (6 seconds). 
Completed M-Step. 
Model Terminated Before Convergence Reached 
Beginning Spectral Initialization 
	 Calculating the gram matrix...
	 Finding anchor words...
 	...
	 Recovering initialization...
 	..........................
Initialization complete.
....................................................................................................
Completed E-Step (6 seconds). 
Completed M-Step. 
Model Terminated Before Convergence Reached 
Beginning Spectral Initialization 
	 Calculating the gram matrix...
	 Finding anchor words...
 	...
	 Recovering initialization...
 	..........................
Initialization complete.
....................................................................................................
Completed E-Step (6 seconds). 
Completed M-Step. 
Completing Iteration 1 (approx. per word bound = -7.197) 
....................................................................................................
Completed E-Step (6 seconds). 
Completed M-Step. 
Model Terminated Before Convergence Reached 
Beginning Spectral Initialization 
	 Calculating the gram matrix...
	 Finding anchor words...
 	...
	 Recovering initialization...
 	..........................
Initialization complete.
....................................................................................................
Completed E-Step (7 seconds). 
.....................................................................................................
Completed M-Step (52 seconds). 
Completing Iteration 1 (approx. per word bound = -7.197) 
....................................................................................................
Completed E-Step (6 seconds). 
.....................................................................................................
Completed M-Step (50 seconds). 
Model Terminated Before Convergence Reached 
Beginning Random Initialization 
....................................................................................................
Completed Group 2 E-Step (3 seconds). 
....................................................................................................
Completed Group 1 E-Step (3 seconds). 
Completed M-Step. 
Completing Iteration 1 (approx. per word bound = -10.359) 
....................................................................................................
Completed Group 1 E-Step (3 seconds). 
Completed M-Step. 
......................................................................................

Overall output is okay (or pretends to be):

--->  Testing R-stm
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-stm/R-stm/work/stm" && /opt/local/bin/R CMD check ./stm_1.3.7.tar.gz --no-manual --no-build-vignettes 
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-stm/R-stm/work/stm/stm.Rcheck’
* using R version 4.3.3 (2024-02-29)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
    GNU Fortran (MacPorts gcc12 12.3.0_3+stdlib_flag) 12.3.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘stm/DESCRIPTION’ ... OK
* this is package ‘stm’ version ‘1.3.7’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘stm’ can be installed ... OK
* used C compiler: ‘gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0’
* used C++ compiler: ‘g++-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0’
* used SDK: ‘NA’‘NA’‘NA’‘NA’‘NA’‘NA’
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking loading without being on the library search path ... OK
* checking startup messages can be suppressed ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking LazyData ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... OK
* checking installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘spelling.R’
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ...
  ‘stmVignette.Rnw’ using ‘UTF-8’... OK
 OK
* checking re-building of vignette outputs ... SKIPPED
* DONE

Status: OK
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