Package net.simplace.sim.util.statistics
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
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddDataPair(double observed, double calculated) Adds a pair of observed and calculated data to the listGets the full name or a short description of the error methodabstract StringgetLabel()Gets the label of the calculation methodabstract doublegetValue()Calculates the (error)value from the list of pairsdoubleReturns the value that is considered worst by the error calculation methodvoidinit()Initializes the calculation methodabstract booleanisBetter(double better, double worse) Checks if the first value is better than the second value with respect to the calcualtion method.
-
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
Gets the label of the calculation method- Returns:
- label
-
getDescription
Gets the full name or a short description of the error method- Returns:
- description or full name
-