Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Structural Topic Model (STM) Error: UNRELIABLE VALUE: Future (‘<none>’) unexpectedly generated random numbers without specifying argument 'seed'

After running my stm several times successfully, I now get this error message every time I try to run it:

UNRELIABLE VALUE: Future (‘<none>’) unexpectedly generated random numbers without specifying argument 'seed'. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".

This is the code I ran:

many_models <- data_frame(K = c(10, 20, 30, 40, 50, 60)) %>%
mutate(topic_model = future_map_dbl(K, ~stm(tweet_df_sparse, K = .,
verbose = FALSE)))

Any idea how to quickly fix it?

like image 526
LouisD4 Avatar asked Oct 17 '25 13:10

LouisD4


1 Answers

Need to add seed = TRUE to future_map_dbl()

many_models <- data_frame(K = c(10, 20, 30, 40, 50, 60)) %>%
mutate(topic_model = future_map(future_map_dbl(K, ~stm(tweet_df_sparse, K = ., verbose = FALSE, .options = furrr_options(seed = T)))
like image 180
aterhorst Avatar answered Oct 20 '25 02:10

aterhorst



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!