public class ClassifierLeafValuesComputer extends LeafValuesComputer<ObjectHistogram<BootstrappedVector>>
LeafValuesComputer
for classification task.Constructor and Description |
---|
ClassifierLeafValuesComputer(Map<Double,Integer> lblMapping)
Creates an instance of ClassifierLeafValuesComputer.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addElementToLeafStatistic(ObjectHistogram<BootstrappedVector> leafStatAggr,
BootstrappedVector vec,
int sampleId)
Save vector to leaf statistic.
|
protected double |
computeLeafValue(ObjectHistogram<BootstrappedVector> stat)
Returns the most frequent value in according to statistic.
|
protected ObjectHistogram<BootstrappedVector> |
createLeafStatsAggregator(int sampleId)
Creates an instance of leaf statistics aggregator in according to concrete algorithm based on RandomForest.
|
protected ObjectHistogram<BootstrappedVector> |
mergeLeafStats(ObjectHistogram<BootstrappedVector> leftStats,
ObjectHistogram<BootstrappedVector> rightStats)
Merge statistics for same leafs.
|
setValuesForLeaves
protected void addElementToLeafStatistic(ObjectHistogram<BootstrappedVector> leafStatAggr, BootstrappedVector vec, int sampleId)
addElementToLeafStatistic
in class LeafValuesComputer<ObjectHistogram<BootstrappedVector>>
leafStatAggr
- Leaf statistics aggregator.vec
- Vector.sampleId
- Sample id.protected ObjectHistogram<BootstrappedVector> mergeLeafStats(ObjectHistogram<BootstrappedVector> leftStats, ObjectHistogram<BootstrappedVector> rightStats)
mergeLeafStats
in class LeafValuesComputer<ObjectHistogram<BootstrappedVector>>
leftStats
- First leaf stat aggregator.rightStats
- Second leaf stat aggregator.protected ObjectHistogram<BootstrappedVector> createLeafStatsAggregator(int sampleId)
createLeafStatsAggregator
in class LeafValuesComputer<ObjectHistogram<BootstrappedVector>>
sampleId
- Sample id.protected double computeLeafValue(ObjectHistogram<BootstrappedVector> stat)
computeLeafValue
in class LeafValuesComputer<ObjectHistogram<BootstrappedVector>>
stat
- Leaf statistics.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024