jsat.classifiers
Interface UpdateableClassifier
-
- All Superinterfaces:
- Classifier, java.lang.Cloneable, java.io.Serializable
- All Known Implementing Classes:
- ALMA2, ALMA2K, AMM, AODE, AROW, BaseUpdateableClassifier, BOGD, CSKLR, DUOL, Forgetron, KernelSGD, LinearSGD, MultinomialNaiveBayes, NaiveBayesUpdateable, NHERD, ODE, OnlineAMM, OSKL, PassiveAggressive, Projectron, ROMMA, SCW, SPA, STGD, UpdatableStacking
public interface UpdateableClassifier extends Classifier
UpdateableClassifier is an interface for one type of Online learner. The main characteristic of an online learning is that new example points can be added incremental after the classifier was initially trained, or as part of its initial training.
Some Online learners behave differently in when they are updated. The UpdateableClassifier is an online learner that specifically only performs additional learning when a new example is provided via theupdate(jsat.classifiers.DataPoint, int)method.
The standard behavior for an Updateable Classifier is that the user first calls#trainC(jsat.classifiers.ClassificationDataSet)to first train the classifier, orsetUp(jsat.classifiers.CategoricalData[], int, jsat.classifiers.CategoricalData)to prepare for online updates. Once one of these is called, it should then be safe to callupdate(jsat.classifiers.DataPoint, int)without getting aUntrainedModelException. Some online learners may require one of the train methods to be called first.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description UpdateableClassifierclone()voidsetUp(CategoricalData[] categoricalAttributes, int numericAttributes, CategoricalData predicting)Prepares the classifier to begin learning from itsupdate(jsat.classifiers.DataPoint, int)method.voidupdate(DataPoint dataPoint, int targetClass)Updates the classifier by giving it a new data point to learn from.-
Methods inherited from interface jsat.classifiers.Classifier
classify, supportsWeightedData, train, train
-
-
-
-
Method Detail
-
setUp
void setUp(CategoricalData[] categoricalAttributes, int numericAttributes, CategoricalData predicting)
Prepares the classifier to begin learning from itsupdate(jsat.classifiers.DataPoint, int)method.- Parameters:
categoricalAttributes- an array containing the categorical attributes that will be in each data pointnumericAttributes- the number of numeric attributes that will be in each data pointpredicting- the information for the target class that will be predicted
-
update
void update(DataPoint dataPoint, int targetClass)
Updates the classifier by giving it a new data point to learn from.- Parameters:
dataPoint- the data point to learntargetClass- the target class of the data point
-
clone
UpdateableClassifier clone()
- Specified by:
clonein interfaceClassifier
-
-
DataMelt 3.0 © DataMelt by jWork.ORG