Package org.moeaframework.analysis
Class IndicatorStatistics
java.lang.Object
org.moeaframework.analysis.IndicatorStatistics
- All Implemented Interfaces:
Displayable
,Formattable<String>
Utility for collecting end-of-run approximation sets, evaluating a performance indicator, and displaying statistical
results.
-
Constructor Summary
ConstructorDescriptionIndicatorStatistics
(Indicator indicator) Constructs a new indicator statistics object with the given indicator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(String name, NondominatedPopulation result) Adds the given end-of-run approximation set.void
addAll
(String name, Iterable<NondominatedPopulation> results) Adds the collection of end-of-run approximation sets.Returns the contents of this object as aTabularData
instance, which can be used to save, print, or format the data in various ways.Returns the group names.double
Returns the inter-quartile range (IQR) indicator value for the given group, which is the range between the 75-th percentile and the 25-th percentile.double
Returns the maximum indicator value for the given group.double
Returns the mean or average indicator value for the given group.double
Returns the median indicator value for the given group.double
Returns the minimum indicator value for the given group.int
Returns the number of results recorded for the given group.double
getStatistic
(String name, org.apache.commons.math3.stat.descriptive.UnivariateStatistic statistic) Returns the value of the given custom statistic.getStatisticallySimilar
(double significanceLevel) Computes and returns all pairs that are statistically similar.getStatisticallySimilar
(String name, double significanceLevel) Computes and returns the groups that are statistically similar to the given group.double[]
Returns the indicator values for the given group.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.util.format.Displayable
display
-
Constructor Details
-
IndicatorStatistics
Constructs a new indicator statistics object with the given indicator.- Parameters:
indicator
- the performance indicator
-
-
Method Details
-
add
Adds the given end-of-run approximation set.- Parameters:
name
- the group nameresult
- the end-of-run approximation set
-
addAll
Adds the collection of end-of-run approximation sets.- Parameters:
name
- the group nameresults
- the collection of end-of-run approximation sets
-
getGroupNames
Returns the group names.- Returns:
- the group names
-
getN
Returns the number of results recorded for the given group.- Parameters:
name
- the group name- Returns:
- the count
-
getMin
Returns the minimum indicator value for the given group.- Parameters:
name
- the group name- Returns:
- the minimum value
-
getMax
Returns the maximum indicator value for the given group.- Parameters:
name
- the group name- Returns:
- the maximum value
-
getMean
Returns the mean or average indicator value for the given group.- Parameters:
name
- the group name- Returns:
- the mean value
-
getMedian
Returns the median indicator value for the given group.- Parameters:
name
- the group name- Returns:
- the median value
-
getIQR
Returns the inter-quartile range (IQR) indicator value for the given group, which is the range between the 75-th percentile and the 25-th percentile.- Parameters:
name
- the group name- Returns:
- the IQR value
-
getStatistic
public double getStatistic(String name, org.apache.commons.math3.stat.descriptive.UnivariateStatistic statistic) Returns the value of the given custom statistic.- Parameters:
name
- the group namestatistic
- the custom statistic- Returns:
- the statistic value
-
getValues
Returns the indicator values for the given group.- Parameters:
name
- the group name- Returns:
- the indicator values
-
getStatisticallySimilar
Computes and returns the groups that are statistically similar to the given group.- Parameters:
name
- the given groupsignificanceLevel
- the level of significance- Returns:
- the other groups that are statistically similar
- See Also:
-
getStatisticallySimilar
public List<org.apache.commons.lang3.tuple.Pair<String,String>> getStatisticallySimilar(double significanceLevel) Computes and returns all pairs that are statistically similar.First applies the non-parametric Kruskal-Wallis test to determine if the medians are the same between
N
groups. If differences are detected, then the Mann-Whitney U test is applied to allN*(N-1)/2
pairs. Starting with the single test against all groups results in less overall error than using just pairwise tests.- Parameters:
significanceLevel
- the level of significance- Returns:
- the statistically similar pairs
-
asTabularData
Description copied from interface:Formattable
Returns the contents of this object as aTabularData
instance, which can be used to save, print, or format the data in various ways.- Specified by:
asTabularData
in interfaceFormattable<String>
- Returns:
- the
TabularData
instance
-