50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

textir (version 1.4)

predict.mnlm: topic predict

Description

Predict function for Logistic Inverse Regression

Usage

## S3 method for class 'mnlm':
predict( object, newcounts, ... )

Arguments

object
An output object from the mnlm function.
newcounts
An nrow(object$loadings)-column matrix of multinomial phrase/category counts for new documents/observations. Can be either a simple matrix or a simple_triplet_matrix.
...
Additional arguments to the undocumented internal tpx* functions.

Value

  • The output is an nrow(newcounts) by ncol(object$loadings) matrix of document scores in each factor (object$covars) direction.

Details

This function returns the sufficient reduction $F\Phi$ for new documents, based on loadings from a fitted mnlm object.

References

Taddy (2011), Inverse Regression for Analysis of Sentiment in Text. http://arxiv.org/abs/1012.2098

See Also

mnlm, congress109