hhreco.classification
Class MMDClassifier

java.lang.Object
  extended byhhreco.classification.MMDClassifier
All Implemented Interfaces:
Classifier, TrainableClassifier

public class MMDClassifier
extends java.lang.Object
implements TrainableClassifier

Minimum distance classifier measures the normalized Euclidean distance between the test example and each of the training classes.


Constructor Summary
MMDClassifier()
           
 
Method Summary
 Classification classify(FeatureSet s)
          Classify the given example by computing the normalized Euclidean distance to each training class.
 void clear()
          Clear all previously trained data.
 boolean isIncremental()
          Return whether this classifier is incremental, i.e.
 void train(TrainingSet s, int numFeatures)
          Train the classifier with the given training set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MMDClassifier

public MMDClassifier()
Method Detail

classify

public Classification classify(FeatureSet s)
                        throws ClassifierException
Classify the given example by computing the normalized Euclidean distance to each training class.

Specified by:
classify in interface Classifier
Throws:
ClassifierException

train

public void train(TrainingSet s,
                  int numFeatures)
           throws ClassifierException
Train the classifier with the given training set. This method will throw a ClassifierException if the training set is not self consisistent, i.e. the feature sets that it contains do not have the same number of features in them. Any previously training data, if any, will be removed upon the call of this method.

Specified by:
train in interface TrainableClassifier
Throws:
ClassifierException

isIncremental

public boolean isIncremental()
Return whether this classifier is incremental, i.e. whether new data can be added to the existing training set (A) without reprocessing the examples in A.

Specified by:
isIncremental in interface TrainableClassifier

clear

public void clear()
Clear all previously trained data.

Specified by:
clear in interface TrainableClassifier