Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs	(revision 4127)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs	(revision 4128)
@@ -33,5 +33,5 @@
   [Item("SymbolicRegressionNormalizedMeanSquaredErrorEvaluator", "Calculates the normalized mean squared error of a symbolic regression solution.")]
   [StorableClass]
-  public class SymbolicRegressionNormalizedMeanSquaredErrorEvaluator : SymbolicRegressionEvaluator {
+  public class SymbolicRegressionNormalizedMeanSquaredErrorEvaluator : SingleObjectiveSymbolicRegressionEvaluator {
     private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
     private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 4127)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 4128)
@@ -129,20 +129,19 @@
     <Compile Include="Symbolic\Analyzers\SymbolicRegressionVariableFrequencyAnalyzer.cs" />
     <Compile Include="Symbolic\Analyzers\ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs" />
-    <Compile Include="Symbolic\SymbolicRegressionPearsonsRSquaredEvaluator.cs" />
-    <Compile Include="Symbolic\SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\MultiObjectiveSymbolicRegressionEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\SingleObjectiveSymbolicRegressionEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\SymbolicRegressionMeanSquaredErrorEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\SymbolicRegressionPearsonsRSquaredEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs" />
+    <Compile Include="Symbolic\Evaluators\SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs" />
+    <Compile Include="Symbolic\Interfaces\IMultiObjectiveSymbolicRegressionEvaluator.cs" />
+    <Compile Include="Symbolic\Interfaces\ISymbolicRegressionEvaluator.cs" />
+    <Compile Include="Symbolic\SymbolicRegressionProblem.cs" />
+    <Compile Include="Symbolic\MultiObjectiveSymbolicRegressionProblem.cs" />
     <Compile Include="Symbolic\SimpleSymbolicRegressionEvaluator.cs" />
-    <Compile Include="Symbolic\SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs" />
     <Compile Include="Symbolic\SymbolicRegressionSolution.cs" />
     <Compile Include="Symbolic\SymbolicRegressionModel.cs" />
