|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.estimators.UnivariateEqualFrequencyHistogramEstimator
public class UnivariateEqualFrequencyHistogramEstimator
Simple histogram density estimator. Uses equal-frequency histograms based on the specified number of bins (default: 10).
Field Summary | |
---|---|
static double |
CONST
Constant for Gaussian density. |
Constructor Summary | |
---|---|
UnivariateEqualFrequencyHistogramEstimator()
|
Method Summary | |
---|---|
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(java.lang.String[] args)
Main method, used for testing this class. |
double[][] |
predictIntervals(double conf)
Returns the interval for the given confidence value. |
void |
setNumBins(int numBins)
Sets the number of bins |
void |
setUpdateWeightsOnly(boolean flag)
Sets whether only weights should be udpated. |
java.lang.String |
toString()
Returns textual description of this estimator. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final double CONST
Constructor Detail |
---|
public UnivariateEqualFrequencyHistogramEstimator()
Method Detail |
---|
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 UnivariateDensityEstimator
addValue
in interface UnivariateIntervalEstimator
value
- the value to addweight
- the weight of the valuepublic double[][] predictIntervals(double conf)
predictIntervals
in interface UnivariateIntervalEstimator
conf
- the confidence value in the interval [0, 1]
public double logDensity(double value)
logDensity
in interface UnivariateDensityEstimator
value
- the value at which to evaluate
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |