Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ClassificationPerformanceMeasuresCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ClassificationPerformanceMeasuresCalculator.cs	(revision 13152)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ClassificationPerformanceMeasuresCalculator.cs	(revision 13156)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using HeuristicLab.Common;
+using HeuristicLab.Problems.DataAnalysis.OnlineCalculators;
 
 namespace HeuristicLab.Problems.DataAnalysis {
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ConfusionMatrixCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ConfusionMatrixCalculator.cs	(revision 13156)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/ConfusionMatrixCalculator.cs	(revision 13156)
@@ -0,0 +1,69 @@
+﻿#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 System.Linq;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public class ConfusionMatrixCalculator {
+    public static double[,] Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
+
+      Dictionary<double, int> classValueIndexMapping = new Dictionary<double, int>();
+      int index = 0;
+      foreach (double classValue in originalValues.OrderBy(x => x)) {
+        if (!classValueIndexMapping.ContainsKey(classValue)) {
+          classValueIndexMapping.Add(classValue, index);
+          index++;
+        }
+      }
+
+      int classes = classValueIndexMapping.Count;
+      double[,] confusionMatrix = new double[classes, classes];
+
+
+      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
+      int originalIndex;
+      int estimatedIndex;
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        if (!classValueIndexMapping.TryGetValue(originalEnumerator.Current, out originalIndex)) {
+          errorState = OnlineCalculatorError.InvalidValueAdded;
+          return null;
+        }
+        if (!classValueIndexMapping.TryGetValue(estimatedEnumerator.Current, out estimatedIndex)) {
+          errorState = OnlineCalculatorError.InvalidValueAdded;
+          return null;
+        }
+
+        confusionMatrix[estimatedIndex, originalIndex] += 1;
+      }
+
+      if (originalEnumerator.MoveNext() || estimatedEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in originalValues and estimatedValues enumerations doesn't match.");
+
+      }
+
+      errorState = OnlineCalculatorError.None;
+      return confusionMatrix;
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/FOneScoreCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/FOneScoreCalculator.cs	(revision 13156)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/FOneScoreCalculator.cs	(revision 13156)
@@ -0,0 +1,48 @@
+﻿#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 System.Linq;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public class FOneScoreCalculator {
+    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
+      if (originalValues.Distinct().Skip(2).Any()) {
+        // TODO: we could use ClassificationPerformanceMeasuresCalculator instead of the ConfusionMatrixCalculator below to handle multi-class problems
+        throw new ArgumentException("F1 score can only be calculated for binary classification.");
+      }
+
+      var confusionMatrix = ConfusionMatrixCalculator.Calculate(originalValues, estimatedValues, out errorState);
+      if (!errorState.Equals(OnlineCalculatorError.None)) {
+        return double.NaN;
+      }
+      return CalculateFOne(confusionMatrix);
+    }
+
+    private static double CalculateFOne(double[,] confusionMatrix) {
+      double precision = confusionMatrix[0, 0] / (confusionMatrix[0, 0] + confusionMatrix[0, 1]);
+      double recall = confusionMatrix[0, 0] / (confusionMatrix[0, 0] + confusionMatrix[1, 0]);
+
+      return 2 * ((precision * recall) / (precision + recall));
+    }
+  }
+}
Index: stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/MatthewsCorrelationCoefficientCalculator.cs
===================================================================
--- stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/MatthewsCorrelationCoefficientCalculator.cs	(revision 13156)
+++ stable/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/MatthewsCorrelationCoefficientCalculator.cs	(revision 13156)
@@ -0,0 +1,79 @@
+﻿#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;
+
+namespace HeuristicLab.Problems.DataAnalysis.OnlineCalculators {
+  public class MatthewsCorrelationCoefficientCalculator {
+    public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
+      var confusionMatrix = ConfusionMatrixCalculator.Calculate(originalValues, estimatedValues, out errorState);
+      if (!errorState.Equals(OnlineCalculatorError.None)) {
+        return double.NaN;
+      }
+      return CalculateMCC(confusionMatrix);
+    }
+
+    private static double CalculateMCC(double[,] confusionMatrix) {
+      if (confusionMatrix.GetLength(0) != confusionMatrix.GetLength(1)) {
+        throw new ArgumentException("Confusion matrix is not a square matrix.");
+      }
+
+      int classes = confusionMatrix.GetLength(0);
+      double numerator = 0;
+      for (int k = 0; k < classes; k++) {
+        for (int l = 0; l < classes; l++) {
+          for (int m = 0; m < classes; m++) {
+            numerator += confusionMatrix[k, k] * confusionMatrix[m, l] - confusionMatrix[l, k] * confusionMatrix[k, m];
+          }
+        }
+      }
+
+      double denominator1 = 0;
+      double denominator2 = 0;
+      for (int k = 0; k < classes; k++) {
+        double clk = 0;
+        double cgf = 0;
+        double ckl = 0;
+        double cfg = 0;
+        for (int l = 0; l < classes; l++) {
+          clk += confusionMatrix[l, k];
+          ckl += confusionMatrix[k, l];
+        }
+        for (int f = 0; f < classes; f++) {
+          if (f == k) {
+            continue;
+          }
+          for (int g = 0; g < classes; g++) {
+            cgf += confusionMatrix[g, f];
+            cfg += confusionMatrix[f, g];
+          }
+        }
+        denominator1 += clk * cgf;
+        denominator2 += ckl * cfg;
+      }
+      denominator1 = Math.Sqrt(denominator1);
+      denominator2 = Math.Sqrt(denominator2);
+
+      return numerator / (denominator1 * denominator2);
+    }
+  }
+}
