Package net.simplace.sim.util.statistics
Class CorrelationCoefficient
java.lang.Object
net.simplace.sim.util.statistics.ErrorCalculationMethod
net.simplace.sim.util.statistics.CorrelationCoefficient
Methods for calculating the correlation coefficient
See D. Wallach, Working with Dynamic Crop Models, p. 22
- 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 observed, double calculated) 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 pairsdouble
Returns the value that is considered worst by the error calculation methodvoid
init()
Initializes the calculation methodboolean
isBetter
(double better, double worse) Checks if the first value is better than the second value with respect to the calcualtion method.
-
Constructor Details
-
CorrelationCoefficient
public CorrelationCoefficient()
-
-
Method Details
-
init
public void init()Description copied from class:ErrorCalculationMethod
Initializes the calculation method- Overrides:
init
in classErrorCalculationMethod
-
getWorstValue
public double getWorstValue()Description copied from class:ErrorCalculationMethod
Returns the value that is considered worst by the error calculation method- Overrides:
getWorstValue
in classErrorCalculationMethod
- Returns:
- worstValue
-
addDataPair
public void addDataPair(double observed, double calculated) 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
-