public class AdaptiveHistogram extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
protected static interface |
AdaptiveHistogram.ValueConversion
Auxiliary interface for inline functor object.
|
Constructor and Description |
---|
AdaptiveHistogram()
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(double value)
Adds a data point to the histogram.
|
long |
getAccumCount(double value)
Returns the cumulative density function for a given data point.
|
long |
getCount(double value)
Returns the number of data points stored in the same bucket as a given value.
|
protected int |
getCountPerNodeLimit()
This method is used by the internal data structure of the histogram to get the
limit of data points that should be counted at one bucket.
|
double |
getValueForPercentile(int percentile)
Returns the data point that splits the data set at a given percentile.
|
void |
normalize(double targetMin,
double targetMax)
Normalizes all the values to the desired range.
|
void |
reset()
Erases all data from the histogram.
|
void |
show()
Shows the histograms' underlying data structure.
|
ArrayList<Cell> |
toTable()
Return a table representing the data in this histogram.
|
public void reset()
public void addValue(double value)
value
- the data point to add.public long getCount(double value)
value
- the reference data point.public long getAccumCount(double value)
value
- the reference data point.public double getValueForPercentile(int percentile)
percentile
- the percentile at which the data set is split.protected int getCountPerNodeLimit()
public void normalize(double targetMin, double targetMax)
targetMin
- the target new minimum value.targetMax
- the target new maximum value.public void show()
public ArrayList<Cell> toTable()
Copyright © 2019. All rights reserved.