Top Description Fields Constructors Methods
javax.visrec.ml.classification

public final Class EnsambleClassifier<T, R>

extends Object
implements Classifier<T, R>
Class Inheritance
All Implemented Interfaces
javax.visrec.ml.classification.Classifier
Type Parameters
<T>
The input type which is to be classified.
<R>
Return type of the classifier.
Imports
java.util.ArrayList, .HashMap, .List, .Map

EnsambleClassifier is a group of classifiers that provide common classification result, which gives better accuracy then each individual classifier. Usually average or most frequent answer is used as a final result.
Since
1.0

Field Summary

Modifier and TypeField and Description
private final Map<String, Classifier<T, R>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public EnsambleClassifier<T, R>
addClassifier(String classifierId, Classifier<T, R> classifier)

public R
classify(T
some instance to classify
input
)

Implements javax.visrec.ml.classification.Classifier.classify.

Classifies specified input instance of type T and returns classification results of type R.
public Classifier<T, R>
getClassifier(String classiferId)

public void
remove(String classifierId)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classifiersback to summary
private final Map<String, Classifier<T, R>> classifiers

Constructor Detail

EnsambleClassifierback to summary
public EnsambleClassifier()

Method Detail

addClassifierback to summary
public EnsambleClassifier<T, R> addClassifier(String classifierId, Classifier<T, R> classifier)
classifyback to summary
public R classify(T input)

Implements javax.visrec.ml.classification.Classifier.classify.

Doc from javax.visrec.ml.classification.Classifier.classify.

Classifies specified input instance of type T and returns classification results of type R.

Parameters
input:T

some instance to classify

Returns:R

classification results for the specified instance

Annotations
@Override
getClassifierback to summary
public Classifier<T, R> getClassifier(String classiferId)
removeback to summary
public void remove(String classifierId)