Class MAE
java.lang.Object
net.simplace.sim.util.statistics.ErrorCalculationMethod
net.simplace.sim.util.statistics.MAE
Methods for calculating the mean absolute error
See D. Wallach, Working with Dynamic Crop Models, p. 22
- Author:
- Gunther Krauss
-
Field Summary
Fields inherited from class ErrorCalculationMethod
count, sum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataPair(double observed, double calculated) Adds a pair of observed and calculated values.getLabel()doublegetValue()Calculates the measure from the added pairs.booleanisBetter(double better, double worse) Checks if the first value is better than the second one with respect to the calculation method (e.g.Methods inherited from class ErrorCalculationMethod
getWorstValue, init
-
Constructor Details
-
MAE
public MAE()
-
-
Method Details
-
addDataPair
public void addDataPair(double observed, double calculated) Description copied from class:ErrorCalculationMethodAdds a pair of observed and calculated values.- Specified by:
addDataPairin classErrorCalculationMethod- Parameters:
observed- the observed (measured) valuecalculated- the calculated (simulated) value
-
getValue
public double getValue()Description copied from class:ErrorCalculationMethodCalculates the measure from the added pairs.- Specified by:
getValuein classErrorCalculationMethod- Returns:
- the value of the measure (the worst value if no pairs were added)
-
isBetter
public boolean isBetter(double better, double worse) Description copied from class:ErrorCalculationMethodChecks if the first value is better than the second one with respect to the calculation method (e.g. smaller for errors, closer to 1 for model efficiency).- Specified by:
isBetterin classErrorCalculationMethod- Parameters:
better- the value that is checked to be betterworse- the value to compare with- Returns:
trueif the first value is better than the second
-
getLabel
- Specified by:
getLabelin classErrorCalculationMethod- Returns:
- the label (abbreviation) of the calculation method, e.g.
RMSE
-
getDescription
- Overrides:
getDescriptionin classErrorCalculationMethod- Returns:
- the full name or a short description of the method (empty by default)
-