public abstract class ImpurityAggregator
extends Object
implements scala.Serializable
Constructor and Description |
---|
ImpurityAggregator(int statsSize) |
Modifier and Type | Method and Description |
---|---|
abstract ImpurityCalculator |
getCalculator(double[] allStats,
int offset)
Get an
ImpurityCalculator for a (node, feature, bin). |
void |
merge(double[] allStats,
int offset,
int otherOffset)
Merge the stats from one bin into another.
|
int |
statsSize() |
abstract void |
update(double[] allStats,
int offset,
double label,
double instanceWeight)
Update stats for one (node, feature, bin) with the given label.
|
public int statsSize()
public void merge(double[] allStats, int offset, int otherOffset)
allStats
- Flat stats array, with stats for this (node, feature, bin) contiguous.offset
- Start index of stats for (node, feature, bin) which is modified by the merge.otherOffset
- Start index of stats for (node, feature, other bin) which is not modified.public abstract void update(double[] allStats, int offset, double label, double instanceWeight)
allStats
- Flat stats array, with stats for this (node, feature, bin) contiguous.offset
- Start index of stats for this (node, feature, bin).public abstract ImpurityCalculator getCalculator(double[] allStats, int offset)
ImpurityCalculator
for a (node, feature, bin).allStats
- Flat stats array, with stats for this (node, feature, bin) contiguous.offset
- Start index of stats for this (node, feature, bin).