D - The data type of the input examples used for learning and prediction.C - The label type, i.e. the Java class of the predicted outcome.public abstract class AbstractClassifier<D,C> extends Object implements Classifier<D,C>
This class implements an abstract classifier, i.e. an instance that is capable of learning
from observations of a specific, generic type D and predicting class values of
type C.
| Constructor and Description |
|---|
AbstractClassifier() |
| Modifier and Type | Method and Description |
|---|---|
PredictionModel<D,C> |
getModel()
Returns the result of the training process.
|
void |
init()
This method is called after the learner has been created and
all parameters have been set.
|
abstract void |
learn(D item)
Starts or continues to train a model.
|
abstract C |
predict(D item)
This method returns a prediction for the given input.
|
public final PredictionModel<D,C> getModel()
Learnerpublic void init()
Learnerpublic abstract C predict(D item)
PredictionModelThis method returns a prediction for the given input.
predict in interface PredictionModel<D,C>item - to predict forstream.model.PredictionModel#predict(java.lang.Object)Copyright © 2014. All rights reserved.