Class IndicatorStatistics

java.lang.Object
org.moeaframework.analysis.IndicatorStatistics
All Implemented Interfaces:
Displayable, Formattable<String>

public class IndicatorStatistics extends Object implements Formattable<String>
Utility for collecting end-of-run approximation sets, evaluating a performance indicator, and displaying statistical results.
  • Constructor Details

    • IndicatorStatistics

      public IndicatorStatistics(Indicator indicator)
      Constructs a new indicator statistics object with the given indicator.
      Parameters:
      indicator - the performance indicator
  • Method Details

    • add

      public void add(String name, NondominatedPopulation result)
      Adds the given end-of-run approximation set.
      Parameters:
      name - the group name
      result - the end-of-run approximation set
    • addAll

      public void addAll(String name, Iterable<NondominatedPopulation> results)
      Adds the collection of end-of-run approximation sets.
      Parameters:
      name - the group name
      results - the collection of end-of-run approximation sets
    • getGroupNames

      public Set<String> getGroupNames()
      Returns the group names.
      Returns:
      the group names
    • getN

      public int getN(String name)
      Returns the number of results recorded for the given group.
      Parameters:
      name - the group name
      Returns:
      the count
    • getMin

      public double getMin(String name)
      Returns the minimum indicator value for the given group.
      Parameters:
      name - the group name
      Returns:
      the minimum value
    • getMax

      public double getMax(String name)
      Returns the maximum indicator value for the given group.
      Parameters:
      name - the group name
      Returns:
      the maximum value
    • getMean

      public double getMean(String name)
      Returns the mean or average indicator value for the given group.
      Parameters:
      name - the group name
      Returns:
      the mean value
    • getMedian

      public double getMedian(String name)
      Returns the median indicator value for the given group.
      Parameters:
      name - the group name
      Returns:
      the median value
    • getIQR

      public double getIQR(String name)
      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 name
      statistic - the custom statistic
      Returns:
      the statistic value
    • getValues

      public double[] getValues(String name)
      Returns the indicator values for the given group.
      Parameters:
      name - the group name
      Returns:
      the indicator values
    • getStatisticallySimilar

      public List<String> getStatisticallySimilar(String name, double significanceLevel)
      Computes and returns the groups that are statistically similar to the given group.
      Parameters:
      name - the given group
      significanceLevel - 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 all N*(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

      public TabularData<String> asTabularData()
      Description copied from interface: Formattable
      Returns the contents of this object as a TabularData instance, which can be used to save, print, or format the data in various ways.
      Specified by:
      asTabularData in interface Formattable<String>
      Returns:
      the TabularData instance