|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object leila.classifiers.Classifier leila.classifiers.KNNClassifier
public class KNNClassifier
This class is part of LEILA (http://mpii.de/yago-naga/leila). It is licensed under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0) by the author Fabian M. Suchanek (http://suchanek.name).
Classifier.java represents a simple KNN-Classifier for a set of StoredFeatureObjects.
Field Summary | |
---|---|
static double |
blackHole
All feature objects more similar than this value fall into the same equivalence class |
Fields inherited from class leila.classifiers.Classifier |
---|
bridgeMap, isContracted, numFeatureObjects |
Constructor Summary | |
---|---|
KNNClassifier()
|
Method Summary | |
---|---|
void |
add(LinkagePattern o)
Adds a new LinkagePattern |
double |
classify(LinkagePattern o)
Returns a similarity measure |
void |
printTo(java.io.Writer o)
Prints this classifier |
java.lang.String |
toString()
Returns the list of featureObjects, might be long, so use printTo instead! |
void |
train()
Contracts the data |
Methods inherited from class leila.classifiers.Classifier |
---|
print |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static double blackHole
Constructor Detail |
---|
public KNNClassifier()
Method Detail |
---|
public void add(LinkagePattern o) throws java.lang.Exception
add
in class Classifier
java.lang.Exception
public java.lang.String toString()
toString
in class Classifier
public double classify(LinkagePattern o) throws java.lang.Exception
classify
in class Classifier
java.lang.Exception
public void printTo(java.io.Writer o) throws java.lang.Exception
Classifier
printTo
in class Classifier
java.lang.Exception
public void train() throws java.lang.Exception
train
in class Classifier
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |