Package elki.classification
Interface Classifier<O>
-
- Type Parameters:
O
- the type of objects handled by this algorithm
- All Superinterfaces:
Algorithm
- All Known Implementing Classes:
AbstractClassifier
,KNNClassifier
,PriorProbabilityClassifier
public interface Classifier<O> extends Algorithm
A Classifier is to hold a model that is built based on a database, and to classify a new instance of the same type.- Since:
- 0.7.0
- Author:
- Arthur Zimek
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
buildClassifier(Database database, Relation<? extends ClassLabel> classLabels)
Performs the training.ClassLabel
classify(O instance)
Classify a single instance.java.lang.String
model()
Produce a String representation of the classification model.-
Methods inherited from interface elki.Algorithm
autorun, getInputTypeRestriction
-
-
-
-
Method Detail
-
buildClassifier
void buildClassifier(Database database, Relation<? extends ClassLabel> classLabels)
Performs the training. Sets available labels.- Parameters:
database
- the database to build the model onclassLabels
- the classes to be learned
-
classify
ClassLabel classify(O instance)
Classify a single instance.- Parameters:
instance
- an instance to classify- Returns:
- predicted class label of the given instance
-
model
java.lang.String model()
Produce a String representation of the classification model.- Returns:
- a String representation of the classification model
-
-