-    <Compile Include="Symbolic\ISymbolicRegressionEvaluator.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Symbolic\SymbolicRegressionEvaluator.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Symbolic\SymbolicRegressionMeanSquaredErrorEvaluator.cs">
-      <SubType>Code</SubType>
-    </Compile>
-    <Compile Include="Symbolic\SymbolicRegressionProblem.cs">
+    <Compile Include="Symbolic\SymbolicRegressionProblemBase.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -251,4 +250,5 @@
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
@@ -0,0 +1,138 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("MultiObjectiveSymbolicRegressionEvaluator", "Evaluates a symbolic regression solution.")]
+  [StorableClass]
+  public abstract class MultiObjectiveSymbolicRegressionEvaluator : SingleSuccessorOperator, IMultiObjectiveSymbolicRegressionEvaluator {
+    private const string RandomParameterName = "Random";
+    private const string QualitiesParameterName = "Qualities";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string FunctionTreeParameterName = "FunctionTree";
+    private const string RegressionProblemDataParameterName = "RegressionProblemData";
+    private const string SamplesStartParameterName = "SamplesStart";
+    private const string SamplesEndParameterName = "SamplesEnd";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    #region ISymbolicRegressionEvaluator Members
+
+    public ILookupParameter<DoubleArray> QualitiesParameter {
+      get { return (ILookupParameter<DoubleArray>)Parameters[QualitiesParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+
+    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[FunctionTreeParameterName]; }
+    }
+
+    public ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter {
+      get { return (ILookupParameter<DataAnalysisProblemData>)Parameters[RegressionProblemDataParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> SamplesStartParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> SamplesEndParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; }
+    }
+
+    public IValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+
+    #endregion
+    #region properties
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
+    }
+    public SymbolicExpressionTree SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    public DataAnalysisProblemData RegressionProblemData {
+      get { return RegressionProblemDataParameter.ActualValue; }
+    }
+    public IntValue SamplesStart {
+      get { return SamplesStartParameter.ActualValue; }
+    }
+    public IntValue SamplesEnd {
+      get { return SamplesEndParameter.ActualValue; }
+    }
+
+    public PercentValue RelativeNumberOfEvaluatedSamples {
+      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
+    }
+    #endregion
+
+    public MultiObjectiveSymbolicRegressionEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+      Parameters.Add(new LookupParameter<DoubleArray>(QualitiesParameterName, "The qualities of the evaluated symbolic regression solution."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(FunctionTreeParameterName, "The symbolic regression solution encoded as a symbolic expression tree."));
+      Parameters.Add(new LookupParameter<DataAnalysisProblemData>(RegressionProblemDataParameterName, "The problem data on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start index of the dataset partition on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end index of the dataset partition on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
+    }
+
+    [StorableConstructor]
+    protected MultiObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { }
+    [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IOperation Apply() {
+      uint seed = (uint)Random.Next();
+      IEnumerable<int> rows = SingleObjectiveSymbolicRegressionEvaluator.GenerateRowsToEvaluate(seed, RelativeNumberOfEvaluatedSamples.Value, SamplesStart.Value, SamplesEnd.Value);
+      double[] qualities = Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, RegressionProblemData.Dataset,
+        RegressionProblemData.TargetVariable, rows);
+      QualitiesParameter.ActualValue = new DoubleArray(qualities);
+      return base.Apply();
+    }
+
+
+    protected abstract double[] Evaluate(ISymbolicExpressionTreeInterpreter interpreter,
+      SymbolicExpressionTree solution,
+      Dataset dataset,
+      StringValue targetVariable,
+      IEnumerable<int> rows);
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator.cs	(revision 4128)
@@ -0,0 +1,74 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator", "Calculates the correlation coefficient r² and the number of variables of a symbolic regression solution.")]
+  [StorableClass]
+  public class MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator : MultiObjectiveSymbolicRegressionEvaluator {
+    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
+    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
+
+    #region parameter properties
+    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue UpperEstimationLimit {
+      get { return UpperEstimationLimitParameter.ActualValue; }
+    }
+    public DoubleValue LowerEstimationLimit {
+      get { return LowerEstimationLimitParameter.ActualValue; }
+    }
+    #endregion
+    public MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
+    }
+
+    protected override double[] Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
+      double r2 = SymbolicRegressionPearsonsRSquaredEvaluator.Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
+      List<string> vars = new List<string>();
+      solution.Root.ForEachNodePostfix(n => {
+        var varNode = n as VariableTreeNode;
+        if (varNode != null && !vars.Contains(varNode.VariableName)) {
+          vars.Add(varNode.VariableName);
+        }
+      });
+      return new double[2] { r2, vars.Count };
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SingleObjectiveSymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SingleObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SingleObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
@@ -0,0 +1,149 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("SingleObjectiveSymbolicRegressionEvaluator", "Evaluates a symbolic regression solution.")]
+  [StorableClass]
+  public abstract class SingleObjectiveSymbolicRegressionEvaluator : SingleSuccessorOperator, ISymbolicRegressionEvaluator {
+    private const string RandomParameterName = "Random";
+    private const string QualityParameterName = "Quality";
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string FunctionTreeParameterName = "FunctionTree";
+    private const string RegressionProblemDataParameterName = "RegressionProblemData";
+    private const string SamplesStartParameterName = "SamplesStart";
+    private const string SamplesEndParameterName = "SamplesEnd";
+    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
+    #region ISymbolicRegressionEvaluator Members
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+
+    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+
+    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[FunctionTreeParameterName]; }
+    }
+
+    public ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter {
+      get { return (ILookupParameter<DataAnalysisProblemData>)Parameters[RegressionProblemDataParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> SamplesStartParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; }
+    }
+
+    public IValueLookupParameter<IntValue> SamplesEndParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; }
+    }
+
+    public IValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
+      get { return (IValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
+    }
+
+    #endregion
+    #region properties
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
+    }
+    public SymbolicExpressionTree SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
+    }
+    public DataAnalysisProblemData RegressionProblemData {
+      get { return RegressionProblemDataParameter.ActualValue; }
+    }
+    public IntValue SamplesStart {
+      get { return SamplesStartParameter.ActualValue; }
+    }
+    public IntValue SamplesEnd {
+      get { return SamplesEndParameter.ActualValue; }
+    }
+
+    public PercentValue RelativeNumberOfEvaluatedSamples {
+      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
+    }
+    #endregion
+
+    public SingleObjectiveSymbolicRegressionEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic regression solution."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(FunctionTreeParameterName, "The symbolic regression solution encoded as a symbolic expression tree."));
+      Parameters.Add(new LookupParameter<DataAnalysisProblemData>(RegressionProblemDataParameterName, "The problem data on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start index of the dataset partition on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end index of the dataset partition on which the symbolic regression solution should be evaluated."));
+      Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
+    }
+
+    [StorableConstructor]
+    protected SingleObjectiveSymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { }
+    [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (!Parameters.ContainsKey(RelativeNumberOfEvaluatedSamplesParameterName))
+        Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
+      if (!Parameters.ContainsKey(RandomParameterName))
+        Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
+    }
+
+    public override IOperation Apply() {
+      uint seed = (uint)Random.Next();
+      IEnumerable<int> rows = GenerateRowsToEvaluate(seed, RelativeNumberOfEvaluatedSamples.Value, SamplesStart.Value, SamplesEnd.Value);
+      double quality = Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, RegressionProblemData.Dataset,
+        RegressionProblemData.TargetVariable, rows);
+      QualityParameter.ActualValue = new DoubleValue(quality);
+      return base.Apply();
+    }
+
+
+    internal static IEnumerable<int> GenerateRowsToEvaluate(uint seed, double relativeAmount, int start, int end) {
+      if (end < start) throw new ArgumentException("Start value is larger than end value.");
+      int count = (int)((end - start) * relativeAmount);
+      if (count == 0) count = 1;
+      return RandomEnumerable.SampleRandomNumbers(seed, start, end, count);
+    }
+
+    protected abstract double Evaluate(ISymbolicExpressionTreeInterpreter interpreter,
+      SymbolicExpressionTree solution,
+      Dataset dataset,
+      StringValue targetVariable,
+      IEnumerable<int> rows);
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 4128)
@@ -0,0 +1,90 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("SymbolicRegressionMeanSquaredErrorEvaluator", "Calculates the mean squared error of a symbolic regression solution.")]
+  [StorableClass]
+  public class SymbolicRegressionMeanSquaredErrorEvaluator : SingleObjectiveSymbolicRegressionEvaluator {
+    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
+    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
+
+    #region parameter properties
+    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue UpperEstimationLimit {
+      get { return UpperEstimationLimitParameter.ActualValue; }
+    }
+    public DoubleValue LowerEstimationLimit {
+      get { return LowerEstimationLimitParameter.ActualValue; }
+    }
+    #endregion
+    public SymbolicRegressionMeanSquaredErrorEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
+    }
+
+    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
+      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
+      return mse;
+    }
+
+    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
+      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double estimated = estimatedEnumerator.Current;
+        double original = originalEnumerator.Current;
+        if (double.IsNaN(estimated))
+          estimated = upperEstimationLimit;
+        else
+          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
+        mseEvaluator.Add(original, estimated);
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      } else {
+        return mseEvaluator.MeanSquaredError;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionPearsonsRSquaredEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionPearsonsRSquaredEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionPearsonsRSquaredEvaluator.cs	(revision 4128)
@@ -0,0 +1,90 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("SymbolicRegressionPearsonsRSquaredEvaluator", "Calculates the pearson r² correlation coefficient of a symbolic regression solution.")]
+  [StorableClass]
+  public class SymbolicRegressionPearsonsRSquaredEvaluator : SingleObjectiveSymbolicRegressionEvaluator {
+    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
+    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
+
+    #region parameter properties
+    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue UpperEstimationLimit {
+      get { return UpperEstimationLimitParameter.ActualValue; }
+    }
+    public DoubleValue LowerEstimationLimit {
+      get { return LowerEstimationLimitParameter.ActualValue; }
+    }
+    #endregion
+    public SymbolicRegressionPearsonsRSquaredEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
+    }
+
+    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
+      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
+      return mse;
+    }
+
+    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
+      OnlinePearsonsRSquaredEvaluator r2Evaluator = new OnlinePearsonsRSquaredEvaluator();
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double estimated = estimatedEnumerator.Current;
+        double original = originalEnumerator.Current;
+        if (double.IsNaN(estimated))
+          estimated = upperEstimationLimit;
+        else
+          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
+        r2Evaluator.Add(original, estimated);
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      } else {
+        return r2Evaluator.RSquared;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs	(revision 4128)
@@ -0,0 +1,221 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator", "Calculates the mean and the variance of the squared errors of a linearly scaled symbolic regression solution.")]
+  [StorableClass]
+  public class SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {
+    private const string QualityVarianceParameterName = "QualityVariance";
+    private const string QualitySamplesParameterName = "QualitySamples";
+    private const string DecompositionBiasParameterName = "QualityDecompositionBias";
+    private const string DecompositionVarianceParameterName = "QualityDecompositionVariance";
+    private const string DecompositionCovarianceParameterName = "QualityDecompositionCovariance";
+    private const string ApplyScalingParameterName = "ApplyScaling";
+
+    #region parameter properties
+    public IValueLookupParameter<BoolValue> ApplyScalingParameter {
+      get { return (IValueLookupParameter<BoolValue>)Parameters[ApplyScalingParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> AlphaParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Alpha"]; }
+    }
+    public ILookupParameter<DoubleValue> BetaParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Beta"]; }
+    }
+    public ILookupParameter<DoubleValue> QualityVarianceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityVarianceParameterName]; }
+    }
+    public ILookupParameter<IntValue> QualitySamplesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[QualitySamplesParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> DecompositionBiasParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[DecompositionBiasParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> DecompositionVarianceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[DecompositionVarianceParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> DecompositionCovarianceParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[DecompositionCovarianceParameterName]; }
+    }
+
+    #endregion
+    #region properties
+    public BoolValue ApplyScaling {
+      get { return ApplyScalingParameter.ActualValue; }
+    }
+    public DoubleValue Alpha {
+      get { return AlphaParameter.ActualValue; }
+      set { AlphaParameter.ActualValue = value; }
+    }
+    public DoubleValue Beta {
+      get { return BetaParameter.ActualValue; }
+      set { BetaParameter.ActualValue = value; }
+    }
+    public DoubleValue QualityVariance {
+      get { return QualityVarianceParameter.ActualValue; }
+      set { QualityVarianceParameter.ActualValue = value; }
+    }
+    public IntValue QualitySamples {
+      get { return QualitySamplesParameter.ActualValue; }
+      set { QualitySamplesParameter.ActualValue = value; }
+    }
+    #endregion
+    public SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<BoolValue>(ApplyScalingParameterName, "Determines if the estimated values should be scaled.", new BoolValue(true)));
+      Parameters.Add(new LookupParameter<DoubleValue>("Alpha", "Alpha parameter for linear scaling of the estimated values."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Beta", "Beta parameter for linear scaling of the estimated values."));
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityVarianceParameterName, "A parameter which stores the variance of the squared errors."));
+      Parameters.Add(new LookupParameter<IntValue>(QualitySamplesParameterName, " The number of evaluated samples."));
+      Parameters.Add(new LookupParameter<DoubleValue>(DecompositionBiasParameterName, "A parameter which stores the relativ bias of the MSE."));
+      Parameters.Add(new LookupParameter<DoubleValue>(DecompositionVarianceParameterName, "A parameter which stores the relativ bias of the MSE."));
+      Parameters.Add(new LookupParameter<DoubleValue>(DecompositionCovarianceParameterName, "A parameter which stores the relativ bias of the MSE."));
+    }
+
+    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
+      double alpha, beta;
+      double meanSE, varianceSE;
+      int count;
+      double bias, variance, covariance;
+      double mse;
+      if (ApplyScaling.Value) {
+        mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, out beta, out alpha, out meanSE, out varianceSE, out count, out bias, out variance, out covariance);
+        Alpha = new DoubleValue(alpha);
+        Beta = new DoubleValue(beta);
+      } else {
+        mse = CalculateWithScaling(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, 1, 0, out meanSE, out varianceSE, out count, out bias, out variance, out covariance);
+      }
+      QualityVariance = new DoubleValue(varianceSE);
+      QualitySamples = new IntValue(count);
+      DecompositionBiasParameter.ActualValue = new DoubleValue(bias / meanSE);
+      DecompositionVarianceParameter.ActualValue = new DoubleValue(variance / meanSE);
+      DecompositionCovarianceParameter.ActualValue = new DoubleValue(covariance / meanSE);
+      return mse;
+    }
+
+    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, out double beta, out double alpha, out double meanSE, out double varianceSE, out int count, out double bias, out double variance, out double covariance) {
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      CalculateScalingParameters(originalValues, estimatedValues, out beta, out alpha);
+
+      return CalculateWithScaling(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, beta, alpha, out meanSE, out varianceSE, out count, out bias, out variance, out covariance);
+    }
+
+    public static double CalculateWithScaling(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, double beta, double alpha, out double meanSE, out double varianceSE, out int count, out double bias, out double variance, out double covariance) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
+      OnlineMeanAndVarianceCalculator seEvaluator = new OnlineMeanAndVarianceCalculator();
+      OnlineMeanAndVarianceCalculator originalMeanEvaluator = new OnlineMeanAndVarianceCalculator();
+      OnlineMeanAndVarianceCalculator estimatedMeanEvaluator = new OnlineMeanAndVarianceCalculator();
+      OnlinePearsonsRSquaredEvaluator r2Evaluator = new OnlinePearsonsRSquaredEvaluator();
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double estimated = estimatedEnumerator.Current * beta + alpha;
+        double original = originalEnumerator.Current;
+        if (double.IsNaN(estimated))
+          estimated = upperEstimationLimit;
+        else
+          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
+        double error = estimated - original;
+        error *= error;
+        seEvaluator.Add(error);
+        originalMeanEvaluator.Add(original);
+        estimatedMeanEvaluator.Add(estimated);
+        r2Evaluator.Add(original, estimated);
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      } else {
+        meanSE = seEvaluator.Mean;
+        varianceSE = seEvaluator.Variance;
+        count = seEvaluator.Count;
+        bias = (originalMeanEvaluator.Mean - estimatedMeanEvaluator.Mean);
+        bias *= bias;
+
+        double sO = Math.Sqrt(originalMeanEvaluator.Variance);
+        double sE = Math.Sqrt(estimatedMeanEvaluator.Variance);
+        variance = sO - sE;
+        variance *= variance;
+        double r = Math.Sqrt(r2Evaluator.RSquared);
+        covariance = 2 * sO * sE * (1 - r);
+        return seEvaluator.Mean;
+      }
+    }
+
+    /// <summary>
+    /// Calculates linear scaling parameters in one pass.
+    /// The formulas to calculate the scaling parameters were taken from Scaled Symblic Regression by Maarten Keijzer.
+    /// http://www.springerlink.com/content/x035121165125175/
+    /// </summary>
+    public static void CalculateScalingParameters(IEnumerable<double> original, IEnumerable<double> estimated, out double beta, out double alpha) {
+      IEnumerator<double> originalEnumerator = original.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimated.GetEnumerator();
+      OnlineMeanAndVarianceCalculator yVarianceCalculator = new OnlineMeanAndVarianceCalculator();
+      OnlineMeanAndVarianceCalculator tMeanCalculator = new OnlineMeanAndVarianceCalculator();
+      OnlineCovarianceEvaluator ytCovarianceEvaluator = new OnlineCovarianceEvaluator();
+      int cnt = 0;
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double y = estimatedEnumerator.Current;
+        double t = originalEnumerator.Current;
+        if (IsValidValue(t) && IsValidValue(y)) {
+          tMeanCalculator.Add(t);
+          yVarianceCalculator.Add(y);
+          ytCovarianceEvaluator.Add(y, t);
+
+          cnt++;
+        }
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      if (cnt < 2) {
+        alpha = 0;
+        beta = 1;
+      } else {
+        if (yVarianceCalculator.Variance.IsAlmost(0.0))
+          beta = 1;
+        else
+          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.Variance;
+
+        alpha = tMeanCalculator.Mean - beta * yVarianceCalculator.Mean;
+      }
+    }
+
+    private static bool IsValidValue(double d) {
+      return !double.IsInfinity(d) && !double.IsNaN(d) && d > -1.0E07 && d < 1.0E07;  // don't consider very large or very small values for scaling
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4128)
@@ -0,0 +1,146 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.DataAnalysis.Evaluators;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("SymbolicRegressionScaledMeanSquaredErrorEvaluator", "Calculates the mean squared error of a linearly scaled symbolic regression solution.")]
+  [StorableClass]
+  public class SymbolicRegressionScaledMeanSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {
+
+    #region parameter properties
+    public ILookupParameter<DoubleValue> AlphaParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Alpha"]; }
+    }
+    public ILookupParameter<DoubleValue> BetaParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Beta"]; }
+    }
+    #endregion
+    #region properties
+    public DoubleValue Alpha {
+      get { return AlphaParameter.ActualValue; }
+      set { AlphaParameter.ActualValue = value; }
+    }
+    public DoubleValue Beta {
+      get { return BetaParameter.ActualValue; }
+      set { BetaParameter.ActualValue = value; }
+    }
+    #endregion
+    public SymbolicRegressionScaledMeanSquaredErrorEvaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Alpha", "Alpha parameter for linear scaling of the estimated values."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Beta", "Beta parameter for linear scaling of the estimated values."));
+    }
+
+    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
+      double alpha, beta;
+      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, out beta, out alpha);
+      AlphaParameter.ActualValue = new DoubleValue(alpha);
+      BetaParameter.ActualValue = new DoubleValue(beta);
+      return mse;
+    }
+
+    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, out double beta, out double alpha) {
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      CalculateScalingParameters(originalValues, estimatedValues, out beta, out alpha);
+
+      return CalculateWithScaling(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, beta, alpha);
+    }
+
+    public static double CalculateWithScaling(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, double beta, double alpha) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
+      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
+      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double estimated = estimatedEnumerator.Current * beta + alpha;
+        double original = originalEnumerator.Current;
+        if (double.IsNaN(estimated))
+          estimated = upperEstimationLimit;
+        else
+          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
+        mseEvaluator.Add(original, estimated);
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      } else {
+        return mseEvaluator.MeanSquaredError;
+      }
+    }
+
+    /// <summary>
+    /// Calculates linear scaling parameters in one pass.
+    /// The formulas to calculate the scaling parameters were taken from Scaled Symblic Regression by Maarten Keijzer.
+    /// http://www.springerlink.com/content/x035121165125175/
+    /// </summary>
+    public static void CalculateScalingParameters(IEnumerable<double> original, IEnumerable<double> estimated, out double beta, out double alpha) {
+      IEnumerator<double> originalEnumerator = original.GetEnumerator();
+      IEnumerator<double> estimatedEnumerator = estimated.GetEnumerator();
+      OnlineMeanAndVarianceCalculator yVarianceCalculator = new OnlineMeanAndVarianceCalculator();
+      OnlineMeanAndVarianceCalculator tMeanCalculator = new OnlineMeanAndVarianceCalculator();
+      OnlineCovarianceEvaluator ytCovarianceEvaluator = new OnlineCovarianceEvaluator();
+      int cnt = 0;
+
+      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
+        double y = estimatedEnumerator.Current;
+        double t = originalEnumerator.Current;
+        if (IsValidValue(t) && IsValidValue(y)) {
+          tMeanCalculator.Add(t);
+          yVarianceCalculator.Add(y);
+          ytCovarianceEvaluator.Add(y, t);
+
+          cnt++;
+        }
+      }
+
+      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())
+        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
+      if (cnt < 2) {
+        alpha = 0;
+        beta = 1;
+      } else {
+        if (yVarianceCalculator.Variance.IsAlmost(0.0))
+          beta = 1;
+        else
+          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.Variance;
+
+        alpha = tMeanCalculator.Mean - beta * yVarianceCalculator.Mean;
+      }
+    }
+
+    private static bool IsValidValue(double d) {
+      return !double.IsInfinity(d) && !double.IsNaN(d) && d > -1.0E07 && d < 1.0E07;  // don't consider very large or very small values for scaling
+    }
+  }
+}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/ISymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/ISymbolicRegressionEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  public interface ISymbolicRegressionEvaluator : ISingleObjectiveEvaluator {
-    ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
-    ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter { get; }
-    IValueLookupParameter<IntValue> SamplesStartParameter { get; }
-    IValueLookupParameter<IntValue> SamplesEndParameter { get; }
-  }
-}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/IMultiObjectiveSymbolicRegressionEvaluator.cs	(revision 4128)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  public interface IMultiObjectiveSymbolicRegressionEvaluator : IMultiObjectiveEvaluator {
+    ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter { get; }
+    IValueLookupParameter<IntValue> SamplesStartParameter { get; }
+    IValueLookupParameter<IntValue> SamplesEndParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/ISymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/ISymbolicRegressionEvaluator.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Interfaces/ISymbolicRegressionEvaluator.cs	(revision 4128)
@@ -0,0 +1,34 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  public interface ISymbolicRegressionEvaluator : ISingleObjectiveEvaluator {
+    ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter { get; }
+    IValueLookupParameter<IntValue> SamplesStartParameter { get; }
+    IValueLookupParameter<IntValue> SamplesEndParameter { get; }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/MultiObjectiveSymbolicRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/MultiObjectiveSymbolicRegressionProblem.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/MultiObjectiveSymbolicRegressionProblem.cs	(revision 4128)
@@ -0,0 +1,141 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [Item("Symbolic Regression Problem (multi objective)", "Represents a multi objective symbolic regression problem.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public class MultiObjectiveSymbolicRegressionProblem : SymbolicRegressionProblemBase, IMultiObjectiveProblem {
+
+    #region Parameter Properties
+    public ValueParameter<BoolArray> MaximizationParameter {
+      get { return (ValueParameter<BoolArray>)Parameters["Maximization"]; }
+    }
+    IParameter IMultiObjectiveProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public new ValueParameter<IMultiObjectiveSymbolicRegressionEvaluator> EvaluatorParameter {
+      get { return (ValueParameter<IMultiObjectiveSymbolicRegressionEvaluator>)Parameters["Evaluator"]; }
+    }
+    IParameter IProblem.EvaluatorParameter {
+      get { return EvaluatorParameter; }
+    }
+    #endregion
+
+    #region Properties
+    public new IMultiObjectiveSymbolicRegressionEvaluator Evaluator {
+      get { return EvaluatorParameter.Value; }
+      set { EvaluatorParameter.Value = value; }
+    }
+    IMultiObjectiveEvaluator IMultiObjectiveProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    IEvaluator IProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    #endregion
+
+
+    [StorableConstructor]
+    protected MultiObjectiveSymbolicRegressionProblem(bool deserializing) : base(deserializing) { }
+    public MultiObjectiveSymbolicRegressionProblem()
+      : base() {
+      var evaluator = new MultiObjectiveSymbolicRegressionPearsonsRSquaredEvaluator();
+      Parameters.Add(new ValueParameter<BoolArray>("Maximization", "Set to false as the error of the regression model should be minimized.", new BoolArray(new bool[] { true, false })));
+      Parameters.Add(new ValueParameter<IMultiObjectiveSymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator));
+
+      evaluator.QualitiesParameter.ActualName = "TrainingRSquared/Size";
+
+      ParameterizeEvaluator();
+
+      RegisterParameterEvents();
+      RegisterParameterValueEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      MultiObjectiveSymbolicRegressionProblem clone = (MultiObjectiveSymbolicRegressionProblem)base.Clone(cloner);
+      clone.RegisterParameterEvents();
+      clone.RegisterParameterValueEvents();
+      return clone;
+    }
+
+    private void RegisterParameterValueEvents() {
+      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+    }
+
+    private void RegisterParameterEvents() {
+    }
+
+    #region event handling
+    protected override void OnDataAnalysisProblemChanged(EventArgs e) {
+      base.OnDataAnalysisProblemChanged(e);
+      // paritions could be changed
+      ParameterizeEvaluator();
+    }
+    protected override void OnSolutionParameterNameChanged(EventArgs e) {
+      ParameterizeEvaluator();
+    }
+
+    protected virtual void OnEvaluatorChanged(EventArgs e) {
+      ParameterizeEvaluator();
+      RaiseEvaluatorChanged(e);
+    }
+    #endregion
+
+    #region event handlers
+    private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      OnEvaluatorChanged(e);
+    }
+    #endregion
+
+    #region Helpers
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserializationHook() {
+      RegisterParameterEvents();
+      RegisterParameterValueEvents();
+    }
+
+    private void ParameterizeEvaluator() {
+      Evaluator.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      Evaluator.RegressionProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
+      Evaluator.SamplesStartParameter.Value = TrainingSamplesStart;
+      Evaluator.SamplesEndParameter.Value = TrainingSamplesEnd;
+    }
+    #endregion
+  }
+}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,149 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Operators;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("SymbolicRegressionEvaluator", "Evaluates a symbolic regression solution.")]
-  [StorableClass]
-  public abstract class SymbolicRegressionEvaluator : SingleSuccessorOperator, ISymbolicRegressionEvaluator {
-    private const string RandomParameterName = "Random";
-    private const string QualityParameterName = "Quality";
-    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
-    private const string FunctionTreeParameterName = "FunctionTree";
-    private const string RegressionProblemDataParameterName = "RegressionProblemData";
-    private const string SamplesStartParameterName = "SamplesStart";
-    private const string SamplesEndParameterName = "SamplesEnd";
-    private const string RelativeNumberOfEvaluatedSamplesParameterName = "RelativeNumberOfEvaluatedSamples";
-    #region ISymbolicRegressionEvaluator Members
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
-    }
-
-    public ILookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
-    }
-
-    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[FunctionTreeParameterName]; }
-    }
-
-    public ILookupParameter<DataAnalysisProblemData> RegressionProblemDataParameter {
-      get { return (ILookupParameter<DataAnalysisProblemData>)Parameters[RegressionProblemDataParameterName]; }
-    }
-
-    public IValueLookupParameter<IntValue> SamplesStartParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; }
-    }
-
-    public IValueLookupParameter<IntValue> SamplesEndParameter {
-      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; }
-    }
-
-    public IValueParameter<PercentValue> RelativeNumberOfEvaluatedSamplesParameter {
-      get { return (IValueParameter<PercentValue>)Parameters[RelativeNumberOfEvaluatedSamplesParameterName]; }
-    }
-
-    public ILookupParameter<IRandom> RandomParameter {
-      get { return (ILookupParameter<IRandom>)Parameters[RandomParameterName]; }
-    }
-
-    #endregion
-    #region properties
-    public IRandom Random {
-      get { return RandomParameter.ActualValue; }
-    }
-    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
-      get { return SymbolicExpressionTreeInterpreterParameter.ActualValue; }
-    }
-    public SymbolicExpressionTree SymbolicExpressionTree {
-      get { return SymbolicExpressionTreeParameter.ActualValue; }
-    }
-    public DataAnalysisProblemData RegressionProblemData {
-      get { return RegressionProblemDataParameter.ActualValue; }
-    }
-    public IntValue SamplesStart {
-      get { return SamplesStartParameter.ActualValue; }
-    }
-    public IntValue SamplesEnd {
-      get { return SamplesEndParameter.ActualValue; }
-    }
-
-    public PercentValue RelativeNumberOfEvaluatedSamples {
-      get { return RelativeNumberOfEvaluatedSamplesParameter.Value; }
-    }
-    #endregion
-
-    public SymbolicRegressionEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
-      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The quality of the evaluated symbolic regression solution."));
-      Parameters.Add(new LookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(FunctionTreeParameterName, "The symbolic regression solution encoded as a symbolic expression tree."));
-      Parameters.Add(new LookupParameter<DataAnalysisProblemData>(RegressionProblemDataParameterName, "The problem data on which the symbolic regression solution should be evaluated."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The start index of the dataset partition on which the symbolic regression solution should be evaluated."));
-      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The end index of the dataset partition on which the symbolic regression solution should be evaluated."));
-      Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
-    }
-
-    [StorableConstructor]
-    protected SymbolicRegressionEvaluator(bool deserializing) : base(deserializing) { }
-    [StorableHook(Persistence.Default.CompositeSerializers.Storable.HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      if (!Parameters.ContainsKey(RelativeNumberOfEvaluatedSamplesParameterName))
-        Parameters.Add(new ValueParameter<PercentValue>(RelativeNumberOfEvaluatedSamplesParameterName, "The relative number of samples of the dataset partition, which should be randomly chosen for evaluation between the start and end index.", new PercentValue(1)));
-      if (!Parameters.ContainsKey(RandomParameterName))
-        Parameters.Add(new LookupParameter<IRandom>(RandomParameterName, "The random generator to use."));
-    }
-
-    public override IOperation Apply() {
-      uint seed = (uint)Random.Next();
-      IEnumerable<int> rows = GenerateRowsToEvaluate(seed, RelativeNumberOfEvaluatedSamples.Value, SamplesStart.Value, SamplesEnd.Value);
-      double quality = Evaluate(SymbolicExpressionTreeInterpreter, SymbolicExpressionTree, RegressionProblemData.Dataset,
-        RegressionProblemData.TargetVariable, rows);
-      QualityParameter.ActualValue = new DoubleValue(quality);
-      return base.Apply();
-    }
-
-
-    private static IEnumerable<int> GenerateRowsToEvaluate(uint seed, double relativeAmount, int start, int end) {
-      if (end < start) throw new ArgumentException("Start value is larger than end value.");
-      int count = (int)((end - start) * relativeAmount);
-      if (count == 0) count = 1;
-      return RandomEnumerable.SampleRandomNumbers(seed, start, end, count);
-    }
-
-    protected abstract double Evaluate(ISymbolicExpressionTreeInterpreter interpreter,
-      SymbolicExpressionTree solution,
-      Dataset dataset,
-      StringValue targetVariable,
-      IEnumerable<int> rows);
-  }
-}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionMeanSquaredErrorEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("SymbolicRegressionMeanSquaredErrorEvaluator", "Calculates the mean squared error of a symbolic regression solution.")]
-  [StorableClass]
-  public class SymbolicRegressionMeanSquaredErrorEvaluator : SymbolicRegressionEvaluator {
-    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
-    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
-
-    #region parameter properties
-    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
-    }
-    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
-    }
-    #endregion
-    #region properties
-    public DoubleValue UpperEstimationLimit {
-      get { return UpperEstimationLimitParameter.ActualValue; }
-    }
-    public DoubleValue LowerEstimationLimit {
-      get { return LowerEstimationLimitParameter.ActualValue; }
-    }
-    #endregion
-    public SymbolicRegressionMeanSquaredErrorEvaluator()
-      : base() {
-      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
-      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
-    }
-
-    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
-      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
-      return mse;
-    }
-
-    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
-      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double estimated = estimatedEnumerator.Current;
-        double original = originalEnumerator.Current;
-        if (double.IsNaN(estimated))
-          estimated = upperEstimationLimit;
-        else
-          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
-        mseEvaluator.Add(original, estimated);
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      } else {
-        return mseEvaluator.MeanSquaredError;
-      }
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionPearsonsRSquaredEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionPearsonsRSquaredEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,90 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("SymbolicRegressionPearsonsRSquaredEvaluator", "Calculates the pearson r² correlation coefficient of a symbolic regression solution.")]
-  [StorableClass]
-  public class SymbolicRegressionPearsonsRSquaredEvaluator : SymbolicRegressionEvaluator {
-    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
-    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
-
-    #region parameter properties
-    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
-    }
-    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
-      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
-    }
-    #endregion
-    #region properties
-    public DoubleValue UpperEstimationLimit {
-      get { return UpperEstimationLimitParameter.ActualValue; }
-    }
-    public DoubleValue LowerEstimationLimit {
-      get { return LowerEstimationLimitParameter.ActualValue; }
-    }
-    #endregion
-    public SymbolicRegressionPearsonsRSquaredEvaluator()
-      : base() {
-      Parameters.Add(new ValueLookupParameter<DoubleValue>(UpperEstimationLimitParameterName, "The upper limit that should be used as cut off value for the output values of symbolic expression trees."));
-      Parameters.Add(new ValueLookupParameter<DoubleValue>(LowerEstimationLimitParameterName, "The lower limit that should be used as cut off value for the output values of symbolic expression trees."));
-    }
-
-    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
-      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows);
-      return mse;
-    }
-
-    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
-      OnlinePearsonsRSquaredEvaluator r2Evaluator = new OnlinePearsonsRSquaredEvaluator();
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double estimated = estimatedEnumerator.Current;
-        double original = originalEnumerator.Current;
-        if (double.IsNaN(estimated))
-          estimated = upperEstimationLimit;
-        else
-          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
-        r2Evaluator.Add(original, estimated);
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      } else {
-        return r2Evaluator.RSquared;
-      }
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 4127)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblem.cs	(revision 4128)
@@ -38,8 +38,8 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("Symbolic Regression Problem", "Represents a symbolic regression problem.")]
+  [Item("Symbolic Regression Problem (single objective)", "Represents a single objective symbolic regression problem.")]
   [Creatable("Problems")]
   [StorableClass]
