jml.online.classification
Class OnlineBinaryClassifier

java.lang.Object
  extended by jml.online.classification.OnlineBinaryClassifier
Direct Known Subclasses:
Perceptron, Winnow

public abstract class OnlineBinaryClassifier
extends java.lang.Object


Field Summary
(package private)  org.apache.commons.math.linear.RealMatrix W
          Projection vector.
 
Constructor Summary
OnlineBinaryClassifier()
           
 
Method Summary
 void loadModel(java.lang.String filePath)
          Load the model for a classifier.
 int predict(double[] Xt)
           
abstract  int predict(org.apache.commons.math.linear.RealMatrix Xt)
           
 void saveModel(java.lang.String filePath)
          Save the model for a classifier.
 void train(double[] X, int y)
          Train the classifier with a new sample X.
abstract  void train(org.apache.commons.math.linear.RealMatrix X, int y)
          Train the classifier with a new sample X.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

W

org.apache.commons.math.linear.RealMatrix W
Projection vector.

Constructor Detail

OnlineBinaryClassifier

public OnlineBinaryClassifier()
Method Detail

train

public abstract void train(org.apache.commons.math.linear.RealMatrix X,
                           int y)
Train the classifier with a new sample X.


train

public void train(double[] X,
                  int y)
Train the classifier with a new sample X.


predict

public abstract int predict(org.apache.commons.math.linear.RealMatrix Xt)

predict

public int predict(double[] Xt)

loadModel

public void loadModel(java.lang.String filePath)
Load the model for a classifier.

Parameters:
filePath - file path to load the model

saveModel

public void saveModel(java.lang.String filePath)
Save the model for a classifier.

Parameters:
filePath - file path to save the model