R: Prediction for max-margin Sparse Topical Coding model...
predict.medSTC
R Documentation
Prediction for max-margin Sparse Topical Coding model (Med-STC) for multi-class classification
Description
MedSTC is a novel classification algorithm by Prof. Jun Zhu (http://www.ml-thu.net/~jun/).
This function predicts test class labels using a medSTC model.
Usage
## S3 method for class 'medSTC'
predict(object,documents,...)
Arguments
object
A model object of the medSTC class, which is obtained after running medSTC.
documents
A list whose length is equal to the number of documents, D. Each
element of documents is an integer matrix with two rows. Each
column of documents[[i]] (i.e., document i) represents a
word occurring in the document.
documents[[i]][1, j] is a
0-indexed word identifier for the jth word in document i.
documents[[i]][2,j] is an integer specifying the number of times that word appears in
the document.