public class ANNClassificationTrainer extends SingleLabelDatasetTrainer<ANNClassificationModel>
Modifier and Type | Class and Description |
---|---|
static class |
ANNClassificationTrainer.CentroidStat
Service class used for statistics.
|
DatasetTrainer.EmptyDatasetException
environment
Constructor and Description |
---|
ANNClassificationTrainer() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkState(ANNClassificationModel mdl) |
<K,V> ANNClassificationModel |
fit(DatasetBuilder<K,V> datasetBuilder,
IgniteBiFunction<K,V,Vector> featureExtractor,
IgniteBiFunction<K,V,Double> lbExtractor)
Trains model based on the specified data.
|
DistanceMeasure |
getDistance()
Gets the distance.
|
double |
getEpsilon()
Gets the epsilon.
|
int |
getK()
Gets the amount of clusters.
|
int |
getMaxIterations()
Gets the max number of iterations before convergence.
|
long |
getSeed()
Gets the seed number.
|
protected <K,V> ANNClassificationModel |
updateModel(ANNClassificationModel 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.
|
ANNClassificationTrainer |
withDistance(DistanceMeasure distance)
Set up the distance.
|
ANNClassificationTrainer |
withEpsilon(double epsilon)
Set up the epsilon.
|
ANNClassificationTrainer |
withK(int k)
Set up the amount of clusters.
|
ANNClassificationTrainer |
withMaxIterations(int maxIterations)
Set up the max number of iterations before convergence.
|
ANNClassificationTrainer |
withSeed(long seed)
Set up the seed.
|
fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, setEnvironment, update, update, update, update, update
public <K,V> ANNClassificationModel fit(DatasetBuilder<K,V> datasetBuilder, IgniteBiFunction<K,V,Vector> featureExtractor, IgniteBiFunction<K,V,Double> lbExtractor)
fit
in class DatasetTrainer<ANNClassificationModel,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.protected <K,V> ANNClassificationModel updateModel(ANNClassificationModel mdl, DatasetBuilder<K,V> datasetBuilder, IgniteBiFunction<K,V,Vector> featureExtractor, IgniteBiFunction<K,V,Double> lbExtractor)
updateModel
in class DatasetTrainer<ANNClassificationModel,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(ANNClassificationModel mdl)
checkState
in class DatasetTrainer<ANNClassificationModel,Double>
mdl
- Model.public int getK()
public ANNClassificationTrainer withK(int k)
k
- The parameter value.public int getMaxIterations()
public ANNClassificationTrainer withMaxIterations(int maxIterations)
maxIterations
- The parameter value.public double getEpsilon()
public ANNClassificationTrainer withEpsilon(double epsilon)
epsilon
- The parameter value.public DistanceMeasure getDistance()
public ANNClassificationTrainer withDistance(DistanceMeasure distance)
distance
- The parameter value.public long getSeed()
public ANNClassificationTrainer withSeed(long seed)
seed
- The parameter value.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019