Class EF
java.lang.Object
net.simplace.sim.util.statistics.ErrorCalculationMethod
net.simplace.sim.util.statistics.EF
Methods for calculating the model efficiency
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.doubleReturns the value that is considered worst by the error calculation method (the start value when searching the best value).voidinit()Resets the accumulated data for a new calculation.booleanisBetter(double better, double worse) Checks if the first value is better than the second one with respect to the calculation method (e.g.
-
Constructor Details
-
EF
public EF()
-
-
Method Details
-
init
public void init()Description copied from class:ErrorCalculationMethodResets the accumulated data for a new calculation.- Overrides:
initin classErrorCalculationMethod
-
getWorstValue
public double getWorstValue()Description copied from class:ErrorCalculationMethodReturns the value that is considered worst by the error calculation method (the start value when searching the best value).- Overrides:
getWorstValuein classErrorCalculationMethod- Returns:
- the worst value,
Double.MAX_VALUEby default
-
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)
-