|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.estimators.PoissonEstimator
Simple probability estimator that places a single Poisson distribution over the observed values.
Field Summary | |
private double |
m_Lambda
The average number of times an event occurs in an interval. |
private double |
m_NumValues
The number of values seen |
private double |
m_SumOfValues
The sum of the values seen |
Constructor Summary | |
PoissonEstimator()
|
Method Summary | |
void |
addValue(double data,
double weight)
Add a new data value to the current estimator. |
double |
getProbability(double data)
Get a probability estimate for a value |
private double |
logFac(double x)
Calculates the log factorial of a number. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
private double |
Poisson(double x)
Returns value for Poisson distribution |
java.lang.String |
toString()
Display a representation of this estimator |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private double m_NumValues
private double m_SumOfValues
private double m_Lambda
Constructor Detail |
public PoissonEstimator()
Method Detail |
private double logFac(double x)
x
- input number.
private double Poisson(double x)
x
- the argument to the kernel function
public void addValue(double data, double weight)
addValue
in interface Estimator
data
- the new data valueweight
- the weight assigned to the data valuepublic double getProbability(double data)
getProbability
in interface Estimator
data
- the value to estimate the probability of
public java.lang.String toString()
public static void main(java.lang.String[] argv)
argv
- should contain a sequence of numeric values
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |