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) |
checkAndReturnSplitValuepublic 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.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.14.0 Release Date : September 29 2022