Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/MultiObjective/SymbolicClassificationMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 12669)
@@ -57,17 +57,17 @@
       OnlineCalculatorError errorState;
 
-      double r2;
+      double r;
       if (applyLinearScaling) {
-        var r2Calculator = new OnlinePearsonsRSquaredCalculator();
-        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
-        errorState = r2Calculator.ErrorState;
-        r2 = r2Calculator.RSquared;
+        var rCalculator = new OnlinePearsonsRCalculator();
+        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
+        errorState = rCalculator.ErrorState;
+        r = rCalculator.R;
       } else {
         IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
-        r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
+        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
       }
 
-      if (errorState != OnlineCalculatorError.None) r2 = double.NaN;
-      return new double[2] { r2, solution.Length };
+      if (errorState != OnlineCalculatorError.None) r = double.NaN;
+      return new double[2] { r*r, solution.Length };
 
     }
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SingleObjective/SymbolicClassificationSingleObjectivePearsonRSquaredEvaluator.cs	(revision 12669)
@@ -57,16 +57,16 @@
       OnlineCalculatorError errorState;
 
-      double r2;
+      double r;
       if (applyLinearScaling) {
-        var r2Calculator = new OnlinePearsonsRSquaredCalculator();
-        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
-        errorState = r2Calculator.ErrorState;
-        r2 = r2Calculator.RSquared;
+        var rCalculator = new OnlinePearsonsRCalculator();
+        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
+        errorState = rCalculator.ErrorState;
+        r = rCalculator.R;
       } else {
         IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
-        r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
+        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
       }
       if (errorState != OnlineCalculatorError.None) return double.NaN;
-      return r2;
+      return r*r;
     }
 
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/MultiObjective/SymbolicRegressionMultiObjectivePearsonRSquaredTreeSizeEvaluator.cs	(revision 12669)
@@ -57,17 +57,17 @@
       OnlineCalculatorError errorState;
 
-      double r2;
+      double r;
       if (applyLinearScaling) {
-        var r2Calculator = new OnlinePearsonsRSquaredCalculator();
-        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
-        errorState = r2Calculator.ErrorState;
-        r2 = r2Calculator.RSquared;
+        var rCalculator = new OnlinePearsonsRCalculator();
+        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
+        errorState = rCalculator.ErrorState;
+        r = rCalculator.R;
       } else {
         IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
-        r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
+        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
       }
 
-      if (errorState != OnlineCalculatorError.None) r2 = double.NaN;
-      return new double[2] { r2, solution.Length };
+      if (errorState != OnlineCalculatorError.None) r = double.NaN;
+      return new double[2] { r*r, solution.Length };
     }
 
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.cs	(revision 12669)
@@ -59,16 +59,16 @@
       OnlineCalculatorError errorState;
 
-      double r2;
+      double r;
       if (applyLinearScaling) {
-        var r2Calculator = new OnlinePearsonsRSquaredCalculator();
-        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, r2Calculator, problemData.Dataset.Rows);
-        errorState = r2Calculator.ErrorState;
-        r2 = r2Calculator.RSquared;
+        var rCalculator = new OnlinePearsonsRCalculator();
+        CalculateWithScaling(targetValues, estimatedValues, lowerEstimationLimit, upperEstimationLimit, rCalculator, problemData.Dataset.Rows);
+        errorState = rCalculator.ErrorState;
+        r = rCalculator.R;
       } else {
         IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
-        r2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
+        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
       }
       if (errorState != OnlineCalculatorError.None) return double.NaN;
-      return r2;
+      return r*r;
     }
 
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPruningOperator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPruningOperator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionPruningOperator.cs	(revision 12669)
@@ -60,7 +60,7 @@
       var targetValues = ProblemData.Dataset.GetDoubleValues(regressionProblemData.TargetVariable, trainingIndices);
       OnlineCalculatorError errorState;
-      var quality = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, estimatedValues, out errorState);
+      var quality = OnlinePearsonsRCalculator.Calculate(targetValues, estimatedValues, out errorState);
       if (errorState != OnlineCalculatorError.None) return double.NaN;
