Prediction for max-margin Sparse Topical Coding model (Med-STC) for multi-class classification

Share:

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

1
2
## 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.

...

Currently not used.

Value

scores

Score values for each label for each document.

assignments

Predicted class labels for each document.

Author(s)

Jun Zhu (junzhu@cs.cmu.edu), Aykut Firat (aykut@crimsonhexagon.com)

References

Jun Zhu, and Eric P. Xing. Sparse Topical Coding, In Proc. of 27th Conference on Uncertainty in Artificial Intelligence (UAI), Barcelona, Spain, 2011.

Examples

1
## Not run: demo(medSTC)