load_sampling_state: Load Gibbs sampling state into model object

load_sampling_stateR Documentation

Load Gibbs sampling state into model object

Description

Load the Gibbs sampling state into a model object for access via sampling_state. The state must be available for loading, either from MALLET's own model object in memory, or in a sampling state file from MALLET, or in a simplified sampling state file. The latter two files (which can be very large) will be created if necessary.

Usage

load_sampling_state(m, simplified_state_file = NULL, mallet_state_file = NULL)

Arguments

m

mallet_model object. Either its ParallelTopicModel must be available or one of the other two parameters must be an already-existing file

simplified_state_file

name of simplified sampling state file. If the file exists, it is read in. If it does not exist, it is created; if this parameter is NULL, a temporary file is used instead

mallet_state_file

name of file with MALLET's own gzipped sampling-state output (from write_mallet_state or command-line mallet). If this file does not exist, it will be created if necessary (i.e. if simplified_state_file does not already exist); if this parameter is NULL, a temporary is used.

Value

a copy of m with the sampling state loaded (available via sampling_state(m)


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.