jsat.regression
Interface UpdateableRegressor
-
- All Superinterfaces:
- java.lang.Cloneable, Regressor, java.io.Serializable
- All Known Implementing Classes:
- BaseUpdateableRegressor, KernelRLS, KernelSGD, LinearSGD, PassiveAggressive, STGD, UpdatableStacking
public interface UpdateableRegressor extends Regressor
UpdateableRegressor is an interface for one type of Online learner. The main characteristic of an online learner is that new example points can be added incrementally after the classifier was initially trained, or as part of its initial training.
Some Online learners behave differently in when they are updated. The UpdateableRegressor is an online learner that specifically only performs additional learning when a new example is provided via theupdate(jsat.classifiers.DataPoint, double)method.
The standard behavior for an UpdateableRegressor is that the user first callsRegressor.train(jsat.regression.RegressionDataSet)to first train the classifier, orsetUp(jsat.classifiers.CategoricalData[], int)to prepare for online updates. Once one of these is called, it should then be safe to callupdate(jsat.classifiers.DataPoint, double)without getting aFailedToFitException. 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 UpdateableRegressorclone()voidsetUp(CategoricalData[] categoricalAttributes, int numericAttributes)Prepares the classifier to begin learning from itsupdate(jsat.classifiers.DataPoint, double)method.voidupdate(DataPoint dataPoint, double targetValue)Updates the classifier by giving it a new data point to learn from.-
Methods inherited from interface jsat.regression.Regressor
regress, supportsWeightedData, train, train
-
-
-
-
Method Detail
-
setUp
void setUp(CategoricalData[] categoricalAttributes, int numericAttributes)
Prepares the classifier to begin learning from itsupdate(jsat.classifiers.DataPoint, double)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 point
-
update
void update(DataPoint dataPoint, double targetValue)
Updates the classifier by giving it a new data point to learn from.- Parameters:
dataPoint- the data point to learntargetValue- the target value of the data point
-
clone
UpdateableRegressor clone()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG