K
- Type of a key in upstream data.V
- Type of a value in upstream data.public abstract class ConvergenceChecker<K,V> extends Object implements Serializable
Constructor and Description |
---|
ConvergenceChecker(long sampleSize,
IgniteFunction<Double,Double> externalLbToInternalMapping,
Loss loss,
DatasetBuilder<K,V> datasetBuilder,
Preprocessor<K,V> preprocessor,
double precision)
Constructs an instance of ConvergenceChecker.
|
Modifier and Type | Method and Description |
---|---|
double |
computeError(Vector features,
Double answer,
ModelsComposition currMdl)
Compute error for the specific vector of dataset.
|
abstract Double |
computeMeanErrorOnDataset(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset,
ModelsComposition mdl)
Compute error for given model on learning dataset.
|
boolean |
isConverged(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset,
ModelsComposition currMdl)
Checks convergency on dataset.
|
boolean |
isConverged(LearningEnvironmentBuilder envBuilder,
DatasetBuilder<K,V> datasetBuilder,
ModelsComposition currMdl)
Checks convergency on dataset.
|
public ConvergenceChecker(long sampleSize, IgniteFunction<Double,Double> externalLbToInternalMapping, Loss loss, DatasetBuilder<K,V> datasetBuilder, Preprocessor<K,V> preprocessor, double precision)
sampleSize
- Sample size.externalLbToInternalMapping
- External label to internal mapping.loss
- Loss gradient.datasetBuilder
- Dataset builder.preprocessor
- Upstream preprocessor.precision
- Precision.FeatureMatrixWithLabelsOnHeapDataBuilder.javapublic boolean isConverged(LearningEnvironmentBuilder envBuilder, DatasetBuilder<K,V> datasetBuilder, ModelsComposition currMdl)
envBuilder
- Learning environment builder.currMdl
- Current model.public boolean isConverged(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset, ModelsComposition currMdl)
dataset
- Dataset.currMdl
- Current model.public abstract Double computeMeanErrorOnDataset(Dataset<EmptyContext,? extends FeatureMatrixWithLabelsOnHeapData> dataset, ModelsComposition mdl)
dataset
- Learning dataset.mdl
- Model.public double computeError(Vector features, Double answer, ModelsComposition currMdl)
currMdl
- Current model.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024