public class KNNRegressionTrainer extends SingleLabelDatasetTrainer<KNNRegressionModel>
DatasetTrainer.EmptyDatasetException
environment
Constructor and Description |
---|
KNNRegressionTrainer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkState(KNNRegressionModel mdl) |
<K,V> KNNRegressionModel |
fit(DatasetBuilder<K,V> datasetBuilder,
IgniteBiFunction<K,V,Vector> featureExtractor,
IgniteBiFunction<K,V,Double> lbExtractor)
Trains model based on the specified data.
|
<K,V> KNNRegressionModel |
updateModel(KNNRegressionModel mdl,
DatasetBuilder<K,V> datasetBuilder,
IgniteBiFunction<K,V,Vector> featureExtractor,
IgniteBiFunction<K,V,Double> lbExtractor)
Gets state of model in arguments, update in according to new data and return new model.
|
fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, setEnvironment, update, update, update, update, update
public <K,V> KNNRegressionModel fit(DatasetBuilder<K,V> datasetBuilder, IgniteBiFunction<K,V,Vector> featureExtractor, IgniteBiFunction<K,V,Double> lbExtractor)
fit
in class DatasetTrainer<KNNRegressionModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.datasetBuilder
- Dataset builder.featureExtractor
- Feature extractor.lbExtractor
- Label extractor.public <K,V> KNNRegressionModel updateModel(KNNRegressionModel mdl, DatasetBuilder<K,V> datasetBuilder, IgniteBiFunction<K,V,Vector> featureExtractor, IgniteBiFunction<K,V,Double> lbExtractor)
updateModel
in class DatasetTrainer<KNNRegressionModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.mdl
- Learned model.datasetBuilder
- Dataset builder.featureExtractor
- Feature extractor.lbExtractor
- Label extractor.protected boolean checkState(KNNRegressionModel mdl)
checkState
in class DatasetTrainer<KNNRegressionModel,Double>
mdl
- Model.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019