-  public class SymbolicRegressionProblem : DataAnalysisProblem, ISingleObjectiveProblem {
+  public class SymbolicRegressionProblem : SymbolicRegressionProblemBase, ISingleObjectiveProblem {
 
     #region Parameter Properties
@@ -50,19 +50,4 @@
       get { return MaximizationParameter; }
     }
-    public new ValueParameter<SymbolicExpressionTreeCreator> SolutionCreatorParameter {
-      get { return (ValueParameter<SymbolicExpressionTreeCreator>)Parameters["SolutionCreator"]; }
-    }
-    IParameter IProblem.SolutionCreatorParameter {
-      get { return SolutionCreatorParameter; }
-    }
-    public ValueParameter<DoubleValue> LowerEstimationLimitParameter {
-      get { return (ValueParameter<DoubleValue>)Parameters["LowerEstimationLimit"]; }
-    }
-    public ValueParameter<DoubleValue> UpperEstimationLimitParameter {
-      get { return (ValueParameter<DoubleValue>)Parameters["UpperEstimationLimit"]; }
-    }
-    public ValueParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
-      get { return (ValueParameter<ISymbolicExpressionTreeInterpreter>)Parameters["SymbolicExpressionTreeInterpreter"]; }
-    }
     public new ValueParameter<ISymbolicRegressionEvaluator> EvaluatorParameter {
       get { return (ValueParameter<ISymbolicRegressionEvaluator>)Parameters["Evaluator"]; }
@@ -70,19 +55,4 @@
     IParameter IProblem.EvaluatorParameter {
       get { return EvaluatorParameter; }
-    }
-    public ValueParameter<ISymbolicExpressionGrammar> FunctionTreeGrammarParameter {
-      get { return (ValueParameter<ISymbolicExpressionGrammar>)Parameters["FunctionTreeGrammar"]; }
-    }
-    public ValueParameter<IntValue> MaxExpressionLengthParameter {
-      get { return (ValueParameter<IntValue>)Parameters["MaxExpressionLength"]; }
-    }
-    public ValueParameter<IntValue> MaxExpressionDepthParameter {
-      get { return (ValueParameter<IntValue>)Parameters["MaxExpressionDepth"]; }
-    }
-    public ValueParameter<IntValue> MaxFunctionDefiningBranchesParameter {
-      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionDefiningBranches"]; }
-    }
-    public ValueParameter<IntValue> MaxFunctionArgumentsParameter {
-      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionArguments"]; }
     }
     public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
@@ -95,40 +65,4 @@
 
     #region Properties
-    public IntValue MaxExpressionLength {
-      get { return MaxExpressionLengthParameter.Value; }
-      set { MaxExpressionLengthParameter.Value = value; }
-    }
-    public IntValue MaxExpressionDepth {
-      get { return MaxExpressionDepthParameter.Value; }
-      set { MaxExpressionDepthParameter.Value = value; }
-    }
-    public IntValue MaxFunctionDefiningBranches {
-      get { return MaxFunctionDefiningBranchesParameter.Value; }
-      set { MaxFunctionDefiningBranchesParameter.Value = value; }
-    }
-    public IntValue MaxFunctionArguments {
-      get { return MaxFunctionArgumentsParameter.Value; }
-      set { MaxFunctionArgumentsParameter.Value = value; }
-    }
-    public new SymbolicExpressionTreeCreator SolutionCreator {
-      get { return SolutionCreatorParameter.Value; }
-      set { SolutionCreatorParameter.Value = value; }
-    }
-    ISolutionCreator IProblem.SolutionCreator {
-      get { return SolutionCreatorParameter.Value; }
-    }
-    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
-      get { return SymbolicExpressionTreeInterpreterParameter.Value; }
-      set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
-    }
-    public DoubleValue LowerEstimationLimit {
-      get { return LowerEstimationLimitParameter.Value; }
-      set { LowerEstimationLimitParameter.Value = value; }
-    }
-    public DoubleValue UpperEstimationLimit {
-      get { return UpperEstimationLimitParameter.Value; }
-      set { UpperEstimationLimitParameter.Value = value; }
-    }
-
     public new ISymbolicRegressionEvaluator Evaluator {
       get { return EvaluatorParameter.Value; }
@@ -141,44 +75,8 @@
       get { return EvaluatorParameter.Value; }
     }
