load_mallet_model_legacy: Load a model with files from dfrtopics 0.1

load_mallet_model_legacyR Documentation

Load a model with files from dfrtopics 0.1

Description

The convention for exporting model outputs differed in earlier versions of this package. This file loads in a folder of model outputs on the old conventions. To skip loading some elements, set the file name to NULL.

Usage

load_mallet_model_legacy(
  f = ".",
  doc_topics_file = file.path(f, "doc_topics.csv"),
  keys_file = file.path(f, "keys.csv"),
  vocab_file = file.path(f, "vocab.txt"),
  params_file = file.path(f, "params.csv"),
  topic_words_file = NULL,
  simplified_state_file = NULL,
  metadata_file = NULL
)

Arguments

f

directory name

doc_topics_file

document-topics CSV (document topic proportions with a header row and an extra column of document IDs)

keys_file

the "weighted keys" or top topic-words CSV with top n words in each topic for some n, together with their weights, and hyperparameter α estimates (repeated n times for each topic). MALLET's own "topic keys" output is different.

vocab_file

the model vocabulary, one word per line

params_file

CSV with one data row with saved model parameters (fewer than in current version)

topic_words_file

CSV with topic-word weights (no header)

simplified_state_file

CSV with a "simplified" sampling state (same as produced by current simplify_state

metadata_file

vector of metadata files to read in (optionally) and attach to model

Value

mallet_model object


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