Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -67,5 +67,5 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
       var estimatedValuesEnumerators = (from model in models
                                         select model.GetEstimatedClassValues(dataset, rows).GetEnumerator())
@@ -82,5 +82,5 @@
     #region IClassificationModel Members
 
-    public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
       foreach (var estimatedValuesVector in GetEstimatedClassValueVectors(dataset, rows)) {
         // return the class which is most often occuring
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -79,4 +79,5 @@
       this.TestPartition.Start = classificationProblemData.TestPartition.Start;
       this.TestPartition.End = classificationProblemData.TestPartition.End;
+      this.PositiveClass = classificationProblemData.PositiveClass;
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -35,5 +35,5 @@
   [StorableClass]
   [Item("Classification Ensemble Solution", "A classification solution that contains an ensemble of multiple classification models")]
-  [Creatable("Data Analysis - Ensembles")]
+  [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 110)]
   public sealed class ClassificationEnsembleSolution : ClassificationSolutionBase, IClassificationEnsembleSolution {
     private readonly Dictionary<int, double> trainingEvaluationCache = new Dictionary<int, double>();
@@ -231,5 +231,5 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) {
       if (!Model.Models.Any()) yield break;
       var estimatedValuesEnumerators = (from model in Model.Models
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationPerformanceMeasures.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationPerformanceMeasures.cs	(revision 12694)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationPerformanceMeasures.cs	(revision 12694)
@@ -0,0 +1,171 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  public class ClassificationPerformanceMeasuresResultCollection : ResultCollection {
+    #region result names
+    protected const string ClassificationPositiveClassNameResultName = "Classification positive class";
+    protected const string TrainingTruePositiveRateResultName = "True positive rate (training)";
+    protected const string TrainingTrueNegativeRateResultName = "True negative rate (training)";
+    protected const string TrainingPositivePredictiveValueResultName = "Positive predictive value (training)";
+    protected const string TrainingNegativePredictiveValueResultName = "Negative predictive value (training)";
+    protected const string TrainingFalsePositiveRateResultName = "False positive rate (training)";
+    protected const string TrainingFalseDiscoveryRateResultName = "False discovery rate (training)";
+    protected const string TestTruePositiveRateResultName = "True positive rate (test)";
+    protected const string TestTrueNegativeRateResultName = "True negative rate (test)";
+    protected const string TestPositivePredictiveValueResultName = "Positive predictive value (test)";
+    protected const string TestNegativePredictiveValueResultName = "Negative predictive value (test)";
+    protected const string TestFalsePositiveRateResultName = "False positive rate (test)";
+    protected const string TestFalseDiscoveryRateResultName = "False discovery rate (test)";
+    #endregion
+
+    public ClassificationPerformanceMeasuresResultCollection()
+      : base() {
+      AddMeasures();
+    }
+    [StorableConstructor]
+    protected ClassificationPerformanceMeasuresResultCollection(bool deserializing)
+      : base(deserializing) {
+    }
+
+    protected ClassificationPerformanceMeasuresResultCollection(ClassificationPerformanceMeasuresResultCollection original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ClassificationPerformanceMeasuresResultCollection(this, cloner);
+    }
+
+    #region result properties
+    public string ClassificationPositiveClassName {
+      get { return ((StringValue)this[ClassificationPositiveClassNameResultName].Value).Value; }
+      set { ((StringValue)this[ClassificationPositiveClassNameResultName].Value).Value = value; }
+    }
+    public double TrainingTruePositiveRate {
+      get { return ((DoubleValue)this[TrainingTruePositiveRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingTruePositiveRateResultName].Value).Value = value; }
+    }
+    public double TrainingTrueNegativeRate {
+      get { return ((DoubleValue)this[TrainingTrueNegativeRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingTrueNegativeRateResultName].Value).Value = value; }
+    }
+    public double TrainingPositivePredictiveValue {
+      get { return ((DoubleValue)this[TrainingPositivePredictiveValueResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingPositivePredictiveValueResultName].Value).Value = value; }
+    }
+    public double TrainingNegativePredictiveValue {
+      get { return ((DoubleValue)this[TrainingNegativePredictiveValueResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingNegativePredictiveValueResultName].Value).Value = value; }
+    }
+    public double TrainingFalsePositiveRate {
+      get { return ((DoubleValue)this[TrainingFalsePositiveRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingFalsePositiveRateResultName].Value).Value = value; }
+    }
+    public double TrainingFalseDiscoveryRate {
+      get { return ((DoubleValue)this[TrainingFalseDiscoveryRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TrainingFalseDiscoveryRateResultName].Value).Value = value; }
+    }
+    public double TestTruePositiveRate {
+      get { return ((DoubleValue)this[TestTruePositiveRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TestTruePositiveRateResultName].Value).Value = value; }
+    }
+    public double TestTrueNegativeRate {
+      get { return ((DoubleValue)this[TestTrueNegativeRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TestTrueNegativeRateResultName].Value).Value = value; }
+    }
+    public double TestPositivePredictiveValue {
+      get { return ((DoubleValue)this[TestPositivePredictiveValueResultName].Value).Value; }
+      set { ((DoubleValue)this[TestPositivePredictiveValueResultName].Value).Value = value; }
+    }
+    public double TestNegativePredictiveValue {
+      get { return ((DoubleValue)this[TestNegativePredictiveValueResultName].Value).Value; }
+      set { ((DoubleValue)this[TestNegativePredictiveValueResultName].Value).Value = value; }
+    }
+    public double TestFalsePositiveRate {
+      get { return ((DoubleValue)this[TestFalsePositiveRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TestFalsePositiveRateResultName].Value).Value = value; }
+    }
+    public double TestFalseDiscoveryRate {
+      get { return ((DoubleValue)this[TestFalseDiscoveryRateResultName].Value).Value; }
+      set { ((DoubleValue)this[TestFalseDiscoveryRateResultName].Value).Value = value; }
+    }
+    #endregion
+
+    protected void AddMeasures() {
+      Add(new Result(ClassificationPositiveClassNameResultName, "The positive class which is used for the performance measure calculations.", new StringValue()));
+      Add(new Result(TrainingTruePositiveRateResultName, "Sensitivity/True positive rate of the model on the training partition\n(TP/(TP+FN)).", new PercentValue()));
+      Add(new Result(TrainingTrueNegativeRateResultName, "Specificity/True negative rate of the model on the training partition\n(TN/(FP+TN)).", new PercentValue()));
+      Add(new Result(TrainingPositivePredictiveValueResultName, "Precision/Positive predictive value of the model on the training partition\n(TP/(TP+FP)).", new PercentValue()));
+      Add(new Result(TrainingNegativePredictiveValueResultName, "Negative predictive value of the model on the training partition\n(TN/(TN+FN)).", new PercentValue()));
+      Add(new Result(TrainingFalsePositiveRateResultName, "The false positive rate is the complement of the true negative rate of the model on the training partition.", new PercentValue()));
+      Add(new Result(TrainingFalseDiscoveryRateResultName, "The false discovery rate is the complement of the positive predictive value of the model on the training partition.", new PercentValue()));
+      Add(new Result(TestTruePositiveRateResultName, "Sensitivity/True positive rate of the model on the test partition\n(TP/(TP+FN)).", new PercentValue()));
+      Add(new Result(TestTrueNegativeRateResultName, "Specificity/True negative rate of the model on the test partition\n(TN/(FP+TN)).", new PercentValue()));
+      Add(new Result(TestPositivePredictiveValueResultName, "Precision/Positive predictive value of the model on the test partition\n(TP/(TP+FP)).", new PercentValue()));
+      Add(new Result(TestNegativePredictiveValueResultName, "Negative predictive value of the model on the test partition\n(TN/(TN+FN)).", new PercentValue()));
+      Add(new Result(TestFalsePositiveRateResultName, "The false positive rate is the complement of the true negative rate of the model on the test partition.", new PercentValue()));
+      Add(new Result(TestFalseDiscoveryRateResultName, "The false discovery rate is the complement of the positive predictive value of the model on the test partition.", new PercentValue()));
+      TrainingTruePositiveRate = double.NaN;
+      TrainingTrueNegativeRate = double.NaN;
+      TrainingPositivePredictiveValue = double.NaN;
+      TrainingNegativePredictiveValue = double.NaN;
+      TrainingFalsePositiveRate = double.NaN;
+      TrainingFalseDiscoveryRate = double.NaN;
+      TestTruePositiveRate = double.NaN;
+      TestTrueNegativeRate = double.NaN;
+      TestPositivePredictiveValue = double.NaN;
+      TestNegativePredictiveValue = double.NaN;
+      TestFalsePositiveRate = double.NaN;
+      TestFalseDiscoveryRate = double.NaN;
+    }
+
+    public void SetTrainingResults(ClassificationPerformanceMeasuresCalculator trainingPerformanceCalculator) {
+      if (!string.IsNullOrWhiteSpace(ClassificationPositiveClassName)
+              && !ClassificationPositiveClassName.Equals(trainingPerformanceCalculator.PositiveClassName))
+        throw new ArgumentException("Classification positive class of the training data doesn't match with the data of test partition.");
+      ClassificationPositiveClassName = trainingPerformanceCalculator.PositiveClassName;
+      TrainingTruePositiveRate = trainingPerformanceCalculator.TruePositiveRate;
+      TrainingTrueNegativeRate = trainingPerformanceCalculator.TrueNegativeRate;
+      TrainingPositivePredictiveValue = trainingPerformanceCalculator.PositivePredictiveValue;
+      TrainingNegativePredictiveValue = trainingPerformanceCalculator.NegativePredictiveValue;
+      TrainingFalsePositiveRate = trainingPerformanceCalculator.FalsePositiveRate;
+      TrainingFalseDiscoveryRate = trainingPerformanceCalculator.FalseDiscoveryRate;
+    }
+
+    public void SetTestResults(ClassificationPerformanceMeasuresCalculator testPerformanceCalculator) {
+      if (!string.IsNullOrWhiteSpace(ClassificationPositiveClassName)
+                && !ClassificationPositiveClassName.Equals(testPerformanceCalculator.PositiveClassName))
+        throw new ArgumentException("Classification positive class of the test data doesn't match with the data of training partition.");
+      ClassificationPositiveClassName = testPerformanceCalculator.PositiveClassName;
+      TestTruePositiveRate = testPerformanceCalculator.TruePositiveRate;
+      TestTrueNegativeRate = testPerformanceCalculator.TrueNegativeRate;
+      TestPositivePredictiveValue = testPerformanceCalculator.PositivePredictiveValue;
+      TestNegativePredictiveValue = testPerformanceCalculator.NegativePredictiveValue;
+      TestFalsePositiveRate = testPerformanceCalculator.FalsePositiveRate;
+      TestFalseDiscoveryRate = testPerformanceCalculator.FalseDiscoveryRate;
+    }
+  }
+}
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -27,5 +27,4 @@
   [StorableClass]
   [Item("Classification Problem", "A general classification problem.")]
-  [Creatable("Problems")]
   public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent {
     public string Filename { get; set; }
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -36,4 +36,5 @@
     protected const string ClassNamesParameterName = "ClassNames";
     protected const string ClassificationPenaltiesParameterName = "ClassificationPenalties";
+    protected const string PositiveClassParameterName = "PositiveClass";
     protected const int MaximumNumberOfClasses = 100;
     protected const int InspectedRowsToDetermineTargets = 2000;
@@ -213,4 +214,7 @@
       get { return (IFixedValueParameter<StringMatrix>)Parameters[ClassNamesParameterName]; }
     }
+    public IConstrainedValueParameter<StringValue> PositiveClassParameter {
+      get { return (IConstrainedValueParameter<StringValue>)Parameters[PositiveClassParameterName]; }
+    }
     public IFixedValueParameter<DoubleMatrix> ClassificationPenaltiesParameter {
       get { return (IFixedValueParameter<DoubleMatrix>)Parameters[ClassificationPenaltiesParameterName]; }
@@ -262,4 +266,13 @@
       get { return ClassNamesCache; }
     }
+
+    public string PositiveClass {
+      get { return PositiveClassParameter.Value.Value; }
+      set {
+        var matchingValue = PositiveClassParameter.ValidValues.SingleOrDefault(x => x.Value == value);
+        if (matchingValue == null) throw new ArgumentException(string.Format("{0} cannot be set as positive class.", value));
+        PositiveClassParameter.Value = matchingValue;
+      }
+    }
     #endregion
 
@@ -270,4 +283,13 @@
     private void AfterDeserialization() {
       RegisterParameterEvents();
+      // BackwardsCompatibility3.4
+      #region Backwards compatible code, remove with 3.5
+      if (!Parameters.ContainsKey(PositiveClassParameterName)) {
+        var validValues = new ItemSet<StringValue>(ClassNames.Select(s => new StringValue(s).AsReadOnly()));
+        Parameters.Add(new ConstrainedValueParameter<StringValue>(PositiveClassParameterName,
+          "The positive class which is used for quality measure calculation (e.g., specifity, sensitivity,...)", validValues, validValues.First()));
+      }
+      #endregion
+
     }
 
@@ -290,4 +312,6 @@
       TestPartition.End = classificationProblemData.TestPartition.End;
 
+      PositiveClass = classificationProblemData.PositiveClass;
+
       for (int i = 0; i < classificationProblemData.ClassNames.Count(); i++)
         ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i);
