All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.experiment.Stats
java.lang.Object
|
+----weka.experiment.Stats
- public class Stats
- extends Object
A class to store simple statistics
- Version:
- $Revision: 1.3 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
count
- The number of values seen
-
max
- The maximum value seen
-
mean
- The mean of values at the last calculateDerived() call
-
min
- The minimum value seen
-
stdDev
- The std deviation of values at the last calculateDerived() call
-
sum
- The sum of values seen
-
sumSq
- The sum of values squared seen
-
Stats()
-
-
add(double)
- Adds a value to the observed values
-
add(double, double)
- Adds a value that has been seen n times to the observed values
-
calculateDerived()
- Tells the object to calculate any statistics that don't have their
values automatically updated during add.
-
subtract(double)
- Removes a value to the observed values (no checking is done
that the value being removed was actually added).
-
toString()
- Returns a string summarising the stats so far.
count
public double count
- The number of values seen
sum
public double sum
- The sum of values seen
sumSq
public double sumSq
- The sum of values squared seen
stdDev
public double stdDev
- The std deviation of values at the last calculateDerived() call
mean
public double mean
- The mean of values at the last calculateDerived() call
min
public double min
- The minimum value seen
max
public double max
- The maximum value seen
Stats
public Stats()
add
public void add(double value)
- Adds a value to the observed values
- Parameters:
- value - the observed value
add
public void add(double value,
double n)
- Adds a value that has been seen n times to the observed values
- Parameters:
- value - the observed value
- n - the number of times to add value
subtract
public void subtract(double value)
- Removes a value to the observed values (no checking is done
that the value being removed was actually added).
- Parameters:
- value - the observed value
calculateDerived
public void calculateDerived()
- Tells the object to calculate any statistics that don't have their
values automatically updated during add. Currently updates the mean
and standard deviation.
toString
public String toString()
- Returns a string summarising the stats so far.
- Returns:
- the summary string
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index WEKA's home