-      return quality;
+      return quality*quality;
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolutionImpactValuesCalculator.cs	(revision 12669)
@@ -66,5 +66,5 @@
       if (double.IsNaN(originalQuality)) {
         var originalValues = regressionModel.GetEstimatedValues(dataset, rows);
-        originalQuality = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalValues, out errorState);
+        originalQuality = OnlinePearsonsRCalculator.Calculate(targetValues, originalValues, out errorState);
         if (errorState != OnlineCalculatorError.None) originalQuality = 0.0;
       }
@@ -83,8 +83,8 @@
 
       var estimatedValues = tempModel.GetEstimatedValues(dataset, rows);
-      double newQuality = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, estimatedValues, out errorState);
+      double newQuality = OnlinePearsonsRCalculator.Calculate(targetValues, estimatedValues, out errorState);
       if (errorState != OnlineCalculatorError.None) newQuality = 0.0;
 
-      impactValue = originalQuality - newQuality;
+      impactValue = (originalQuality*originalQuality) - (newQuality*newQuality);
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs	(revision 12669)
@@ -60,6 +60,6 @@
       List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubtree(0).GetSubtree(0).IterateNodesPostfix().ToList();
       OnlineCalculatorError errorState;
-      double originalR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, originalOutput, out errorState);
-      if (errorState != OnlineCalculatorError.None) originalR2 = 0.0;
+      double originalR = OnlinePearsonsRCalculator.Calculate(targetValues, originalOutput, out errorState);
+      if (errorState != OnlineCalculatorError.None) originalR = 0.0;
 
       foreach (ISymbolicExpressionTreeNode node in nodes) {
@@ -69,11 +69,11 @@
         SwitchNode(parent, node, replacementNode);
         var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows);
-        double newR2 = OnlinePearsonsRSquaredCalculator.Calculate(targetValues, newOutput, out errorState);
-        if (errorState != OnlineCalculatorError.None) newR2 = 0.0;
+        double newR = OnlinePearsonsRCalculator.Calculate(targetValues, newOutput, out errorState);
+        if (errorState != OnlineCalculatorError.None) newR = 0.0;
 
         // impact = 0 if no change
         // impact < 0 if new solution is better
         // impact > 0 if new solution is worse
-        double impact = originalR2 - newR2;
+        double impact = (originalR*originalR) - (newR*newR);
         impactAndReplacementValues[node] = new Tuple<double, double>(impact, constantNode.Value);
         SwitchNode(parent, replacementNode, node);
Index: stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/TreeMatching/SymbolicExpressionTreePhenotypicSimilarityCalculator.cs	(revision 12669)
@@ -65,10 +65,10 @@
 
       OnlineCalculatorError error;
-      var r2 = OnlinePearsonsRSquaredCalculator.Calculate(v1, v2, out error);
+      var r = OnlinePearsonsRCalculator.Calculate(v1, v2, out error);
 
-      if (r2 > 1.0)
-        r2 = 1.0;
+      if (r > 1.0)
+        r = 1.0;
 
-      return error == OnlineCalculatorError.None ? r2 : 0;
+      return error == OnlineCalculatorError.None ? r*r : 0;
     }
 
@@ -87,10 +87,10 @@
 
       OnlineCalculatorError error;
-      var r2 = OnlinePearsonsRSquaredCalculator.Calculate(leftValues, rightValues, out error);
+      var r = OnlinePearsonsRCalculator.Calculate(leftValues, rightValues, out error);
 
-      if (r2 > 1.0)
-        r2 = 1.0; // sometimes due to fp errors it can happen that the r2 is over 1 (like 1.0000000009)
+      if (r > 1.0)
+        r = 1.0; // sometimes due to fp errors it can happen that the correlation is over 1 (like 1.0000000009)
 
-      return error == OnlineCalculatorError.None ? r2 : 0;
+      return error == OnlineCalculatorError.None ? r*r : 0;
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 12669)
@@ -222,4 +222,5 @@
     <Compile Include="OnlineCalculators\OnlineMeanSquaredErrorCalculator.cs" />
     <Compile Include="OnlineCalculators\OnlineNormalizedMeanSquaredErrorCalculator.cs" />
+    <Compile Include="OnlineCalculators\OnlinePearsonsRCalculator.cs" />
     <Compile Include="OnlineCalculators\OnlinePearsonsRSquaredCalculator.cs" />
     <Compile Include="Implementation\Regression\RegressionSolution.cs" />
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 12669)
@@ -105,8 +105,8 @@
       TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMSE : double.NaN;
 
