Lou*_*sD4 2 error-handling r topic-modeling topicmodels
成功运行我的 stm 几次后,现在每次尝试运行它时都会收到此错误消息:
\nUNRELIABLE VALUE: Future (\xe2\x80\x98<none>\xe2\x80\x99) 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".\nRun Code Online (Sandbox Code Playgroud)\n这是我运行的代码:
\nmany_models <- data_frame(K = c(10, 20, 30, 40, 50, 60)) %>%\nmutate(topic_model = future_map_dbl(K, ~stm(tweet_df_sparse, K = .,\nverbose = FALSE)))\nRun Code Online (Sandbox Code Playgroud)\n知道如何快速修复它吗?
\n需要将seed = TRUE添加到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)))
Run Code Online (Sandbox Code Playgroud)