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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataPair(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 methoddoublegetValue()Calculates the (error)value from the list of pairsdoubleReturns the value that is considered worst by the error calculation methodvoidinit()Initializes the calculation methodbooleanisBetter(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:ErrorCalculationMethodInitializes the calculation method- Overrides:
initin classErrorCalculationMethod
-
getWorstValue
public double getWorstValue()Description copied from class:ErrorCalculationMethodReturns the value that is considered worst by the error calculation method- Overrides:
getWorstValuein classErrorCalculationMethod- Returns:
- worstValue
-
addDataPair
public void addDataPair(double observed, double calculated) Description copied from class:ErrorCalculationMethodAdds a pair of observed and calculated data to the list- Specified by:
addDataPairin classErrorCalculationMethod
-
getValue
public double getValue()Description copied from class:ErrorCalculationMethodCalculates the (error)value from the list of pairs- Specified by:
getValuein classErrorCalculationMethod- Returns:
- errorvalue
-
isBetter
public boolean isBetter(double better, double worse) Description copied from class:ErrorCalculationMethodChecks if the first value is better than the second value with respect to the calcualtion method.- Specified by:
isBetterin classErrorCalculationMethod- Returns:
- true if first value is better than second
-
getLabel
Description copied from class:ErrorCalculationMethodGets the label of the calculation method- Specified by:
getLabelin classErrorCalculationMethod- Returns:
- label
-
getDescription
Description copied from class:ErrorCalculationMethodGets the full name or a short description of the error method- Overrides:
getDescriptionin classErrorCalculationMethod- Returns:
- description or full name
-