-    public ISymbolicExpressionGrammar FunctionTreeGrammar {
-      get { return (ISymbolicExpressionGrammar)FunctionTreeGrammarParameter.Value; }
-    }
     public DoubleValue BestKnownQuality {
       get { return BestKnownQualityParameter.Value; }
     }
-    public override IEnumerable<IOperator> Operators {
-      get { return operators; }
-    }
-    public IEnumerable<ISymbolicRegressionAnalyzer> Analyzers {
-      get { return operators.OfType<ISymbolicRegressionAnalyzer>(); }
-    }
-    public DoubleValue PunishmentFactor {
-      get { return new DoubleValue(10.0); }
-    }
-    public IntValue TrainingSamplesStart {
-      get { return new IntValue(DataAnalysisProblemData.TrainingSamplesStart.Value); }
-    }
-    public IntValue TrainingSamplesEnd {
-      get {
-        return new IntValue((DataAnalysisProblemData.TrainingSamplesStart.Value +
-          DataAnalysisProblemData.TrainingSamplesEnd.Value) / 2);
-      }
-    }
-    public IntValue ValidationSamplesStart {
-      get { return TrainingSamplesEnd; }
-    }
-    public IntValue ValidationSamplesEnd {
-      get { return new IntValue(DataAnalysisProblemData.TrainingSamplesEnd.Value); }
-    }
-    public IntValue TestSamplesStart {
-      get { return DataAnalysisProblemData.TestSamplesStart; }
-    }
-    public IntValue TestSamplesEnd {
-      get { return DataAnalysisProblemData.TestSamplesEnd; }
-    }
     #endregion
