|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthhreco.classification.KNNClassifier
This K-nearest neighbor classifier compares a test example with every example in the training set by computing the normalized Euclidean distance.
Constructor Summary | |
KNNClassifier()
|
Method Summary | |
Classification |
classify(FeatureSet s)
Classify the given example by testing it against each example in the training set. |
void |
clear()
Remove previously trained data. |
boolean |
isIncremental()
Return whether this classifier is incremental, i.e. |
void |
train(TrainingSet s,
int numFeatures)
Train the classifier with a given training set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public KNNClassifier()
Method Detail |
public Classification classify(FeatureSet s) throws ClassifierException
classify
in interface Classifier
ClassifierException
public void train(TrainingSet s, int numFeatures) throws ClassifierException
train
in interface TrainableClassifier
ClassifierException
public boolean isIncremental()
isIncremental
in interface TrainableClassifier
public void clear()
clear
in interface TrainableClassifier
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |