C
- the class of instances that represent the classification categoriespublic class KNNOperationClassifier<C> extends RankingQueryOperationClassifier<C>
Classifier
.Constructor and Description |
---|
KNNOperationClassifier(Classifier<? super RankingQueryOperation,C> classifier,
int k,
Algorithm algorithm,
java.lang.String executedOperationParameter)
Creates a new kNN classifier.
|
Modifier and Type | Method and Description |
---|---|
protected RankingQueryOperation |
createOperation(LocalAbstractObject object)
Creates a ranking operation to be executed to get the candidate list for classification.
|
KNNQueryOperation |
getExecutedOperation(Parametric parameters)
Returns the executed operation stored by this classifier in the given parameters.
|
addClasifiedObject, classify, getCategoriesClass, removeClasifiedObject
public KNNOperationClassifier(Classifier<? super RankingQueryOperation,C> classifier, int k, Algorithm algorithm, java.lang.String executedOperationParameter)
classifier
- the classifier used to compute the object classificationk
- the number of nearest neighbors to retrievealgorithm
- the algorithm that supplies the similar objectsexecutedOperationParameter
- the name of the parameter to put the executed operation into when classifyingprotected RankingQueryOperation createOperation(LocalAbstractObject object)
RankingQueryOperationClassifier
createOperation
in class RankingQueryOperationClassifier<C>
object
- the object to classifypublic KNNQueryOperation getExecutedOperation(Parametric parameters)
RankingQueryOperationClassifier
getExecutedOperation
in class RankingQueryOperationClassifier<C>
parameters
- the parameters to get the executed operation from