public final class HistogramDensity extends Object implements EmpiricalDensity
Constructor and Description |
---|
HistogramDensity(List<Interval<Double>> intervals,
List<Double> intervalCounts)
Constructs an empirical density function.
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double x)
Calculates an approximate value for cdf(x).
|
double |
inverseCdf(double probability)
Calculates an approximate value for the inverse cumulative distribution function.
|
static HistogramDensity |
learn(Iterable<WeightedValue> values,
HistogramDensityOptions options)
Learns a univariate empirical density from data.
|
public double inverseCdf(double probability)
inverseCdf
in interface EmpiricalDensity
probability
- The probability p at which to return x when p = Cdf(x) .public double cdf(double x)
cdf
in interface EmpiricalDensity
x
- The value at which to evaluate the cdf.public static HistogramDensity learn(Iterable<WeightedValue> values, HistogramDensityOptions options)
values
- The values to learn from.options
- Options affecting the learning process.Copyright © 2021. All rights reserved.