T - Type of leaf statistic.public abstract class LeafValuesComputer<T> extends Object implements Serializable
| Constructor and Description |
|---|
LeafValuesComputer() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addElementToLeafStatistic(T leafStatAggr,
BootstrappedVector vec,
int sampleId)
Save vector to leaf statistic.
|
protected abstract double |
computeLeafValue(T stat)
Compute value from leaf based on statistics on labels corresponds to leaf.
|
protected abstract T |
createLeafStatsAggregator(int sampleId)
Creates an instance of leaf statistics aggregator in according to concrete algorithm based on RandomForest.
|
protected abstract T |
mergeLeafStats(T leftStats,
T rightStats)
Merge statistics for same leafs.
|
void |
setValuesForLeaves(ArrayList<TreeRoot> roots,
Dataset<EmptyContext,BootstrappedDatasetPartition> dataset)
Takes a list of all built trees and in one map-reduceImpurityStatistics step collect statistics for evaluating
leaf-values for each tree and sets values for leaves.
|
public void setValuesForLeaves(ArrayList<TreeRoot> roots, Dataset<EmptyContext,BootstrappedDatasetPartition> dataset)
roots - Learned trees.dataset - Dataset.protected abstract void addElementToLeafStatistic(T leafStatAggr, BootstrappedVector vec, int sampleId)
leafStatAggr - Leaf statistics aggregator.vec - Vector.sampleId - Sample id.protected abstract T mergeLeafStats(T leftStats, T rightStats)
leftStats - First leaf stat aggregator.rightStats - Second leaf stat aggregator.protected abstract T createLeafStatsAggregator(int sampleId)
sampleId - Sample id.protected abstract double computeLeafValue(T stat)
stat - Leaf statistics.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 8.9.23-p1 Release Date : November 19 2025