-      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
-      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
-      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
-      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
+      double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
+      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR*trainingR : double.NaN;
+      double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
+      TestRSquared = errorState == OnlineCalculatorError.None ? testR*testR : double.NaN;
 
       double trainingNormalizedGini = NormalizedGiniCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 12669)
@@ -229,8 +229,8 @@
       TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
 
-      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
-      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
-      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
-      TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
+      double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
+      TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR*trainingR : double.NaN;
+      double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
+      TestRSquared = errorState == OnlineCalculatorError.None ? testR*testR : double.NaN;
 
       double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs	(revision 12669)
@@ -394,6 +394,6 @@
       double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
       PrognosisTrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN;
-      double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
-      PrognosisTrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN;
+      double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
+      PrognosisTrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR*trainingR : double.NaN;
       double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
       PrognosisTrainingRelativeError = errorState == OnlineCalculatorError.None ? trainingRelError : double.NaN;
@@ -430,6 +430,6 @@
       double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
       PrognosisTestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN;
-      double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
-      PrognosisTestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN;
+      double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
+      PrognosisTestRSquared = errorState == OnlineCalculatorError.None ? testR*testR : double.NaN;
       double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
       PrognosisTestRelativeError = errorState == OnlineCalculatorError.None ? testRelError : double.NaN;
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRDependenceCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRDependenceCalculator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRDependenceCalculator.cs	(revision 12669)
@@ -33,5 +33,5 @@
 
     public double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
-      return Math.Sqrt(OnlinePearsonsRSquaredCalculator.Calculate(originalValues, estimatedValues, out errorState));
+      return OnlinePearsonsRCalculator.Calculate(originalValues, estimatedValues, out errorState);
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRSquaredDependenceCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRSquaredDependenceCalculator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/DependencyCalculator/PearsonsRSquaredDependenceCalculator.cs	(revision 12669)
@@ -32,5 +32,6 @@
 
     public double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