-
-    [Storable]
-    private List<IOperator> operators;
 
     [StorableConstructor]
@@ -186,31 +84,14 @@
     public SymbolicRegressionProblem()
       : base() {
-      SymbolicExpressionTreeCreator creator = new ProbabilisticTreeCreator();
       var evaluator = new SymbolicRegressionScaledMeanSquaredErrorEvaluator();
-      var grammar = new FullFunctionalExpressionGrammar();
-      var globalGrammar = new GlobalSymbolicExpressionGrammar(grammar);
-      var interpreter = new SimpleArithmeticExpressionInterpreter();
       Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as the error of the regression model should be minimized.", (BoolValue)new BoolValue(false).AsReadOnly()));
-      Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new symbolic regression solutions.", creator));
-      Parameters.Add(new ValueParameter<ISymbolicExpressionTreeInterpreter>("SymbolicExpressionTreeInterpreter", "The interpreter that should be used to evaluate the symbolic expression tree.", interpreter));
       Parameters.Add(new ValueParameter<ISymbolicRegressionEvaluator>("Evaluator", "The operator which should be used to evaluate symbolic regression solutions.", evaluator));
-      Parameters.Add(new ValueParameter<DoubleValue>("LowerEstimationLimit", "The lower limit for the estimated value that can be returned by the symbolic regression model.", new DoubleValue(double.NegativeInfinity)));
-      Parameters.Add(new ValueParameter<DoubleValue>("UpperEstimationLimit", "The upper limit for the estimated value that can be returned by the symbolic regression model.", new DoubleValue(double.PositiveInfinity)));
       Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The minimal error value that reached by symbolic regression solutions for the problem."));
-      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("FunctionTreeGrammar", "The grammar that should be used for symbolic regression models.", globalGrammar));
-      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the symbolic expression.", new IntValue(100)));
-      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the symbolic expression.", new IntValue(10)));
-      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionDefiningBranches", "Maximal number of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
-      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionArguments", "Maximal number of arguments of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
 
-      creator.SymbolicExpressionTreeParameter.ActualName = "SymbolicRegressionModel";
       evaluator.QualityParameter.ActualName = "TrainingMeanSquaredError";
 
-      ParameterizeSolutionCreator();
+      InitializeOperators();
       ParameterizeEvaluator();
 
-      UpdateGrammar();
-      UpdateEstimationLimits();
-      InitializeOperators();
       RegisterParameterEvents();
       RegisterParameterValueEvents();
@@ -219,5 +100,4 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       SymbolicRegressionProblem clone = (SymbolicRegressionProblem)base.Clone(cloner);
-      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
       clone.RegisterParameterEvents();
       clone.RegisterParameterValueEvents();
@@ -226,16 +106,8 @@
 
     private void RegisterParameterValueEvents() {
-      MaxFunctionArgumentsParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
-      MaxFunctionDefiningBranchesParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
-      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
       EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
     }
 
-    private void RegisterParameterEvents() {
-      MaxFunctionArgumentsParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
-      MaxFunctionDefiningBranchesParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
-      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
-      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-    }
+    private void RegisterParameterEvents() { }
 
     #region event handling
@@ -246,58 +118,23 @@
       ParameterizeEvaluator();
       ParameterizeAnalyzers();
-      // input variables could have been changed
-      UpdateGrammar();
-      // estimation limits have to be recalculated
-      UpdateEstimationLimits();
-    }
-    protected virtual void OnArchitectureParameterChanged(EventArgs e) {
-      UpdateGrammar();
-    }
-    protected virtual void OnGrammarChanged(EventArgs e) { }
-    protected virtual void OnOperatorsChanged(EventArgs e) { RaiseOperatorsChanged(e); }
-    protected virtual void OnSolutionCreatorChanged(EventArgs e) {
-      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
-      ParameterizeSolutionCreator();
-      OnSolutionParameterNameChanged(e);
-      RaiseSolutionCreatorChanged(e);
     }
 
-    protected virtual void OnSolutionParameterNameChanged(EventArgs e) {
+    protected override void OnSolutionParameterNameChanged(EventArgs e) {
+      base.OnSolutionParameterNameChanged(e);
       ParameterizeEvaluator();
       ParameterizeAnalyzers();
-      ParameterizeOperators();
     }
 
-    protected virtual void OnEvaluatorChanged(EventArgs e) {
-      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+    protected override void OnEvaluatorChanged(EventArgs e) {
+      base.OnEvaluatorChanged(e);
       ParameterizeEvaluator();
       ParameterizeAnalyzers();
       RaiseEvaluatorChanged(e);
     }
-    protected virtual void OnQualityParameterNameChanged(EventArgs e) {
-      ParameterizeAnalyzers();
-    }
     #endregion
 
     #region event handlers
-    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
-      OnSolutionCreatorChanged(e);
-    }
-    private void SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
-      OnSolutionParameterNameChanged(e);
-    }
     private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
       OnEvaluatorChanged(e);
