public class UnivariateEqualFrequencyHistogramEstimator extends Object implements UnivariateDensityEstimator, UnivariateIntervalEstimator, UnivariateQuantileEstimator
| Modifier and Type | Field and Description |
|---|---|
static double |
CONST
Constant for Gaussian density.
|
| Constructor and Description |
|---|
UnivariateEqualFrequencyHistogramEstimator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addValue(double value,
double weight)
Adds a value to the density estimator.
|
int |
getNumBins()
Gets the number of bins
|
boolean |
getUpdateWeightsOnly()
Gets whether only weights should be udpated.*
|
void |
initializeStatistics()
Triggers construction of estimator based on current data
and then initializes the statistics.
|
double |
logDensity(double value)
Returns the natural logarithm of the density estimate at the given
point.
|
static void |
main(String[] args)
Main method, used for testing this class.
|
double[][] |
predictIntervals(double conf)
Returns the interval for the given confidence value.
|
double |
predictQuantile(double percentage)
Returns the quantile for the given percentage.
|
void |
setNumBins(int numBins)
Sets the number of bins
|
void |
setUpdateWeightsOnly(boolean flag)
Sets whether only weights should be udpated.
|
String |
toString()
Returns textual description of this estimator.
|
public UnivariateEqualFrequencyHistogramEstimator()
public int getNumBins()
public void setNumBins(int numBins)
numBins - the number of binspublic void initializeStatistics()
public void setUpdateWeightsOnly(boolean flag)
public boolean getUpdateWeightsOnly()
public void addValue(double value,
double weight)
addValue in interface UnivariateDensityEstimatoraddValue in interface UnivariateIntervalEstimatoraddValue in interface UnivariateQuantileEstimatorvalue - the value to addweight - the weight of the valuepublic double[][] predictIntervals(double conf)
predictIntervals in interface UnivariateIntervalEstimatorconf - the confidence value in the interval [0, 1]public double predictQuantile(double percentage)
predictQuantile in interface UnivariateQuantileEstimatorpercentage - the percentagepublic double logDensity(double value)
logDensity in interface UnivariateDensityEstimatorvalue - the value at which to evaluatepublic String toString()
public static void main(String[] args)
Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.