Class FitnessCriteria

java.lang.Object
llnl.gnem.core.util.MathFunctions.FitnessCriteria

public class FitnessCriteria extends Object
Author:
matzel1
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Double
    CoefficientOfVariation(float[] data)
    the coefficient of variation (CV) is a normalized measure of dispersion of a probability distribution.
    static Double
    CVRMSD(double[] data, double[] reference)
    The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE)) RMS = SUM((data - reference)^2) / SUM(reference^2)
    static Double
    CVRMSD(float[] data, float[] reference)
    The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE)) RMS = SUM((data - reference)^2) / SUM(reference^2)
    static Double
    CVRMSD(Map<Object,double[]> dataMap)
    The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE))
    static float[]
    Differential(float[] data, float[] reference)
     
    static Float
    MeanDifference(float[] data, float[] reference)
    The Mean Difference fitness criteria MD = SUM(data - reference) / SUM(reference)
    static Double
    NRMSD(float[] data, float[] reference)
    Normalized Root Mean Square Difference (NRMSD) RMSD/ (xmax - xmin)
    static Double
    RMSD(float[] data, float[] reference)
    Root Mean Square Difference (aka Root Mean Square Deviation (RMSD) or Root Mean Square Error (RMSE))
    static Double
    SumSquareDifference(double[] data, double[] reference)
    Calculate the sum of the square of the differences between two series SUM((data - reference)^2)
    static Double
    SumSquareDifference(float[] data, float[] reference)
    Calculate the sum of the square of the differences between two series SUM((data - reference)^2)
    static Double
    SumSquares(double[] data)
    Calculate the sum of the squares of the data series
    static Double
    SumSquares(float[] data)
    Calculate the sum of the squares of the data series

    Methods inherited from class java.lang.Object

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

    • FitnessCriteria

      public FitnessCriteria()
  • Method Details

    • Differential

      public static float[] Differential(float[] data, float[] reference)
      Parameters:
      data -
      reference -
      Returns:
    • SumSquareDifference

      public static Double SumSquareDifference(double[] data, double[] reference)
      Calculate the sum of the square of the differences between two series SUM((data - reference)^2)
      Parameters:
      data - - the first series as an array of doubles
      reference - - the reference series as an array of doubles
      Returns:
      the sum of the squares of the differences
    • SumSquareDifference

      public static Double SumSquareDifference(float[] data, float[] reference)
      Calculate the sum of the square of the differences between two series SUM((data - reference)^2)
      Parameters:
      data - - the first series as an array of floats
      reference - - the reference series as an array of floats
      Returns:
      the sum of the squares of the differences
    • SumSquares

      public static Double SumSquares(double[] data)
      Calculate the sum of the squares of the data series
      Parameters:
      data - - an array of doubles
      Returns:
      the sum of the squares of the series (NOTE unnormalized)
    • SumSquares

      public static Double SumSquares(float[] data)
      Calculate the sum of the squares of the data series
      Parameters:
      data - - an array of floats
      Returns:
      the sum of the squares of the series (NOTE unnormalized)
    • RMSD

      public static Double RMSD(float[] data, float[] reference)
      Root Mean Square Difference (aka Root Mean Square Deviation (RMSD) or Root Mean Square Error (RMSE))
      Parameters:
      data - - a data series as a float array
      reference - - a reference series as a float array
      Returns:
      the RMSD of the two series
    • NRMSD

      public static Double NRMSD(float[] data, float[] reference)
      Normalized Root Mean Square Difference (NRMSD) RMSD/ (xmax - xmin)
      Parameters:
      data - - a data series as a float array
      reference - - a reference series as a float array
      Returns:
      the Normalized RMSD of the two series
    • CVRMSD

      public static Double CVRMSD(float[] data, float[] reference)
      The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE)) RMS = SUM((data - reference)^2) / SUM(reference^2)
      Parameters:
      data - - an array of floats
      reference - - an array of floats (must be the same length as the data array)
      Returns:
      a single float measure of the RMS fit
    • CVRMSD

      public static Double CVRMSD(double[] data, double[] reference)
      The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE)) RMS = SUM((data - reference)^2) / SUM(reference^2)
      Parameters:
      data - - an array of doubles
      reference - - an array of doubles (must be the same length as the data array)
      Returns:
      a single double valued measure of the RMS fit
    • CVRMSD

      public static Double CVRMSD(Map<Object,double[]> dataMap)
      The Coefficient of Variation of the Root-Mean-Square Difference (aka CV(RMSD) or CV(RMSE))
      Parameters:
      dataMap - a Map of data and reference values to be compared note that the Map key is not used in the RMS fit procedure
      Returns:
      the single float valued measure of the RMS fit
    • MeanDifference

      public static Float MeanDifference(float[] data, float[] reference)
      The Mean Difference fitness criteria MD = SUM(data - reference) / SUM(reference)
      Parameters:
      data - - an array of floats
      reference - - an array of floats (must be the same length as the data array)
      Returns:
      a single float measure of the MD fit
    • CoefficientOfVariation

      public static Double CoefficientOfVariation(float[] data)
      the coefficient of variation (CV) is a normalized measure of dispersion of a probability distribution. AKA unitized risk or variation coefficient CV = stdev / mean This is only defined for non-zero mean, and is most useful for variables that are always positive.
      Parameters:
      data - - an array of floats
      Returns:
      CV = stdev(data) / mean(data)