@@ -300,5 +324,5 @@
     }
 
-    public ClassificationProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
+    public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
       var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList();
@@ -307,4 +331,5 @@
       Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(validTargetVariableValues), target));
       Parameters.Add(new FixedValueParameter<StringMatrix>(ClassNamesParameterName, ""));
+      Parameters.Add(new ConstrainedValueParameter<StringValue>(PositiveClassParameterName, "The positive class which is used for quality measure calculation (e.g., specifity, sensitivity,...)"));
       Parameters.Add(new FixedValueParameter<DoubleMatrix>(ClassificationPenaltiesParameterName, ""));
 
@@ -313,5 +338,5 @@
     }
 
-    public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) {
+    public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) {
       int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows);
       var validTargetVariables = (from v in dataset.DoubleVariables
@@ -339,4 +364,9 @@
       ClassNamesParameter.Value.ColumnNames = new List<string>() { "ClassNames" };
       ClassNamesParameter.Value.RowNames = ClassValues.Select(s => "ClassValue: " + s);
+
+      PositiveClassParameter.ValidValues.Clear();
+      foreach (var className in ClassNames) {
+        PositiveClassParameter.ValidValues.Add(new StringValue(className).AsReadOnly());
+      }
 
       ((IStringConvertibleMatrix)ClassificationPenaltiesParameter.Value).Rows = Classes;
@@ -411,7 +441,18 @@
     }
     private void Parameter_ValueChanged(object sender, EventArgs e) {
+      var oldPositiveClass = PositiveClass;
+      var oldClassNames = classNamesCache;
+      var index = oldClassNames.IndexOf(oldPositiveClass);
+
       classNamesCache = null;
       ClassificationPenaltiesParameter.Value.RowNames = ClassNames.Select(name => "Actual " + name);
       ClassificationPenaltiesParameter.Value.ColumnNames = ClassNames.Select(name => "Estimated " + name);
+
+      PositiveClassParameter.ValidValues.Clear();
+      foreach (var className in ClassNames) {
+        PositiveClassParameter.ValidValues.Add(new StringValue(className).AsReadOnly());
+      }
+      PositiveClassParameter.Value = PositiveClassParameter.ValidValues.ElementAt(index);
+
       OnChanged();
     }
