Author-topic Model

model_at(corpus, ...)

# S3 method for mm_file
model_at(corpus, ...)

# S3 method for mm
model_at(corpus, ...)

load_at(file)

Arguments

corpus

Model as returned by mmcorpus_serialize.

...

Any other options, from the ¨ official documentation.

file

Path to a saved model.

See also

Examples

docs <- prepare_documents(corpus)
#> Preprocessing 9 documents #> 9 documents after perprocessing
dictionary <- corpora_dictionary(docs) corpora <- doc2bow(dictionary, docs) corpus_mm <- serialize_mmcorpus(corpora) # fit model auth2doc <- auth2doc(authors, name, document)
# NOT RUN { # create temp to hold serialized data temp <- tempfile("serialized") atmodel <- model_at( corpus_mm, id2word = dictionary, author2doc = auth2doc, num_topics = 2L, serialized = TRUE, serialization_path = temp ) # delete temp unlink(temp, recursive = TRUE) # }