model_at.Rd
Author-topic Model
model_at(corpus, ...) # S3 method for mm_file model_at(corpus, ...) # S3 method for mm model_at(corpus, ...) load_at(file)
corpus | Model as returned by |
---|---|
... | Any other options, from the ¨ official documentation. |
file | Path to a saved model. |
#> → Preprocessing 9 documents #> ← 9 documents after perprocessingdictionary <- 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) # }