View definition


Defined in


Use trained model to predict test vector's class. The following operation is used in order to score each class:

classScore = log(p(c)) + \sum_{f}{log(p(f|c))}

PredictOne returns the string that represents the predicted class.

IMPORTANT: PredictOne panics if Fit was not called or if the document vector and train matrix have a different number of columns.

PredictOne is referenced in 1 repository