Package net.simplace.sim.util.statistics
Class SMAPE
java.lang.Object
net.simplace.sim.util.statistics.ErrorCalculationMethod
net.simplace.sim.util.statistics.SMAPE
Methods for calculating the symmetric mean absolute percentage error
See Wikipedia
- Author:
- Gunther Krauss
-
Field Summary
Fields inherited from class net.simplace.sim.util.statistics.ErrorCalculationMethod
count, sum
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataPair
(double a, double b) Adds a pair of observed and calculated data to the listGets the full name or a short description of the error methodgetLabel()
Gets the label of the calculation methoddouble
getValue()
Calculates the (error)value from the list of pairsboolean
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 net.simplace.sim.util.statistics.ErrorCalculationMethod
getWorstValue, init
-
Constructor Details
-
SMAPE
public SMAPE()
-
-
Method Details
-
addDataPair
public void addDataPair(double a, double b) Description copied from class:ErrorCalculationMethod
Adds a pair of observed and calculated data to the list- Specified by:
addDataPair
in classErrorCalculationMethod
-
getValue
public double getValue()Description copied from class:ErrorCalculationMethod
Calculates the (error)value from the list of pairs- Specified by:
getValue
in classErrorCalculationMethod
- Returns:
- errorvalue
-
isBetter
public boolean isBetter(double better, double worse) Description copied from class:ErrorCalculationMethod
Checks if the first value is better than the second value with respect to the calcualtion method.- Specified by:
isBetter
in classErrorCalculationMethod
- Returns:
- true if first value is better than second
-
getLabel
Description copied from class:ErrorCalculationMethod
Gets the label of the calculation method- Specified by:
getLabel
in classErrorCalculationMethod
- Returns:
- label
-
getDescription
Description copied from class:ErrorCalculationMethod
Gets the full name or a short description of the error method- Overrides:
getDescription
in classErrorCalculationMethod
- Returns:
- description or full name
-