-      return OnlinePearsonsRSquaredCalculator.Calculate(originalValues, estimatedValues, out errorState);
+      var r = OnlinePearsonsRCalculator.Calculate(originalValues, estimatedValues, out errorState);
+      return r * r;
     }
   }
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRCalculator.cs	(revision 12669)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRCalculator.cs	(revision 12669)
@@ -0,0 +1,91 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public class OnlinePearsonsRCalculator : IOnlineCalculator {
+    private OnlineCovarianceCalculator covCalculator = new OnlineCovarianceCalculator();
+    private OnlineMeanAndVarianceCalculator sxCalculator = new OnlineMeanAndVarianceCalculator();
+    private OnlineMeanAndVarianceCalculator syCalculator = new OnlineMeanAndVarianceCalculator();
+
+    public double R {
+      get {
+        double xVar = sxCalculator.PopulationVariance;
+        double yVar = syCalculator.PopulationVariance;
+        if (xVar.IsAlmost(0.0) || yVar.IsAlmost(0.0)) {
+          return 0.0;
+        } else {
+          return covCalculator.Covariance / (Math.Sqrt(xVar) * Math.Sqrt(yVar));
+        }
+      }
+    }
+
+    public OnlinePearsonsRCalculator() { }
+
+    #region IOnlineCalculator Members
+    public OnlineCalculatorError ErrorState {
+      get { return covCalculator.ErrorState | sxCalculator.PopulationVarianceErrorState | syCalculator.PopulationVarianceErrorState; }
+    }
+    public double Value {
+      get { return R; }
+    }
+    public void Reset() {
+      covCalculator.Reset();
+      sxCalculator.Reset();
+      syCalculator.Reset();
+    }
+
+    public void Add(double x, double y) {
+      // no need to check validity of values explicitly here as it is checked in all three evaluators 
+      covCalculator.Add(x, y);
+      sxCalculator.Add(x);
+      syCalculator.Add(y);
+    }
+
+    #endregion
+
+    public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
+      IEnumerator<double> firstEnumerator = first.GetEnumerator();
+      IEnumerator<double> secondEnumerator = second.GetEnumerator();
+      var calculator = new OnlinePearsonsRCalculator();
+
+      // always move forward both enumerators (do not use short-circuit evaluation!)
+      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
+        double original = firstEnumerator.Current;
+        double estimated = secondEnumerator.Current;
+        calculator.Add(original, estimated);
+        if (calculator.ErrorState != OnlineCalculatorError.None) break;
+      }
+
+      // check if both enumerators are at the end to make sure both enumerations have the same length
+      if (calculator.ErrorState == OnlineCalculatorError.None &&
+           (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
+        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
+      } else {
+        errorState = calculator.ErrorState;
+        return calculator.R;
+      }
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs	(revision 12668)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlinePearsonsRSquaredCalculator.cs	(revision 12669)
@@ -25,19 +25,12 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [Obsolete("Use OnlinePearsonsRCalculator directly")]
   public class OnlinePearsonsRSquaredCalculator : IOnlineCalculator {
-    private OnlineCovarianceCalculator covCalculator = new OnlineCovarianceCalculator();
-    private OnlineMeanAndVarianceCalculator sxCalculator = new OnlineMeanAndVarianceCalculator();
-    private OnlineMeanAndVarianceCalculator syCalculator = new OnlineMeanAndVarianceCalculator();
+    private readonly OnlinePearsonsRCalculator rCalculator = new OnlinePearsonsRCalculator();
 
     public double RSquared {
       get {
-        double xVar = sxCalculator.PopulationVariance;
-        double yVar = syCalculator.PopulationVariance;
-        if (xVar.IsAlmost(0.0) || yVar.IsAlmost(0.0)) {
-          return 0.0;
-        } else {
-          double r = covCalculator.Covariance / (Math.Sqrt(xVar) * Math.Sqrt(yVar));
-          return r * r;
-        }
+        if (rCalculator.ErrorState != OnlineCalculatorError.None) return 0.0;
+        else return rCalculator.R * rCalculator.R;
       }
     }
@@ -47,5 +40,5 @@
     #region IOnlineCalculator Members
     public OnlineCalculatorError ErrorState {
-      get { return covCalculator.ErrorState | sxCalculator.PopulationVarianceErrorState | syCalculator.PopulationVarianceErrorState; }
+      get { return rCalculator.ErrorState; }
     }
     public double Value {
@@ -53,14 +46,9 @@
     }
     public void Reset() {
-      covCalculator.Reset();
-      sxCalculator.Reset();
-      syCalculator.Reset();
+      rCalculator.Reset();
     }
 
     public void Add(double x, double y) {
-      // no need to check validity of values explicitly here as it is checked in all three evaluators 
-      covCalculator.Add(x, y);
-      sxCalculator.Add(x);
-      syCalculator.Add(y);
+      rCalculator.Add(x, y);
     }
 
@@ -68,24 +56,6 @@
 
     public static double Calculate(IEnumerable<double> first, IEnumerable<double> second, out OnlineCalculatorError errorState) {
-      IEnumerator<double> firstEnumerator = first.GetEnumerator();
-      IEnumerator<double> secondEnumerator = second.GetEnumerator();
-      OnlinePearsonsRSquaredCalculator rSquaredCalculator = new OnlinePearsonsRSquaredCalculator();
-
-      // always move forward both enumerators (do not use short-circuit evaluation!)
-      while (firstEnumerator.MoveNext() & secondEnumerator.MoveNext()) {
-        double original = firstEnumerator.Current;
-        double estimated = secondEnumerator.Current;
-        rSquaredCalculator.Add(original, estimated);
-        if (rSquaredCalculator.ErrorState != OnlineCalculatorError.None) break;
-      }
-
-      // check if both enumerators are at the end to make sure both enumerations have the same length
-      if (rSquaredCalculator.ErrorState == OnlineCalculatorError.None &&
-           (secondEnumerator.MoveNext() || firstEnumerator.MoveNext())) {
-        throw new ArgumentException("Number of elements in first and second enumeration doesn't match.");
-      } else {
-        errorState = rSquaredCalculator.ErrorState;
-        return rSquaredCalculator.RSquared;
-      }
+      var r = OnlinePearsonsRCalculator.Calculate(first, second, out errorState);
+      return r * r;
     }
   }
