Class Normalizer

java.lang.Object
org.moeaframework.core.indicator.Normalizer

public class Normalizer extends Object
Normalizes populations so that all objectives reside in the range [0, 1] with the optimum directed towards -1d/0d. Infeasible solutions are removed prior to normalization. Bounds are derived from the supplied population, which should typically be a reference set for consistency.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Normalizer(double[] minimum, double[] maximum)
    Constructs a normalizer for normalizing population so that all objectives reside in the range [0, 1].
    Normalizer(Population population)
    Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1].
    Normalizer(Population population, double delta)
    Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1].
    Normalizer(Population population, double[] referencePoint)
    Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1].
  • Method Summary

    Modifier and Type
    Method
    Description
    static Normalizer
    Constructs a normalizer that does not perform any normalization, instead using the objective values as-is.
    Returns a new non-dominated population containing the normalized solutions from the specified population.
    normalize(Population population)
    Returns a new population containing the normalized solutions from the specified population.
    protected void
    Performs the actual normalization by modifying the objective values in place.
    static Normalizer
    of(double[] minimum, double[] maximum)
    Constructs a normalizer with explicit lower and upper bounds.
    static Normalizer
    of(Population population)
    Constructs a normalizer with bounds derived from the given population, typically a reference set.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Normalizer

      public Normalizer(Population population)
      Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1]. This constructor derives the minimum and maximum bounds from the given population.
      Parameters:
      population - the population defining the minimum and maximum bounds
      Throws:
      IllegalArgumentException - if the population contains fewer than two feasible solutions, or if there exists an objective with an empty range
    • Normalizer

      public Normalizer(Population population, double delta)
      Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1]. This constructor derives the minimum and maximum bounds from the given population and a given delta. This delta offsets the maximum bounds, typically for hypervolume calculations, to ensure there is a non-zero distance between the extremal points and the reference point.
      Parameters:
      population - the population defining the minimum and maximum bounds
      delta - a delta added to the maximum value
      Throws:
      IllegalArgumentException - if the population contains fewer than two feasible solutions, or if there exists an objective with an empty range
    • Normalizer

      public Normalizer(Population population, double[] referencePoint)
      Constructs a normalizer for normalizing populations so that all objectives reside in the range [0, 1]. This constructor derives the minimum and maximum bounds from the given population and a given reference point. This is typically used by hypervolume calculations, which measures the volume of spacing between each solution and the reference point.
      Parameters:
      population - the population defining the minimum and maximum bounds
      referencePoint - the reference point; if null, the bounds are based on the population
      Throws:
      IllegalArgumentException - if the population contains fewer than two feasible solutions, or if there exists an objective with an empty range
    • Normalizer

      public Normalizer(double[] minimum, double[] maximum)
      Constructs a normalizer for normalizing population so that all objectives reside in the range [0, 1]. This constructor allows defining the minimum and maximum bounds explicitly.
      Parameters:
      minimum - the minimum bounds of each objective
      maximum - the maximum bounds of each objective
  • Method Details

    • normalize

      public NondominatedPopulation normalize(NondominatedPopulation population)
      Returns a new non-dominated population containing the normalized solutions from the specified population.
      Parameters:
      population - the population
      Returns:
      a new non-dominated population containing the normalized solutions from the specified population
    • normalize

      public Population normalize(Population population)
      Returns a new population containing the normalized solutions from the specified population.
      Parameters:
      population - the population
      Returns:
      a new population containing the normalized solutions from the specified population
    • normalizeInPlace

      protected void normalizeInPlace(Population population)
      Performs the actual normalization by modifying the objective values in place. While we typically discourage modifying solutions in a population, we allow it here because normalization does not change the structure of the population (meaning dominance, rankings, etc. are unchanged).
      Parameters:
      population - the unnormalized population
    • of

      public static Normalizer of(Population population)
      Constructs a normalizer with bounds derived from the given population, typically a reference set.
      Parameters:
      population - the population defining the minimum and maximum bounds
      Returns:
      the normalizer
      Throws:
      IllegalArgumentException - if the population contains fewer than two feasible solutions, or if there exists an objective with an empty range
    • of

      public static Normalizer of(double[] minimum, double[] maximum)
      Constructs a normalizer with explicit lower and upper bounds. Note that if the length of the given arrays does not match the required number of objectives, the last value is repeated for all remaining objectives.
      Parameters:
      minimum - the minimum bounds of each objective
      maximum - the maximum bounds of each objective
      Returns:
      the normalizer
    • none

      public static Normalizer none()
      Constructs a normalizer that does not perform any normalization, instead using the objective values as-is.
      Returns:
      the normalizer