-    }
-    private void ArchitectureParameter_ValueChanged(object sender, EventArgs e) {
-      MaxFunctionArgumentsParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
-      MaxFunctionDefiningBranchesParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
-      OnArchitectureParameterChanged(e);
-    }
-    private void ArchitectureParameterValue_ValueChanged(object sender, EventArgs e) {
-      OnArchitectureParameterChanged(e);
-    }
-    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
-      OnQualityParameterNameChanged(e);
     }
     #endregion
@@ -308,5 +145,5 @@
       // BackwardsCompatibility3.3
       #region Backwards compatible code (remove with 3.4)
-      if (operators == null) InitializeOperators();
+      if (Operators == null || Operators.Count() == 0) InitializeOperators();
       #endregion
       RegisterParameterEvents();
@@ -314,44 +151,7 @@
     }
 
-    private void UpdateGrammar() {
-      foreach (var varSymbol in FunctionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable>()) {
-        varSymbol.VariableNames = DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
-      }
-      var globalGrammar = FunctionTreeGrammar as GlobalSymbolicExpressionGrammar;
-      if (globalGrammar != null) {
-        globalGrammar.MaxFunctionArguments = MaxFunctionArguments.Value;
-        globalGrammar.MaxFunctionDefinitions = MaxFunctionDefiningBranches.Value;
-      }
-    }
-
-    private void UpdateEstimationLimits() {
-      if (TrainingSamplesStart.Value < TrainingSamplesEnd.Value &&
-        DataAnalysisProblemData.Dataset.VariableNames.Contains(DataAnalysisProblemData.TargetVariable.Value)) {
-        var targetValues = DataAnalysisProblemData.Dataset.GetVariableValues(DataAnalysisProblemData.TargetVariable.Value, TrainingSamplesStart.Value, TrainingSamplesEnd.Value);
-        var mean = targetValues.Average();
-        var range = targetValues.Max() - targetValues.Min();
-        UpperEstimationLimit = new DoubleValue(mean + PunishmentFactor.Value * range);
-        LowerEstimationLimit = new DoubleValue(mean - PunishmentFactor.Value * range);
-      }
-    }
-
     private void InitializeOperators() {
-      operators = new List<IOperator>();
-      operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>().OfType<IOperator>());
-      operators.Add(new SymbolicRegressionTournamentPruning());
-      operators.Add(new SymbolicRegressionVariableFrequencyAnalyzer());
-      operators.Add(new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer());
-      operators.Add(new MinAverageMaxSymbolicExpressionTreeSizeAnalyzer());
-      operators.Add(new SymbolicRegressionModelQualityAnalyzer());
-      ParameterizeOperators();
+      AddOperator(new FixedValidationBestScaledSymbolicRegressionSolutionAnalyzer());
       ParameterizeAnalyzers();
-    }
-
-    private void ParameterizeSolutionCreator() {
-      SolutionCreator.SymbolicExpressionGrammarParameter.ActualName = FunctionTreeGrammarParameter.Name;
-      SolutionCreator.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
-      SolutionCreator.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
-      SolutionCreator.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
-      SolutionCreator.MaxFunctionDefinitionsParameter.ActualName = MaxFunctionDefiningBranchesParameter.Name;
     }
 
@@ -389,48 +189,4 @@
           bestValidationSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
         }
-        var symbolicRegressionModelQualityAnalyzer = analyzer as SymbolicRegressionModelQualityAnalyzer;
-        if (symbolicRegressionModelQualityAnalyzer != null) {
-          symbolicRegressionModelQualityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
-          symbolicRegressionModelQualityAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
-          symbolicRegressionModelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
-          symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
-          symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-        }
-        var varFreqAnalyzer = analyzer as SymbolicRegressionVariableFrequencyAnalyzer;
-        if (varFreqAnalyzer != null) {
-          varFreqAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
-        }
-        var pruningOperator = analyzer as SymbolicRegressionTournamentPruning;
-        if (pruningOperator != null) {
-          pruningOperator.SamplesStartParameter.Value = TrainingSamplesStart;
-          pruningOperator.SamplesEndParameter.Value = TrainingSamplesEnd;
-          pruningOperator.DataAnalysisProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
-          pruningOperator.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-          pruningOperator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
-          pruningOperator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
-          pruningOperator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
-        }
-      }
-      foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
-        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-      }
-    }
-
-    private void ParameterizeOperators() {
-      foreach (ISymbolicExpressionTreeOperator op in Operators.OfType<ISymbolicExpressionTreeOperator>()) {
-        op.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
-        op.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
-        op.SymbolicExpressionGrammarParameter.ActualName = FunctionTreeGrammarParameter.Name;
-      }
-      foreach (ISymbolicExpressionTreeCrossover op in Operators.OfType<ISymbolicExpressionTreeCrossover>()) {
-        op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-      }
-      foreach (ISymbolicExpressionTreeManipulator op in Operators.OfType<ISymbolicExpressionTreeManipulator>()) {
-        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-      }
-      foreach (ISymbolicExpressionTreeArchitectureManipulator op in Operators.OfType<ISymbolicExpressionTreeArchitectureManipulator>()) {
-        op.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
-        op.MaxFunctionDefinitionsParameter.ActualName = MaxFunctionDefiningBranchesParameter.Name;
       }
     }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs	(revision 4128)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionProblemBase.cs	(revision 4128)