@@ -435,5 +476,11 @@
       if (!newClassValues.SequenceEqual(ClassValues)) {
         errorMessage = errorMessage + string.Format("The class values differ in the provided classification problem data.");
-        return false;
+        returnValue = false;
+      }
+
+      var newPositivieClassName = classificationProblemData.PositiveClass;
+      if (newPositivieClassName != PositiveClass) {
+        errorMessage = errorMessage + string.Format("The positive class differs in the provided classification problem data.");
+        returnValue = false;
       }
 
@@ -452,4 +499,6 @@
         ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i);
 
+      PositiveClass = classificationProblemData.PositiveClass;
+
       for (int i = 0; i < Classes; i++) {
         for (int j = 0; j < Classes; j++) {
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -30,5 +30,5 @@
   /// </summary>
   [StorableClass]
-  public abstract class ClassificationSolution : ClassificationSolutionBase {
+  public class ClassificationSolution : ClassificationSolutionBase {
     protected readonly Dictionary<int, double> evaluationCache;
 
@@ -46,4 +46,8 @@
       evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows);
       CalculateClassificationResults();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ClassificationSolution(this, cloner);
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -34,4 +34,5 @@
     private const string TrainingNormalizedGiniCoefficientResultName = "Normalized Gini Coefficient (training)";
     private const string TestNormalizedGiniCoefficientResultName = "Normalized Gini Coefficient (test)";
+    private const string ClassificationPerformanceMeasuresResultName = "Classification Performance Measures";
 
     public new IClassificationModel Model {
@@ -62,4 +63,8 @@
       protected set { ((DoubleValue)this[TestNormalizedGiniCoefficientResultName].Value).Value = value; }
     }
+    public ClassificationPerformanceMeasuresResultCollection ClassificationPerformanceMeasures {
+      get { return ((ClassificationPerformanceMeasuresResultCollection)this[ClassificationPerformanceMeasuresResultName].Value); }
+      protected set { (this[ClassificationPerformanceMeasuresResultName].Value) = value; }
+    }
     #endregion
 
@@ -75,4 +80,7 @@
       Add(new Result(TrainingNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the training partition.", new DoubleValue()));
       Add(new Result(TestNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the test partition.", new DoubleValue()));
+      Add(new Result(ClassificationPerformanceMeasuresResultName, @"Classification performance measures.\n
+                              In a multiclass classification all misclassifications of the negative class will be treated as true negatives except on positive class estimations.",
+                            new ClassificationPerformanceMeasuresResultCollection()));
     }
 
@@ -83,4 +91,10 @@
       if (!this.ContainsKey(TestNormalizedGiniCoefficientResultName))
         Add(new Result(TestNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the test partition.", new DoubleValue()));
+      if (!this.ContainsKey(ClassificationPerformanceMeasuresResultName)) {
+        Add(new Result(ClassificationPerformanceMeasuresResultName, @"Classification performance measures.\n
+                              In a multiclass classification all misclassifications of the negative class will be treated as true negatives except on positive class estimations.",
+                              new ClassificationPerformanceMeasuresResultCollection()));
+        CalculateClassificationResults();
+      }
     }
 
@@ -88,6 +102,12 @@
       double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values
       double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToArray();
+
       double[] estimatedTestClassValues = EstimatedTestClassValues.ToArray(); // cache values
       double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices).ToArray();
+
+      var positiveClassName = ProblemData.PositiveClass;
+      double positiveClassValue = ProblemData.GetClassValue(positiveClassName);
+      ClassificationPerformanceMeasuresCalculator trainingPerformanceCalculator = new ClassificationPerformanceMeasuresCalculator(positiveClassName, positiveClassValue);
+      ClassificationPerformanceMeasuresCalculator testPerformanceCalculator = new ClassificationPerformanceMeasuresCalculator(positiveClassName, positiveClassValue);
 
       OnlineCalculatorError errorState;
@@ -107,4 +127,12 @@
       TrainingNormalizedGiniCoefficient = trainingNormalizedGini;
       TestNormalizedGiniCoefficient = testNormalizedGini;
+
+      trainingPerformanceCalculator.Calculate(originalTrainingClassValues, estimatedTrainingClassValues);
+      if (trainingPerformanceCalculator.ErrorState == OnlineCalculatorError.None)
+        ClassificationPerformanceMeasures.SetTrainingResults(trainingPerformanceCalculator);
+
+      testPerformanceCalculator.Calculate(originalTestClassValues, estimatedTestClassValues);
+      if (testPerformanceCalculator.ErrorState == OnlineCalculatorError.None)
+        ClassificationPerformanceMeasures.SetTestResults(testPerformanceCalculator);
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -111,9 +111,9 @@
 
 
-    public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       return model.GetEstimatedValues(dataset, rows);
     }
 
-    public IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {
       if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model.");
       foreach (var x in GetEstimatedValues(dataset, rows)) {
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -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: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/NormalDistributionCutPointsThresholdCalculator.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/NormalDistributionCutPointsThresholdCalculator.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/NormalDistributionCutPointsThresholdCalculator.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/ThresholdCalculator.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/ThresholdCalculator.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/ThresholdCalculator.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -27,5 +27,4 @@
   [StorableClass]
   [Item("Clustering Problem", "A general clustering problem.")]
-  [Creatable("Problems")]
   public class ClusteringProblem : DataAnalysisProblem<IClusteringProblemData>, IClusteringProblem {
     [StorableConstructor]
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -63,5 +63,5 @@
       get { return isEmpty; }
     }
-    public Dataset Dataset {
+    public IDataset Dataset {
       get { return DatasetParameter.Value; }
     }
@@ -126,5 +126,5 @@
     }
 
-    protected DataAnalysisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) {
+    protected DataAnalysisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, IEnumerable<ITransformation> transformations = null) {
       if (dataset == null) throw new ArgumentNullException("The dataset must not be null.");
       if (allowedInputVariables == null) throw new ArgumentNullException("The allowedInputVariables must not be null.");
@@ -144,5 +144,5 @@
       var transformationsList = new ItemList<ITransformation>(transformations ?? Enumerable.Empty<ITransformation>());
 
-      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", dataset));
+      Parameters.Add(new FixedValueParameter<Dataset>(DatasetParameterName, "", (Dataset)dataset));
       Parameters.Add(new FixedValueParameter<ReadOnlyCheckedItemList<StringValue>>(InputVariablesParameterName, "", inputVariables.AsReadOnly()));
       Parameters.Add(new FixedValueParameter<IntRange>(TrainingPartitionParameterName, "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -21,4 +21,5 @@
 
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using HeuristicLab.Common;
@@ -106,4 +107,8 @@
     }
 
+    //mkommend avoid unnecessary event registration for result name changes
+    protected override void RegisterItemEvents(IEnumerable<IResult> items) { }
+    protected override void DeregisterItemEvents(IEnumerable<IResult> items) { }
+
     #region INamedItem Members
     [Storable]
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -51,5 +51,5 @@
     }
 
-    public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       return rows.Select(row => Constant);
     }
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -80,5 +80,5 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
       var estimatedValuesEnumerators = (from model in models
                                         select model.GetEstimatedValues(dataset, rows).GetEnumerator())
@@ -95,5 +95,5 @@
     #region IRegressionModel Members
 
-    public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       foreach (var estimatedValuesVector in GetEstimatedValueVectors(dataset, rows)) {
         yield return estimatedValuesVector.Average();
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -35,5 +35,5 @@
   [StorableClass]
   [Item("Regression Ensemble Solution", "A regression solution that contains an ensemble of multiple regression models")]
-  [Creatable("Data Analysis - Ensembles")]
+  [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 100)]
   public sealed class RegressionEnsembleSolution : RegressionSolutionBase, IRegressionEnsembleSolution {
     private readonly Dictionary<int, double> trainingEvaluationCache = new Dictionary<int, double>();
@@ -232,5 +232,5 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<IEnumerable<double>> GetEstimatedValueVectors(IDataset dataset, IEnumerable<int> rows) {
       if (!Model.Models.Any()) yield break;
       var estimatedValuesEnumerators = (from model in Model.Models
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -27,5 +27,4 @@
   [StorableClass]
   [Item("Regression Problem", "A general regression problem.")]
-  [Creatable("Problems")]
   public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>, IRegressionProblem, IStorableContent {
     public string Filename { get; set; }
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -137,5 +137,5 @@
     }
 
-    public RegressionProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
+    public RegressionProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
       : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) {
       var variables = InputVariables.Select(x => x.AsReadOnly()).ToList();
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -30,5 +30,5 @@
   /// </summary>
   [StorableClass]
-  public abstract class RegressionSolution : RegressionSolutionBase {
+  public class RegressionSolution : RegressionSolutionBase {
     protected readonly Dictionary<int, double> evaluationCache;
 
@@ -42,5 +42,5 @@
       evaluationCache = new Dictionary<int, double>(original.evaluationCache);
     }
-    protected RegressionSolution(IRegressionModel model, IRegressionProblemData problemData)
+    public RegressionSolution(IRegressionModel model, IRegressionProblemData problemData)
       : base(model, problemData) {
       evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows);
@@ -48,4 +48,7 @@
     }
 
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RegressionSolution(this, cloner);
+    }
 
     public override IEnumerable<double> EstimatedValues {
@@ -60,5 +63,5 @@
 
     public override IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows) {
-      var rowsToEvaluate = rows.Except(evaluationCache.Keys);
+      var rowsToEvaluate = rows.Where(row => !evaluationCache.ContainsKey(row));
       var rowsEnumerator = rowsToEvaluate.GetEnumerator();
       var valuesEnumerator = Model.GetEstimatedValues(ProblemData.Dataset, rowsToEvaluate).GetEnumerator();
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using HeuristicLab.Common;
@@ -39,6 +40,13 @@
     protected const string TrainingNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (training)";
     protected const string TestNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (test)";
-    protected const string TrainingMeanErrorResultName = "Mean error (training)";
-    protected const string TestMeanErrorResultName = "Mean error (test)";
+    protected const string TrainingRootMeanSquaredErrorResultName = "Root mean squared error (training)";
+    protected const string TestRootMeanSquaredErrorResultName = "Root mean squared error (test)";
+
+    // BackwardsCompatibility3.3
+    #region Backwards compatible code, remove with 3.5
+    private const string TrainingMeanErrorResultName = "Mean error (training)";
+    private const string TestMeanErrorResultName = "Mean error (test)";
+    #endregion
+
 
     protected const string TrainingMeanSquaredErrorResultDescription = "Mean of squared errors of the model on the training partition";
@@ -52,6 +60,6 @@
     protected const string TrainingNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the training partition";
     protected const string TestNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the test partition";
-    protected const string TrainingMeanErrorResultDescription = "Mean of errors of the model on the training partition";
-    protected const string TestMeanErrorResultDescription = "Mean of errors of the model on the test partition";
+    protected const string TrainingRootMeanSquaredErrorResultDescription = "Root mean of squared errors of the model on the training partition";
+    protected const string TestRootMeanSquaredErrorResultDescription = "Root mean of squared errors of the model on the test partition";
 
     public new IRegressionModel Model {
@@ -111,12 +119,36 @@
       private set { ((DoubleValue)this[TestNormalizedMeanSquaredErrorResultName].Value).Value = value; }
     }
-    public double TrainingMeanError {
-      get { return ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value; }
-      private set { ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value = value; }
-    }
-    public double TestMeanError {
-      get { return ((DoubleValue)this[TestMeanErrorResultName].Value).Value; }
-      private set { ((DoubleValue)this[TestMeanErrorResultName].Value).Value = value; }
-    }
+    public double TrainingRootMeanSquaredError {
+      get { return ((DoubleValue)this[TrainingRootMeanSquaredErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingRootMeanSquaredErrorResultName].Value).Value = value; }
+    }
+    public double TestRootMeanSquaredError {
+      get { return ((DoubleValue)this[TestRootMeanSquaredErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestRootMeanSquaredErrorResultName].Value).Value = value; }
+    }
+
+    // BackwardsCompatibility3.3
+    #region Backwards compatible code, remove with 3.5
+    private double TrainingMeanError {
+      get {
+        if (!ContainsKey(TrainingMeanErrorResultName)) return double.NaN;
+        return ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value;
+      }
+      set {
+        if (ContainsKey(TrainingMeanErrorResultName))
+          ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value = value;
+      }
+    }
+    private double TestMeanError {
+      get {
+        if (!ContainsKey(TestMeanErrorResultName)) return double.NaN;
+        return ((DoubleValue)this[TestMeanErrorResultName].Value).Value;
+      }
+      set {
+        if (ContainsKey(TestMeanErrorResultName))
+          ((DoubleValue)this[TestMeanErrorResultName].Value).Value = value;
+      }
+    }
+    #endregion
     #endregion
 
@@ -138,6 +170,6 @@
       Add(new Result(TrainingNormalizedMeanSquaredErrorResultName, TrainingNormalizedMeanSquaredErrorResultDescription, new DoubleValue()));
       Add(new Result(TestNormalizedMeanSquaredErrorResultName, TestNormalizedMeanSquaredErrorResultDescription, new DoubleValue()));
-      Add(new Result(TrainingMeanErrorResultName, TrainingMeanErrorResultDescription, new DoubleValue()));
-      Add(new Result(TestMeanErrorResultName, TestMeanErrorResultDescription, new DoubleValue()));
+      Add(new Result(TrainingRootMeanSquaredErrorResultName, TrainingRootMeanSquaredErrorResultDescription, new DoubleValue()));
+      Add(new Result(TestRootMeanSquaredErrorResultName, TestRootMeanSquaredErrorResultDescription, new DoubleValue()));
     }
 
@@ -145,7 +177,5 @@
     private void AfterDeserialization() {
       // BackwardsCompatibility3.4
-
       #region Backwards compatible code, remove with 3.5
-
       if (!ContainsKey(TrainingMeanAbsoluteErrorResultName)) {
         OnlineCalculatorError errorState;
@@ -162,15 +192,16 @@
       }
 
-      if (!ContainsKey(TrainingMeanErrorResultName)) {
-        OnlineCalculatorError errorState;
-        Add(new Result(TrainingMeanErrorResultName, "Mean of errors of the model on the training partition", new DoubleValue()));
-        double trainingME = OnlineMeanErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState);
-        TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN;
-      }
-      if (!ContainsKey(TestMeanErrorResultName)) {
-        OnlineCalculatorError errorState;
-        Add(new Result(TestMeanErrorResultName, "Mean of errors of the model on the test partition", new DoubleValue()));
-        double testME = OnlineMeanErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState);
-        TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN;
+      if (!ContainsKey(TrainingRootMeanSquaredErrorResultName)) {
+        OnlineCalculatorError errorState;
+        Add(new Result(TrainingRootMeanSquaredErrorResultName, TrainingRootMeanSquaredErrorResultDescription, new DoubleValue()));
+        double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState);
+        TrainingRootMeanSquaredError = errorState == OnlineCalculatorError.None ? Math.Sqrt(trainingMSE) : double.NaN;
+      }
+
+      if (!ContainsKey(TestRootMeanSquaredErrorResultName)) {
+        OnlineCalculatorError errorState;
+        Add(new Result(TestRootMeanSquaredErrorResultName, TestRootMeanSquaredErrorResultDescription, new DoubleValue()));
+        double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState);
+        TestRootMeanSquaredError = errorState == OnlineCalculatorError.None ? Math.Sqrt(testMSE) : double.NaN;
       }
       #endregion
@@ -198,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);
@@ -213,8 +244,18 @@
       TestNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? testNMSE : double.NaN;
 
-      double trainingME = OnlineMeanErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
-      TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN;
-      double testME = OnlineMeanErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
-      TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN;
+      TrainingRootMeanSquaredError = Math.Sqrt(TrainingMeanSquaredError);
+      TestRootMeanSquaredError = Math.Sqrt(TestMeanSquaredError);
+
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code, remove with 3.5
+      if (ContainsKey(TrainingMeanErrorResultName)) {
+        double trainingME = OnlineMeanErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);
+        TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN;
+      }
+      if (ContainsKey(TestMeanErrorResultName)) {
+        double testME = OnlineMeanErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);
+        TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN;
+      }
+      #endregion
     }
   }
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -39,5 +39,5 @@
     public ConstantTimeSeriesPrognosisModel(double constant) : base(constant) { }
 
-    public IEnumerable<IEnumerable<double>> GetPrognosedValues(Dataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) {
+    public IEnumerable<IEnumerable<double>> GetPrognosedValues(IDataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) {
       return horizons.Select(horizon => Enumerable.Repeat(Constant, horizon));
     }
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/TimeSeriesPrognosisAutoRegressiveModel.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/TimeSeriesPrognosisAutoRegressiveModel.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/TimeSeriesPrognosisAutoRegressiveModel.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -58,5 +58,5 @@
     }
 
-    public IEnumerable<IEnumerable<double>> GetPrognosedValues(Dataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) {
+    public IEnumerable<IEnumerable<double>> GetPrognosedValues(IDataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) {
       var rowsEnumerator = rows.GetEnumerator();
       var horizonsEnumerator = horizons.GetEnumerator();
@@ -91,5 +91,5 @@
     }
 
-    public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) {
+    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
       var targetVariables = dataset.GetReadOnlyDoubleValues(TargetVariable);
       foreach (int row in rows) {
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblem.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblem.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblem.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -27,5 +27,4 @@
   [StorableClass]
   [Item("Time-series Prognosis Problem", "A general time-series prognosis problem.")]
-  [Creatable("Problems")]
   public class TimeSeriesPrognosisProblem : DataAnalysisProblem<ITimeSeriesPrognosisProblemData>, ITimeSeriesPrognosisProblem {
     [StorableConstructor]
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -1582,5 +1582,5 @@
       TrainingPartition.Start = 50;
     }
-    public TimeSeriesPrognosisProblemData(Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
+    public TimeSeriesPrognosisProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null)
       : base(dataset, allowedInputVariables, targetVariable, transformations ?? Enumerable.Empty<ITransformation>()) {
       Parameters.Add(new FixedValueParameter<IntValue>(TrainingHorizonParameterName, "Specifies the horizon (how far the prognosis reaches in the future) for each training sample.", new IntValue(1)));
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -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: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolution.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolution.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolution.cs	(revision 12694)
@@ -1,5 +1,5 @@
 #region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/CopyColumnTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/CopyColumnTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/CopyColumnTransformation.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -29,4 +29,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("CopyColumnTransformation", "Represents a transformation which represents a copied Column.")]
   public class CopyColumnTransformation : Transformation {
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ExponentialTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ExponentialTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ExponentialTransformation.cs	(revision 12694)
@@ -1,4 +1,5 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -8,4 +9,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Exponential Transformation", "f(x) = b ^ x | Represents a exponential transformation.")]
   public class ExponentialTransformation : Transformation<double> {
@@ -44,7 +46,5 @@
 
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
-      foreach (double d in data) {
-        yield return Math.Pow(Base, d);
-      }
+      return data.Select(d => Math.Pow(Base, d));
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LinearTransformation.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -31,4 +31,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Linear Transformation", "f(x) = k * x + d | Represents a linear transformation with multiplication and addition.")]
   public class LinearTransformation : Transformation<double> {
@@ -80,10 +81,12 @@
 
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
-      return data.Select(e => e * Multiplier + Addend);
+      var m = Multiplier;
+      var a = Addend;
+      return data.Select(e => e * m + a);
     }
 
     public override bool Check(IEnumerable<double> data, out string errorMsg) {
       errorMsg = null;
-      if (Multiplier == 0.0) {
+      if (Multiplier.IsAlmost(0.0)) {
         errorMsg = String.Format("Multiplicand is 0, all {0} entries will be set to {1}. Inverse apply will not be possible (division by 0).", data.Count(), Addend);
         return false;
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LogarithmicTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LogarithmicTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/LogarithmicTransformation.cs	(revision 12694)
@@ -9,4 +9,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Logarithmic Transformation", "f(x) = log(x, b) | Represents a logarithmic transformation.")]
   public class LogarithmicTransformation : Transformation<double> {
@@ -43,10 +44,6 @@
 
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
-      foreach (double i in data) {
-        if (i > 0.0)
-          yield return Math.Log(i, Base);
-        else
-          yield return i;
-      }
+      var b = Base;
+      return data.Select(d => d > 0.0 ? Math.Log(d, b) : d);
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/PowerTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/PowerTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/PowerTransformation.cs	(revision 12694)
@@ -1,4 +1,5 @@
 ﻿using System;
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -8,4 +9,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Power Transformation", "f(x) = x ^ exp | Represents a power transformation.")]
   public class PowerTransformation : Transformation<double> {
@@ -42,7 +44,5 @@
 
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
-      foreach (double i in data) {
-        yield return Math.Pow(i, Exponent);
-      }
+      return data.Select(i => Math.Pow(i, Exponent));
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ReciprocalTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ReciprocalTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ReciprocalTransformation.cs	(revision 12694)
@@ -7,4 +7,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Reciprocal Transformation", "f(x) = 1 / x | Represents a reciprocal transformation.")]
   public class ReciprocalTransformation : Transformation<double> {
@@ -16,5 +17,4 @@
     #endregion
 
-    //TODO: is a special case of Linear
     [StorableConstructor]
     protected ReciprocalTransformation(bool deserializing) : base(deserializing) { }
@@ -31,10 +31,5 @@
 
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
-      foreach (double i in data) {
-        if (i > 0.0)
-          yield return 1.0 / i;
-        else
-          yield return i;
-      }
+      return data.Select(d => d > 0 ? 1.0 / d : d);
     }
 
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftStandardDistributionTransformation.cs	(revision 12694)
@@ -8,4 +8,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Shift Standard Distribution Transformation", "f(x) = ((x - m_org) / s_org ) * s_tar + m_tar | Represents Transformation to unit standard deviation and additional linear transformation to a target Mean and Standard deviation")]
   public class ShiftStandardDistributionTransformation : Transformation<double> {
@@ -69,20 +70,16 @@
     }
 
-    // http://en.wikipedia.org/wiki/Standard_deviation
-    // http://www.statistics4u.info/fundstat_germ/ee_ztransform.html
-    // https://www.uni-due.de/~bm0061/vorl12.pdf p5
     public override IEnumerable<double> Apply(IEnumerable<double> data) {
       ConfigureParameters(data);
-      if (OriginalStandardDeviation == 0.0) {
-        foreach (var e in data) {
-          yield return e;
-        }
-        yield break;
+      if (OriginalStandardDeviation.IsAlmost(0.0)) {
+        return data;
       }
-
-      foreach (var e in data) {
-        double unitNormalDistributedValue = (e - OriginalMean) / OriginalStandardDeviation;
-        yield return unitNormalDistributedValue * StandardDeviation + Mean;
-      }
+      var old_m = OriginalMean;
+      var old_s = OriginalStandardDeviation;
+      var m = Mean;
+      var s = StandardDeviation;
+      return data
+        .Select(d => (d - old_m) / old_s) // standardized
+        .Select(d => d * s + m);
     }
 
@@ -90,5 +87,5 @@
       ConfigureParameters(data);
       errorMsg = "";
-      if (OriginalStandardDeviation == 0.0) {
+      if (OriginalStandardDeviation.IsAlmost(0.0)) {
         errorMsg = "Standard deviaton for the original data is 0.0, Transformation cannot be applied onto these values.";
         return false;
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/ShiftToRangeTransformation.cs	(revision 12694)
@@ -8,4 +8,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
   [Item("Shift to Range Transformation", "f(x) = k * x + d, start <= f(x) <= end | Represents a linear Transformation using Parameters defining a target range")]
   public class ShiftToRangeTransformation : LinearTransformation {
Index: branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs
===================================================================
--- branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs	(revision 11185)
+++ branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Transformations/Transformation.cs	(revision 12694)
@@ -1,5 +1,5 @@
 ﻿#region License Information
 /* HeuristicLab
- * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
  *
  * This file is part of HeuristicLab.
@@ -31,5 +31,4 @@
 
   [Item("Transformation", "Represents the base class for a transformation.")]
-  [StorableClass]
   public abstract class Transformation : ParameterizedNamedItem, ITransformation {
     protected const string ColumnParameterName = "Column";
