|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.experiment.Stats
A class to store simple statistics
Field Summary | |
double |
count
The number of values seen |
double |
max
The maximum value seen, or Double.NaN if no values seen |
double |
mean
The mean of values at the last calculateDerived() call |
double |
min
The minimum value seen, or Double.NaN if no values seen |
double |
stdDev
The std deviation of values at the last calculateDerived() call |
double |
sum
The sum of values seen |
double |
sumSq
The sum of values squared seen |
Constructor Summary | |
Stats()
|
Method Summary | |
void |
add(double value)
Adds a value to the observed values |
void |
add(double value,
double n)
Adds a value that has been seen n times to the observed values |
void |
calculateDerived()
Tells the object to calculate any statistics that don't have their values automatically updated during add. |
static void |
main(java.lang.String[] args)
Tests the paired stats object from the command line. |
void |
subtract(double value)
Removes a value to the observed values (no checking is done that the value being removed was actually added). |
void |
subtract(double value,
double n)
Subtracts a value that has been seen n times from the observed values |
java.lang.String |
toString()
Returns a string summarising the stats so far. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public double count
public double sum
public double sumSq
public double stdDev
public double mean
public double min
public double max
Constructor Detail |
public Stats()
Method Detail |
public void add(double value)
value
- the observed valuepublic void add(double value, double n)
value
- the observed valuen
- the number of times to add valuepublic void subtract(double value)
value
- the observed valuepublic void subtract(double value, double n)
value
- the observed valuen
- the number of times to subtract valuepublic void calculateDerived()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
args
- ignored.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London