public class GiniHistogram extends ImpurityHistogram implements ImpurityComputer<BootstrappedVector,GiniHistogram>
featureId
Constructor and Description |
---|
GiniHistogram(int sampleId,
Map<Double,Integer> lblMapping,
BucketMeta bucketMeta)
Creates an instance of GiniHistogram.
|
Modifier and Type | Method and Description |
---|---|
void |
addElement(BootstrappedVector vector)
Add object to histogram.
|
Set<Integer> |
buckets() |
Optional<NodeSplit> |
findBestSplit()
Returns best split point computed on histogram if it exists.
|
Optional<Double> |
getValue(Integer bucketId) |
boolean |
isEqualTo(GiniHistogram other)
Compares histogram with other and returns true if they are equals
|
GiniHistogram |
plus(GiniHistogram other) |
checkAndReturnSplitValue
public GiniHistogram(int sampleId, Map<Double,Integer> lblMapping, BucketMeta bucketMeta)
sampleId
- Sample id.lblMapping
- Label mapping.bucketMeta
- Bucket meta.public void addElement(BootstrappedVector vector)
addElement
in interface Histogram<BootstrappedVector,GiniHistogram>
vector
- Value.public Optional<Double> getValue(Integer bucketId)
getValue
in interface Histogram<BootstrappedVector,GiniHistogram>
bucketId
- Bucket id.public GiniHistogram plus(GiniHistogram other)
plus
in interface Histogram<BootstrappedVector,GiniHistogram>
other
- Other histogram.public Optional<NodeSplit> findBestSplit()
findBestSplit
in interface ImpurityComputer<BootstrappedVector,GiniHistogram>
public Set<Integer> buckets()
buckets
in interface Histogram<BootstrappedVector,GiniHistogram>
public boolean isEqualTo(GiniHistogram other)
isEqualTo
in interface Histogram<BootstrappedVector,GiniHistogram>
other
- Other histogram.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024