Class CorrelationCriterion

java.lang.Object
adaa.analytics.rules.logic.performance.AbstractPerformanceCounter
adaa.analytics.rules.logic.performance.CorrelationCriterion

public class CorrelationCriterion extends AbstractPerformanceCounter
Computes the empirical corelation coefficient 'r' between label and prediction. For P=prediction, L=label, V=Variance, Cov=Covariance we calculate r by:
Cov(L,P) / sqrt(V(L)*V(P)).

Implementation hint: this implementation intensionally recomputes the mean and variance of prediction and label despite the fact that they are available by the Attribute objects. The reason: it can happen, that there are some examples which have a NaN as prediction or label, but not both. In this case, mean and variance stored in tie Attributes and computed here can differ.