@@ -0,0 +1,356 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Analyzers;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Creators;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Interfaces;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
+  [StorableClass]
+  public abstract class SymbolicRegressionProblemBase : DataAnalysisProblem, IProblem {
+
+    #region Parameter Properties
+    public new ValueParameter<SymbolicExpressionTreeCreator> SolutionCreatorParameter {
+      get { return (ValueParameter<SymbolicExpressionTreeCreator>)Parameters["SolutionCreator"]; }
+    }
+    IParameter IProblem.SolutionCreatorParameter {
+      get { return SolutionCreatorParameter; }
+    }
+    public ValueParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["LowerEstimationLimit"]; }
+    }
+    public ValueParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["UpperEstimationLimit"]; }
+    }
+    public ValueParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (ValueParameter<ISymbolicExpressionTreeInterpreter>)Parameters["SymbolicExpressionTreeInterpreter"]; }
+    }
+    public ValueParameter<ISymbolicExpressionGrammar> FunctionTreeGrammarParameter {
+      get { return (ValueParameter<ISymbolicExpressionGrammar>)Parameters["FunctionTreeGrammar"]; }
+    }
+    public ValueParameter<IntValue> MaxExpressionLengthParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxExpressionLength"]; }
+    }
+    public ValueParameter<IntValue> MaxExpressionDepthParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxExpressionDepth"]; }
+    }
+    public ValueParameter<IntValue> MaxFunctionDefiningBranchesParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionDefiningBranches"]; }
+    }
+    public ValueParameter<IntValue> MaxFunctionArgumentsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxFunctionArguments"]; }
+    }
+    #endregion
+
+    #region Properties
+    public IntValue MaxExpressionLength {
+      get { return MaxExpressionLengthParameter.Value; }
+      set { MaxExpressionLengthParameter.Value = value; }
+    }
+    public IntValue MaxExpressionDepth {
+      get { return MaxExpressionDepthParameter.Value; }
+      set { MaxExpressionDepthParameter.Value = value; }
+    }
+    public IntValue MaxFunctionDefiningBranches {
+      get { return MaxFunctionDefiningBranchesParameter.Value; }
+      set { MaxFunctionDefiningBranchesParameter.Value = value; }
+    }
+    public IntValue MaxFunctionArguments {
+      get { return MaxFunctionArgumentsParameter.Value; }
+      set { MaxFunctionArgumentsParameter.Value = value; }
+    }
+    public new SymbolicExpressionTreeCreator SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+      set { SolutionCreatorParameter.Value = value; }
+    }
+    ISolutionCreator IProblem.SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+    }
+    public ISymbolicExpressionTreeInterpreter SymbolicExpressionTreeInterpreter {
+      get { return SymbolicExpressionTreeInterpreterParameter.Value; }
+      set { SymbolicExpressionTreeInterpreterParameter.Value = value; }
+    }
+    public DoubleValue LowerEstimationLimit {
+      get { return LowerEstimationLimitParameter.Value; }
+      set { LowerEstimationLimitParameter.Value = value; }
+    }
+    public DoubleValue UpperEstimationLimit {
+      get { return UpperEstimationLimitParameter.Value; }
+      set { UpperEstimationLimitParameter.Value = value; }
+    }
+
+    public ISymbolicExpressionGrammar FunctionTreeGrammar {
+      get { return (ISymbolicExpressionGrammar)FunctionTreeGrammarParameter.Value; }
+    }
+    public override IEnumerable<IOperator> Operators {
+      get { return operators; }
+    }
+    public IEnumerable<ISymbolicRegressionAnalyzer> Analyzers {
+      get { return operators.OfType<ISymbolicRegressionAnalyzer>(); }
+    }
+    public DoubleValue PunishmentFactor {
+      get { return new DoubleValue(10.0); }
+    }
+    public IntValue TrainingSamplesStart {
+      get { return new IntValue(DataAnalysisProblemData.TrainingSamplesStart.Value); }
+    }
+    public IntValue TrainingSamplesEnd {
+      get {
+        return new IntValue((DataAnalysisProblemData.TrainingSamplesStart.Value +
+          DataAnalysisProblemData.TrainingSamplesEnd.Value) / 2);
+      }
+    }
+    public IntValue ValidationSamplesStart {
+      get { return TrainingSamplesEnd; }
+    }
+    public IntValue ValidationSamplesEnd {
+      get { return new IntValue(DataAnalysisProblemData.TrainingSamplesEnd.Value); }
+    }
+    public IntValue TestSamplesStart {
+      get { return DataAnalysisProblemData.TestSamplesStart; }
+    }
+    public IntValue TestSamplesEnd {
+      get { return DataAnalysisProblemData.TestSamplesEnd; }
+    }
+    #endregion
+
+    [Storable]
+    private List<IOperator> operators;
+
+    [StorableConstructor]
+    protected SymbolicRegressionProblemBase(bool deserializing) : base(deserializing) { }
+    public SymbolicRegressionProblemBase()
+      : base() {
+      SymbolicExpressionTreeCreator creator = new ProbabilisticTreeCreator();
+      var grammar = new FullFunctionalExpressionGrammar();
+      var globalGrammar = new GlobalSymbolicExpressionGrammar(grammar);
+      var interpreter = new SimpleArithmeticExpressionInterpreter();
+      Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new symbolic regression solutions.", creator));
+      Parameters.Add(new ValueParameter<ISymbolicExpressionTreeInterpreter>("SymbolicExpressionTreeInterpreter", "The interpreter that should be used to evaluate the symbolic expression tree.", interpreter));
+      Parameters.Add(new ValueParameter<DoubleValue>("LowerEstimationLimit", "The lower limit for the estimated value that can be returned by the symbolic regression model.", new DoubleValue(double.NegativeInfinity)));
+      Parameters.Add(new ValueParameter<DoubleValue>("UpperEstimationLimit", "The upper limit for the estimated value that can be returned by the symbolic regression model.", new DoubleValue(double.PositiveInfinity)));
+      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("FunctionTreeGrammar", "The grammar that should be used for symbolic regression models.", globalGrammar));
+      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the symbolic expression.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the symbolic expression.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionDefiningBranches", "Maximal number of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
+      Parameters.Add(new ValueParameter<IntValue>("MaxFunctionArguments", "Maximal number of arguments of automatically defined functions.", (IntValue)new IntValue(0).AsReadOnly()));
+
+      creator.SymbolicExpressionTreeParameter.ActualName = "SymbolicRegressionModel";
+
+      ParameterizeSolutionCreator();
+
+      UpdateGrammar();
+      UpdateEstimationLimits();
+      InitializeOperators();
+      RegisterParameterEvents();
+      RegisterParameterValueEvents();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      SymbolicRegressionProblemBase clone = (SymbolicRegressionProblemBase)base.Clone(cloner);
+      clone.operators = operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
+      clone.RegisterParameterEvents();
+      clone.RegisterParameterValueEvents();
+      return clone;
+    }
+
+    private void RegisterParameterValueEvents() {
+      MaxFunctionArgumentsParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
+      MaxFunctionDefiningBranchesParameter.ValueChanged += new EventHandler(ArchitectureParameter_ValueChanged);
+      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
+    }
+
+    private void RegisterParameterEvents() {
+      MaxFunctionArgumentsParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      MaxFunctionDefiningBranchesParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+    }
+
+    #region event handling
+    protected override void OnDataAnalysisProblemChanged(EventArgs e) {
+      base.OnDataAnalysisProblemChanged(e);
+      // paritions could be changed
+      ParameterizeAnalyzers();
+      // input variables could have been changed
+      UpdateGrammar();
+      // estimation limits have to be recalculated
+      UpdateEstimationLimits();
+    }
+    protected virtual void OnArchitectureParameterChanged(EventArgs e) {
+      UpdateGrammar();
+    }
+    protected virtual void OnGrammarChanged(EventArgs e) { }
+    protected virtual void OnOperatorsChanged(EventArgs e) { RaiseOperatorsChanged(e); }
+    protected virtual void OnSolutionCreatorChanged(EventArgs e) {
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      ParameterizeSolutionCreator();
+      OnSolutionParameterNameChanged(e);
+      RaiseSolutionCreatorChanged(e);
+    }
+
+    protected virtual void OnSolutionParameterNameChanged(EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    protected virtual void OnEvaluatorChanged(EventArgs e) {
+      RaiseEvaluatorChanged(e);
+    }
+    #endregion
+
+    #region event handlers
+    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
+      OnSolutionCreatorChanged(e);
+    }
+    private void SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
+      OnSolutionParameterNameChanged(e);
+    }
+    private void ArchitectureParameter_ValueChanged(object sender, EventArgs e) {
+      MaxFunctionArgumentsParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      MaxFunctionDefiningBranchesParameter.Value.ValueChanged += new EventHandler(ArchitectureParameterValue_ValueChanged);
+      OnArchitectureParameterChanged(e);
+    }
+    private void ArchitectureParameterValue_ValueChanged(object sender, EventArgs e) {
+      OnArchitectureParameterChanged(e);
+    }
+    #endregion
+
+    #region Helpers
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserializationHook() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      if (operators == null) InitializeOperators();
+      #endregion
+      RegisterParameterEvents();
+      RegisterParameterValueEvents();
+    }
+
+    protected void AddOperator(IOperator op) {
+      operators.Add(op);
+    }
+
+    private void UpdateGrammar() {
+      foreach (var varSymbol in FunctionTreeGrammar.Symbols.OfType<HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable>()) {
+        varSymbol.VariableNames = DataAnalysisProblemData.InputVariables.CheckedItems.Select(x => x.Value.Value);
+      }
+      var globalGrammar = FunctionTreeGrammar as GlobalSymbolicExpressionGrammar;
+      if (globalGrammar != null) {
+        globalGrammar.MaxFunctionArguments = MaxFunctionArguments.Value;
+        globalGrammar.MaxFunctionDefinitions = MaxFunctionDefiningBranches.Value;
+      }
+    }
+
+    private void UpdateEstimationLimits() {
+      if (TrainingSamplesStart.Value < TrainingSamplesEnd.Value &&
+        DataAnalysisProblemData.Dataset.VariableNames.Contains(DataAnalysisProblemData.TargetVariable.Value)) {
+        var targetValues = DataAnalysisProblemData.Dataset.GetVariableValues(DataAnalysisProblemData.TargetVariable.Value, TrainingSamplesStart.Value, TrainingSamplesEnd.Value);
+        var mean = targetValues.Average();
+        var range = targetValues.Max() - targetValues.Min();
+        UpperEstimationLimit = new DoubleValue(mean + PunishmentFactor.Value * range);
+        LowerEstimationLimit = new DoubleValue(mean - PunishmentFactor.Value * range);
+      }
+    }
+
+    private void InitializeOperators() {
+      operators = new List<IOperator>();
+      operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>().OfType<IOperator>());
+      operators.Add(new SymbolicRegressionTournamentPruning());
+      operators.Add(new SymbolicRegressionVariableFrequencyAnalyzer());
+      operators.Add(new MinAverageMaxSymbolicExpressionTreeSizeAnalyzer());
+      operators.Add(new SymbolicRegressionModelQualityAnalyzer());
+      ParameterizeOperators();
+      ParameterizeAnalyzers();
+    }
+
+    private void ParameterizeSolutionCreator() {
+      SolutionCreator.SymbolicExpressionGrammarParameter.ActualName = FunctionTreeGrammarParameter.Name;
+      SolutionCreator.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
+      SolutionCreator.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
+      SolutionCreator.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
+      SolutionCreator.MaxFunctionDefinitionsParameter.ActualName = MaxFunctionDefiningBranchesParameter.Name;
+    }
+
+    private void ParameterizeAnalyzers() {
+      foreach (var analyzer in Analyzers) {
+        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        var symbolicRegressionModelQualityAnalyzer = analyzer as SymbolicRegressionModelQualityAnalyzer;
+        if (symbolicRegressionModelQualityAnalyzer != null) {
+          symbolicRegressionModelQualityAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
+          symbolicRegressionModelQualityAnalyzer.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
+          symbolicRegressionModelQualityAnalyzer.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
+          symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
+          symbolicRegressionModelQualityAnalyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        }
+        var varFreqAnalyzer = analyzer as SymbolicRegressionVariableFrequencyAnalyzer;
+        if (varFreqAnalyzer != null) {
+          varFreqAnalyzer.ProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
+        }
+        var pruningOperator = analyzer as SymbolicRegressionTournamentPruning;
+        if (pruningOperator != null) {
+          pruningOperator.SamplesStartParameter.Value = TrainingSamplesStart;
+          pruningOperator.SamplesEndParameter.Value = TrainingSamplesEnd;
+          pruningOperator.DataAnalysisProblemDataParameter.ActualName = DataAnalysisProblemDataParameter.Name;
+          pruningOperator.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+          pruningOperator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
+          pruningOperator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
+          pruningOperator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
+        }
+      }
+      foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+    }
+
+    private void ParameterizeOperators() {
+      foreach (ISymbolicExpressionTreeOperator op in Operators.OfType<ISymbolicExpressionTreeOperator>()) {
+        op.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
+        op.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
+        op.SymbolicExpressionGrammarParameter.ActualName = FunctionTreeGrammarParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeCrossover op in Operators.OfType<ISymbolicExpressionTreeCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (ISymbolicExpressionTreeManipulator op in Operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (ISymbolicExpressionTreeArchitectureManipulator op in Operators.OfType<ISymbolicExpressionTreeArchitectureManipulator>()) {
+        op.MaxFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
+        op.MaxFunctionDefinitionsParameter.ActualName = MaxFunctionDefiningBranchesParameter.Name;
+      }
+    }
+    #endregion
+  }
+}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,174 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator", "Calculates the mean and the variance of the squared errors of a linearly scaled symbolic regression solution.")]
-  [StorableClass]
-  public class SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {
-    private const string QualityVarianceParameterName = "QualityVariance";
-    private const string QualitySamplesParameterName = "QualitySamples";
-
-    #region parameter properties
-    public ILookupParameter<DoubleValue> AlphaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Alpha"]; }
-    }
-    public ILookupParameter<DoubleValue> BetaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Beta"]; }
-    }
-    public ILookupParameter<DoubleValue> QualityVarianceParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[QualityVarianceParameterName]; }
-    }
-    public ILookupParameter<IntValue> QualitySamplesParameter {
-      get { return (ILookupParameter<IntValue>)Parameters[QualitySamplesParameterName]; }
-    }
-
-    #endregion
-    #region properties
-    public DoubleValue Alpha {
-      get { return AlphaParameter.ActualValue; }
-      set { AlphaParameter.ActualValue = value; }
-    }
-    public DoubleValue Beta {
-      get { return BetaParameter.ActualValue; }
-      set { BetaParameter.ActualValue = value; }
-    }
-    public DoubleValue QualityVariance {
-      get { return QualityVarianceParameter.ActualValue; }
-      set { QualityVarianceParameter.ActualValue = value; }
-    }
-    public IntValue QualitySamples {
-      get { return QualitySamplesParameter.ActualValue; }
-      set { QualitySamplesParameter.ActualValue = value; }
-    }
-    #endregion
-    public SymbolicRegressionScaledMeanAndVarianceSquaredErrorEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<DoubleValue>("Alpha", "Alpha parameter for linear scaling of the estimated values."));
-      Parameters.Add(new LookupParameter<DoubleValue>("Beta", "Beta parameter for linear scaling of the estimated values."));
-      Parameters.Add(new LookupParameter<DoubleValue>(QualityVarianceParameterName, "A parameter which stores the variance of the squared errors."));
-      Parameters.Add(new LookupParameter<IntValue>(QualitySamplesParameterName, " The number of evaluated samples."));
-    }
-
-    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
-      double alpha, beta;
-      double meanSE, varianceSE;
-      int count;
-      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, out beta, out alpha, out meanSE, out varianceSE, out count);
-      Alpha = new DoubleValue(alpha);
-      Beta = new DoubleValue(beta);
-      QualityVariance = new DoubleValue(varianceSE);
-      QualitySamples = new IntValue(count);
-      return mse;
-    }
-
-    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, out double beta, out double alpha, out double meanSE, out double varianceSE, out int count) {
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      CalculateScalingParameters(originalValues, estimatedValues, out beta, out alpha);
-
-      return CalculateWithScaling(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, beta, alpha, out meanSE, out varianceSE, out count);
-    }
-
-    public static double CalculateWithScaling(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, double beta, double alpha, out double meanSE, out double varianceSE, out int count) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
-      OnlineMeanAndVarianceCalculator seEvaluator = new OnlineMeanAndVarianceCalculator();
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double estimated = estimatedEnumerator.Current * beta + alpha;
-        double original = originalEnumerator.Current;
-        if (double.IsNaN(estimated))
-          estimated = upperEstimationLimit;
-        else
-          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
-        double error = estimated - original;
-        error *= error;
-        seEvaluator.Add(error);
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      } else {
-        meanSE = seEvaluator.Mean;
-        varianceSE = seEvaluator.Variance;
-        count = seEvaluator.Count;
-        return seEvaluator.Mean;
-      }
-    }
-
-    /// <summary>
-    /// Calculates linear scaling parameters in one pass.
-    /// The formulas to calculate the scaling parameters were taken from Scaled Symblic Regression by Maarten Keijzer.
-    /// http://www.springerlink.com/content/x035121165125175/
-    /// </summary>
-    public static void CalculateScalingParameters(IEnumerable<double> original, IEnumerable<double> estimated, out double beta, out double alpha) {
-      IEnumerator<double> originalEnumerator = original.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimated.GetEnumerator();
-      OnlineMeanAndVarianceCalculator yVarianceCalculator = new OnlineMeanAndVarianceCalculator();
-      OnlineMeanAndVarianceCalculator tMeanCalculator = new OnlineMeanAndVarianceCalculator();
-      OnlineCovarianceEvaluator ytCovarianceEvaluator = new OnlineCovarianceEvaluator();
-      int cnt = 0;
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double y = estimatedEnumerator.Current;
-        double t = originalEnumerator.Current;
-        if (IsValidValue(t) && IsValidValue(y)) {
-          tMeanCalculator.Add(t);
-          yVarianceCalculator.Add(y);
-          ytCovarianceEvaluator.Add(y, t);
-
-          cnt++;
-        }
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      if (cnt < 2) {
-        alpha = 0;
-        beta = 1;
-      } else {
-        if (yVarianceCalculator.Variance.IsAlmost(0.0))
-          beta = 1;
-        else
-          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.Variance;
-
-        alpha = tMeanCalculator.Mean - beta * yVarianceCalculator.Mean;
-      }
-    }
-
-    private static bool IsValidValue(double d) {
-      return !double.IsInfinity(d) && !double.IsNaN(d) && d > -1.0E07 && d < 1.0E07;  // don't consider very large or very small values for scaling
-    }
-  }
-}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/SymbolicRegressionScaledMeanSquaredErrorEvaluator.cs	(revision 4127)
+++ 	(revision )
@@ -1,146 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Problems.DataAnalysis.Evaluators;
-using HeuristicLab.Problems.DataAnalysis.Symbolic;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic {
-  [Item("SymbolicRegressionScaledMeanSquaredErrorEvaluator", "Calculates the mean squared error of a linearly scaled symbolic regression solution.")]
-  [StorableClass]
-  public class SymbolicRegressionScaledMeanSquaredErrorEvaluator : SymbolicRegressionMeanSquaredErrorEvaluator {
-
-    #region parameter properties
-    public ILookupParameter<DoubleValue> AlphaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Alpha"]; }
-    }
-    public ILookupParameter<DoubleValue> BetaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["Beta"]; }
-    }
-    #endregion
-    #region properties
-    public DoubleValue Alpha {
-      get { return AlphaParameter.ActualValue; }
-      set { AlphaParameter.ActualValue = value; }
-    }
-    public DoubleValue Beta {
-      get { return BetaParameter.ActualValue; }
-      set { BetaParameter.ActualValue = value; }
-    }
-    #endregion
-    public SymbolicRegressionScaledMeanSquaredErrorEvaluator()
-      : base() {
-      Parameters.Add(new LookupParameter<DoubleValue>("Alpha", "Alpha parameter for linear scaling of the estimated values."));
-      Parameters.Add(new LookupParameter<DoubleValue>("Beta", "Beta parameter for linear scaling of the estimated values."));
-    }
-
-    protected override double Evaluate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, Dataset dataset, StringValue targetVariable, IEnumerable<int> rows) {
-      double alpha, beta;
-      double mse = Calculate(interpreter, solution, LowerEstimationLimit.Value, UpperEstimationLimit.Value, dataset, targetVariable.Value, rows, out beta, out alpha);
-      AlphaParameter.ActualValue = new DoubleValue(alpha);
-      BetaParameter.ActualValue = new DoubleValue(beta);
-      return mse;
-    }
-
-    public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, out double beta, out double alpha) {
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      CalculateScalingParameters(originalValues, estimatedValues, out beta, out alpha);
-
-      return CalculateWithScaling(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, beta, alpha);
-    }
-
-    public static double CalculateWithScaling(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows, double beta, double alpha) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      IEnumerable<double> originalValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
-      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
-      OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator();
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double estimated = estimatedEnumerator.Current * beta + alpha;
-        double original = originalEnumerator.Current;
-        if (double.IsNaN(estimated))
-          estimated = upperEstimationLimit;
-        else
-          estimated = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, estimated));
-        mseEvaluator.Add(original, estimated);
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext()) {
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      } else {
-        return mseEvaluator.MeanSquaredError;
-      }
-    }
-
-    /// <summary>
-    /// Calculates linear scaling parameters in one pass.
-    /// The formulas to calculate the scaling parameters were taken from Scaled Symblic Regression by Maarten Keijzer.
-    /// http://www.springerlink.com/content/x035121165125175/
-    /// </summary>
-    public static void CalculateScalingParameters(IEnumerable<double> original, IEnumerable<double> estimated, out double beta, out double alpha) {
-      IEnumerator<double> originalEnumerator = original.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimated.GetEnumerator();
-      OnlineMeanAndVarianceCalculator yVarianceCalculator = new OnlineMeanAndVarianceCalculator();
-      OnlineMeanAndVarianceCalculator tMeanCalculator = new OnlineMeanAndVarianceCalculator();
-      OnlineCovarianceEvaluator ytCovarianceEvaluator = new OnlineCovarianceEvaluator();
-      int cnt = 0;
-
-      while (originalEnumerator.MoveNext() & estimatedEnumerator.MoveNext()) {
-        double y = estimatedEnumerator.Current;
-        double t = originalEnumerator.Current;
-        if (IsValidValue(t) && IsValidValue(y)) {
-          tMeanCalculator.Add(t);
-          yVarianceCalculator.Add(y);
-          ytCovarianceEvaluator.Add(y, t);
-
-          cnt++;
-        }
-      }
-
-      if (estimatedEnumerator.MoveNext() || originalEnumerator.MoveNext())
-        throw new ArgumentException("Number of elements in original and estimated enumeration doesn't match.");
-      if (cnt < 2) {
-        alpha = 0;
-        beta = 1;
-      } else {
-        if (yVarianceCalculator.Variance.IsAlmost(0.0))
-          beta = 1;
-        else
-          beta = ytCovarianceEvaluator.Covariance / yVarianceCalculator.Variance;
-
-        alpha = tMeanCalculator.Mean - beta * yVarianceCalculator.Mean;
-      }
-    }
-
-    private static bool IsValidValue(double d) {
-      return !double.IsInfinity(d) && !double.IsNaN(d) && d > -1.0E07 && d < 1.0E07;  // don't consider very large or very small values for scaling
-    }
-  }
-}
