| write_mallet_model | R Documentation |
Save a series of files with the results of an LDA run. By default this will produce a number of files, including several large ones.
write_mallet_model( m, output_dir = ".", n_top_words = 50, save_instances = FALSE, save_scaled = FALSE, save_state = TRUE, simplify_state = TRUE )
m |
|
output_dir |
where to save all the output files. |
save_instances |
if TRUE, extract the instance list from the trainer
object and save it to |
save_scaled |
if TRUE write a file of 2D coordinates for the topics |
save_state |
if TRUE, save the MALLET sampling state in MALLET's format |
simplify_state |
if TRUE, save the sampling state in a simplified CSV format (requires python) |
The following files are written to output_dir:
topic_words.csvunnormalized topic-word matrix, CSV format
vocabulary.txtlist of words (same order as columns of topic-word matrix), one per line
params.txtVarious model parameters, including hyperparameters
top_words.csvtopic key words CSV; see top_words
for the format
doc_topics.csvdocument-topic matrix CSV
mallet_state.gzMALLET sampling state (a big file)
state.csvsimplified version of the sampling state
diagnostics.xmlMALLET model diagnostics
doc_ids.txtinstance id's, one per line
instances.malletsave the source text "instances" file (not done by default)
topic_scaled.csvCSV with scaled 2D coordinates for the topics.
Obtained by applying cmdscale to a matrix of topic
divergences calculated by topic_divergences
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.