|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dllearner.utilities.statistics.Stat
public class Stat
Utility class for calculating the mean and standard deviation of a given set of numbers. The class also contains convenience methods for printing values.
| Constructor Summary | |
|---|---|
Stat()
|
|
Stat(Set<Stat> stats)
Creates a new stat object by merging several stat objects. |
|
Stat(Stat stat1,
Stat stat2)
Creates a new stat object by merging two stat objects. |
|
| Method Summary | |
|---|---|
void |
addNumber(double number)
Add a number to this object. |
int |
getCount()
Gets the number of numbers. |
double |
getMax()
|
double |
getMean()
Gets the mean of all numbers. |
String |
getMeanAsPercentage()
Gets the mean of all numbers as percentage *100 so 0.5678 -> "56.78%" |
double |
getMin()
|
double |
getStandardDeviation()
Gets the standard deviation of all numbers. |
double |
getSum()
Gets the sum of all numbers. |
String |
prettyPrint()
|
String |
prettyPrint(String unit)
|
String |
prettyPrint(String unit,
DecimalFormat df)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Stat()
public Stat(Stat stat1,
Stat stat2)
stat1 - Statistical object 1.stat2 - Statistical object 2.public Stat(Set<Stat> stats)
stat1 - Statistical object 1.stat2 - Statistical object 2.| Method Detail |
|---|
public void addNumber(double number)
number - The new number.public int getCount()
public double getSum()
public double getMean()
public String getMeanAsPercentage()
public double getStandardDeviation()
public double getMin()
public double getMax()
public String prettyPrint()
public String prettyPrint(String unit)
public String prettyPrint(String unit,
DecimalFormat df)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||