Class ErrorCalculationMethod

java.lang.Object
net.simplace.sim.util.statistics.ErrorCalculationMethod
Direct Known Subclasses:
AgreementIndex, Bias, ConcordanceCorrelationCoefficient, CorrelationCoefficient, EF, MAE, MRE, MSE, RMAE, RMSE, RRMSE, SMAPE, VoidErrorCalculator

public abstract class ErrorCalculationMethod extends Object
Defines the abstract functions/procedures that a class needs to implement in order to be usable as an error calculation method by the LeastDifferenceSelector
Author:
Gunther Krauss
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    addDataPair(double observed, double calculated)
    Adds a pair of observed and calculated data to the list
    Gets the full name or a short description of the error method
    abstract String
    Gets the label of the calculation method
    abstract double
    Calculates the (error)value from the list of pairs
    double
    Returns the value that is considered worst by the error calculation method
    void
    Initializes the calculation method
    abstract boolean
    isBetter(double better, double worse)
    Checks if the first value is better than the second value with respect to the calcualtion method.

    Methods inherited from class java.lang.Object

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

    • count

      protected int count
    • sum

      protected double sum
  • Constructor Details

    • ErrorCalculationMethod

      public ErrorCalculationMethod()
  • Method Details

    • init

      public void init()
      Initializes the calculation method
    • getWorstValue

      public double getWorstValue()
      Returns the value that is considered worst by the error calculation method
      Returns:
      worstValue
    • addDataPair

      public abstract void addDataPair(double observed, double calculated)
      Adds a pair of observed and calculated data to the list
      Parameters:
      observed -
      calculated -
    • getValue

      public abstract double getValue()
      Calculates the (error)value from the list of pairs
      Returns:
      errorvalue
    • isBetter

      public abstract boolean isBetter(double better, double worse)
      Checks if the first value is better than the second value with respect to the calcualtion method.
      Parameters:
      better -
      worse -
      Returns:
      true if first value is better than second
    • getLabel

      public abstract String getLabel()
      Gets the label of the calculation method
      Returns:
      label
    • getDescription

      public String getDescription()
      Gets the full name or a short description of the error method
      Returns:
      description or full name