C
- the class of instances that represent the classification categoriespublic class ObjectProviderClassifier<C> extends java.lang.Object implements Classifier<LocalAbstractObject,C>
provider
of a classified set by measuring distances. The actual classification is computed
from the distances by a given Classifier
.Constructor and Description |
---|
ObjectProviderClassifier(Classifier<? super java.util.Iterator<? extends RankedAbstractObject>,C> classifier,
ObjectProvider<? extends LocalAbstractObject> classifiedObjects)
Creates a new kNN classifier.
|
Modifier and Type | Method and Description |
---|---|
Classification<C> |
classify(LocalAbstractObject object,
Parametric parameters)
Classifies the given
object into zero, one, or several categories C . |
java.lang.Class<? extends C> |
getCategoriesClass()
Returns the class of instances that represent the classification categories (classes).
|
public ObjectProviderClassifier(Classifier<? super java.util.Iterator<? extends RankedAbstractObject>,C> classifier, ObjectProvider<? extends LocalAbstractObject> classifiedObjects)
classifier
- the classifier used to compute the object classificationclassifiedObjects
- the provider of the classified objectspublic Classification<C> classify(LocalAbstractObject object, Parametric parameters) throws ClassificationException
Classifier
object
into zero, one, or several categories C
.classify
in interface Classifier<LocalAbstractObject,C>
object
- the object to classifyparameters
- additional parameters for the classification;
the values for the parameters are specific to a given classifier
implementation and can be updated during the process if they are ModifiableParametric
ClassificationException
- if there was an error classifying the objectpublic java.lang.Class<? extends C> getCategoriesClass()
Classifier
getCategoriesClass
in interface Classifier<LocalAbstractObject,C>