merge.mallet_model: Combine a topic model with inferred document topics

merge.mallet_modelR Documentation

Combine a topic model with inferred document topics

Description

This function joins together two models that share enough parameters for this operation to make some sense, for example, an ordinary topic model and a model of further documents created by infer_topics.

Usage

## S3 method for class 'mallet_model'
merge(x, y, weighting_dtx = identity, weighting_dty = identity)

Arguments

x,

y models with the same topic-word matrices and vocabulary

Value

a further pseudo-model, inheriting the topic-word matrix of the arguments, and with a document-topic matrix formed by stacking the corresponding matrices of the arguments. Note that merging an inferred topic model means that the document-topic matrix must be row-normalized.


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