grow  R Documentation 
This function is used to estimate a topic model created by
LDA()
, JST()
or rJST()
. In essence, this function iterates a Gibbs
sampler MCMC.
grow( x, iterations = 100, nChains = 1, displayProgress = TRUE, computeLikelihood = TRUE, seed = NULL )
x 
a model created with the 
iterations 
the number of iterations by which the model should be grown. 
nChains 
if set above 1, the model will be grown into multiple chains.
from various starting positions. Latent variables will be reinitialized if

displayProgress 
if 
computeLikelihood 
if set to 
seed 
for reproducibility, a seed can be provided. 
a sentopicmodel
of the relevant model class if nChains
is
unspecified or equal to 1. A multiChains
object if nChains
is greater
than 1.
When nChains > 1
, the function can take advantage of
future.apply::future_lapply (if installed) to spread the computation over
multiple processes. This requires the specification of a parallel strategy
using future::plan()
. See the examples below.
LDA()
, JST()
, rJST()
, reset()
model < rJST(ECB_press_conferences_tokens) grow(model, 10) #  Parallel computation  require(future.apply) future::plan("multisession", workers = 2) # Set up 2 workers grow(model, 10, nChains = 2) future::plan("sequential") # Shut down workers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.