public class ANNClassificationTrainer extends SingleLabelDatasetTrainer<ANNClassificationModel>
Modifier and Type | Class and Description |
---|---|
static class |
ANNClassificationTrainer.CentroidStat
Service class used for statistics.
|
DatasetTrainer.EmptyDatasetException
envBuilder, environment
Constructor and Description |
---|
ANNClassificationTrainer() |
Modifier and Type | Method and Description |
---|---|
<K,V> ANNClassificationModel |
fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
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.
|
boolean |
isUpdateable(ANNClassificationModel mdl) |
protected <K,V> ANNClassificationModel |
updateModel(ANNClassificationModel mdl,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> extractor)
Trains new model taken previous one as a first approximation.
|
ANNClassificationTrainer |
withDistance(DistanceMeasure distance)
Set up the distance.
|
ANNClassificationTrainer |
withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
Changes learning Environment.
|
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.
|
fit, fit, fit, fit, fit, fit, getLastTrainedModelOrThrowEmptyDatasetException, identityTrainer, learningEnvironment, update, update, update, update, update, withConvertedLabels
public <K,V> ANNClassificationModel fitWithInitializedDeployingContext(DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
fitWithInitializedDeployingContext
in class DatasetTrainer<ANNClassificationModel,Double>
K
- Type of a key in upstream
data.V
- Type of a value in upstream
data.datasetBuilder
- Dataset builder.extractor
- Mapping from upstream entry to LabeledVector
.protected <K,V> ANNClassificationModel updateModel(ANNClassificationModel mdl, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> extractor)
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.extractor
- Extractor of UpstreamEntry
into LabeledVector
.public boolean isUpdateable(ANNClassificationModel mdl)
isUpdateable
in class DatasetTrainer<ANNClassificationModel,Double>
mdl
- Model.public ANNClassificationTrainer withEnvironmentBuilder(LearningEnvironmentBuilder envBuilder)
withEnvironmentBuilder
in class DatasetTrainer<ANNClassificationModel,Double>
envBuilder
- Learning environment builder.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.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024