Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAvgMaxSymbolicExpressionTreeSizeAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAvgMaxSymbolicExpressionTreeSizeAnalyzer.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/MinAvgMaxSymbolicExpressionTreeSizeAnalyzer.cs	(revision 3683)
@@ -62,4 +62,6 @@
     [Storable]
     private MinAverageMaxValueAnalyzer valueAnalyzer;
+    [Storable]
+    private SymbolicExpressionTreeSizeCalculator sizeCalculator;
 
     #endregion
@@ -71,9 +73,10 @@
       Parameters.Add(new ValueLookupParameter<VariableCollection>(ResultsParameterName, "The results collection where the analysis values should be stored."));
 
-      UniformSubScopesProcessor subScopesProcessor = new UniformSubScopesProcessor();
-      SymbolicExpressionTreeSizeCalculator sizeCalculator = new SymbolicExpressionTreeSizeCalculator();
+      sizeCalculator = new SymbolicExpressionTreeSizeCalculator();
       valueAnalyzer = new MinAverageMaxValueAnalyzer();
       sizeCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      sizeCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       sizeCalculator.SymbolicExpressionTreeSizeParameter.ActualName = SymbolicExpressionTreeSizeParameter.Name;
+      sizeCalculator.SymbolicExpressionTreeSizeParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
       valueAnalyzer.ValueParameter.ActualName = sizeCalculator.SymbolicExpressionTreeSizeParameter.Name;
       valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
@@ -84,7 +87,6 @@
       valueAnalyzer.MinValueParameter.ActualName = "Min Tree Size";
 
-      OperatorGraph.InitialOperator = subScopesProcessor;
-      subScopesProcessor.Operator = sizeCalculator;
-      subScopesProcessor.Successor = valueAnalyzer;
+      OperatorGraph.InitialOperator = sizeCalculator;
+      sizeCalculator.Successor = valueAnalyzer;
       valueAnalyzer.Successor = null;
 
@@ -98,4 +100,5 @@
     private void Initialize() {
       SymbolicExpressionTreeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeParameter_DepthChanged);
+      SymbolicExpressionTreeSizeParameter.DepthChanged += new EventHandler(SymbolicExpressionTreeSizeParameter_DepthChanged);
     }
 
@@ -107,5 +110,15 @@
 
     private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
+      OnDepthParameterChanged();
+    }
+
+    private void SymbolicExpressionTreeSizeParameter_DepthChanged(object sender, EventArgs e) {
+      OnDepthParameterChanged();
+    }
+
+    private void OnDepthParameterChanged() {
       valueAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      sizeCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      sizeCalculator.SymbolicExpressionTreeSizeParameter.Depth = SymbolicExpressionTreeSizeParameter.Depth;
     }
   }
Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeCalculator.cs	(revision 3683)
@@ -42,19 +42,19 @@
 
     #region parameter properties
-    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
-    public ILookupParameter<DoubleValue> SymbolicExpressionTreeSizeParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeSizeParameterName]; }
+    public ScopeTreeLookupParameter<DoubleValue> SymbolicExpressionTreeSizeParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[SymbolicExpressionTreeSizeParameterName]; }
     }
     #endregion
 
     #region properties
-    public SymbolicExpressionTree SymbolicExpressionTree {
-      get { return SymbolicExpressionTreeParameter.ActualValue;}
+    public ItemArray<SymbolicExpressionTree> SymbolicExpressionTree {
+      get { return SymbolicExpressionTreeParameter.ActualValue; }
     }
-    public DoubleValue SymbolicExpressionTreeSize {
-      get { return SymbolicExpressionTreeSizeParameter.ActualValue;}
-      set { SymbolicExpressionTreeSizeParameter.ActualValue = value;}
+    public ItemArray<DoubleValue> SymbolicExpressionTreeSize {
+      get { return SymbolicExpressionTreeSizeParameter.ActualValue; }
+      set { SymbolicExpressionTreeSizeParameter.ActualValue = value; }
     }
     #endregion
@@ -62,10 +62,12 @@
     public SymbolicExpressionTreeSizeCalculator()
       : base() {
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose size should be calculated."));
-      Parameters.Add(new LookupParameter<DoubleValue>(SymbolicExpressionTreeSizeParameterName, "The tree size of the symbolic expression tree."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree whose size should be calculated."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(SymbolicExpressionTreeSizeParameterName, "The tree size of the symbolic expression tree."));
     }
 
     public override IOperation Apply() {
-      SymbolicExpressionTreeSize = new DoubleValue(SymbolicExpressionTree.Size);
+      ItemArray<SymbolicExpressionTree> trees = SymbolicExpressionTree;
+      SymbolicExpressionTreeSize = new ItemArray<DoubleValue>(from tree in trees
+                                                              select new DoubleValue(tree.Size));
       return base.Apply();
     }
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 3682)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 3683)
@@ -87,4 +87,5 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Symbolic\Analyzers\BestSymbolicRegressionSolutionAnalyzer.cs" />
+    <Compile Include="Symbolic\Analyzers\SymbolicRegressionMeanSquaredErrorCalculator.cs" />
     <Compile Include="Symbolic\Analyzers\ISymbolicRegressionAnalyzer.cs" />
     <Compile Include="Symbolic\Analyzers\SymbolicRegressionModelQualityAnalyzer.cs" />
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionMeanSquaredErrorCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionMeanSquaredErrorCalculator.cs	(revision 3683)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionMeanSquaredErrorCalculator.cs	(revision 3683)
@@ -0,0 +1,125 @@
+#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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.DataAnalysis.Regression.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using System.Collections.Generic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Problems.DataAnalysis;
+
+namespace HeuristicLab.Problems.DataAnalysis.Regression.Symbolic.Analyzers {
+  /// <summary>
+  /// An operator that calculates the mean squared error of a symbolic regression solution encoded as a symbolic expression tree.
+  /// </summary>
+  [Item("SymbolicRegressionMeanSquaredErrorCalculator", "An operator that calculates the mean squared error of a symbolic regression solution encoded as a symbolic expression tree.")]
+  [StorableClass]
+  public sealed class SymbolicRegressionMeanSquaredErrorCalculator : AlgorithmOperator {
+    private const string SymbolicExpressionTreeInterpreterParameterName = "SymbolicExpressionTreeInterpreter";
+    private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string QualityParameterName = "Mean Squared Error";
+    private const string SamplesStartParameterName = "SamplesStart";
+    private const string SamplesEndParameterName = "SamplesEnd";
+    private const string UpperEstimationLimitParameterName = "UpperEstimationLimit";
+    private const string LowerEstimationLimitParameterName = "LowerEstimationLimit";
+
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public IValueLookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
+      get { return (IValueLookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
+    }
+    public IValueLookupParameter<DataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<DataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> SamplesStartParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesStartParameterName]; }
+    }
+    public IValueLookupParameter<IntValue> SamplesEndParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[SamplesEndParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> UpperEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[UpperEstimationLimitParameterName]; }
+    }
+    public IValueLookupParameter<DoubleValue> LowerEstimationLimitParameter {
+      get { return (IValueLookupParameter<DoubleValue>)Parameters[LowerEstimationLimitParameterName]; }
+    }
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+
+    public SymbolicRegressionMeanSquaredErrorCalculator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree to analyze."));
+      Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data containing the input varaibles for the symbolic regression problem."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The first index of the data set partition on which the model quality values should be calculated."));
+      Parameters.Add(new ValueLookupParameter<IntValue>(SamplesEndParameterName, "The first index of the data set partition on which the model quality values should be calculated."));
+      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."));
+      Parameters.Add(new ValueLookupParameter<DoubleValue>(QualityParameterName, "The mean squared error value of the output of the model."));
+
+
+      SymbolicRegressionMeanSquaredErrorEvaluator evaluator = new SymbolicRegressionMeanSquaredErrorEvaluator();
+      evaluator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
+      evaluator.QualityParameter.ActualName = QualityParameter.Name;
+      evaluator.RegressionProblemDataParameter.ActualName = ProblemDataParameter.Name;
+      evaluator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;
+      evaluator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;
+      evaluator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      evaluator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
+
+      OperatorGraph.InitialOperator = evaluator;
+      evaluator.Successor = null;
+    }
+
+    // need to create custom operations for each solution scope (this has to be adapted on basis of the depth value of SymbolicExpressionTreeParameter)
+    public override IOperation Apply() {
+      var scopes = GetScopesOnLevel(ExecutionContext.Scope, SymbolicExpressionTreeParameter.Depth);
+      OperationCollection operations = new OperationCollection();
+      foreach (IScope treeScopes in scopes) {
+        operations.Add(ExecutionContext.CreateChildOperation(OperatorGraph.InitialOperator, treeScopes));
+      }
+      if (Successor != null) operations.Add(ExecutionContext.CreateOperation(Successor));
+      return operations;
+    }
+
+    private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
+      if (d == 0) yield return scope;
+      else {
+        foreach (IScope subScope in scope.SubScopes) {
+          foreach (IScope scopesOfSubScope in GetScopesOnLevel(subScope, d - 1)) {
+            yield return scopesOfSubScope;
+          }
+        }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityAnalyzer.cs	(revision 3683)
@@ -132,4 +132,8 @@
 
     [Storable]
+    private SymbolicRegressionModelQualityCalculator trainingQualityCalculator;
+    [Storable]
+    private SymbolicRegressionModelQualityCalculator testQualityCalculator;
+    [Storable]
     private MinAverageMaxValueAnalyzer minAvgMaxTrainingMseAnalyzer;
     [Storable]
@@ -161,8 +165,6 @@
 
       #region operator initialization
-      // should be extended to calculate MSE, rel. Error and R² on the training (validation) and test set
-      UniformSubScopesProcessor subScopesProcessor = new UniformSubScopesProcessor();
-      SymbolicRegressionModelQualityCalculator trainingQualityCalculator = new SymbolicRegressionModelQualityCalculator();
-      SymbolicRegressionModelQualityCalculator testQualityCalculator = new SymbolicRegressionModelQualityCalculator();
+      trainingQualityCalculator = new SymbolicRegressionModelQualityCalculator();
+      testQualityCalculator = new SymbolicRegressionModelQualityCalculator();
       minAvgMaxTrainingMseAnalyzer = new MinAverageMaxValueAnalyzer();
       minAvgMaxTestMseAnalyzer = new MinAverageMaxValueAnalyzer();
@@ -182,4 +184,5 @@
       trainingQualityCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
       trainingQualityCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      trainingQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       trainingQualityCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
       trainingQualityCalculator.AverageRelativeErrorQualityParameter.ActualName = TrainingAverageRelativeErrorQualityParameterName;
@@ -193,4 +196,5 @@
       testQualityCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
       testQualityCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      testQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       testQualityCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
       testQualityCalculator.AverageRelativeErrorQualityParameter.ActualName = TestAverageRelativeErrorQualityParameterName;
@@ -251,9 +255,7 @@
 
       #region operator graph
-      OperatorGraph.InitialOperator = subScopesProcessor;
-      subScopesProcessor.Operator = trainingQualityCalculator;
+      OperatorGraph.InitialOperator = trainingQualityCalculator;
       trainingQualityCalculator.Successor = testQualityCalculator;
-      testQualityCalculator.Successor = null;
-      subScopesProcessor.Successor = minAvgMaxTrainingMseAnalyzer;
+      testQualityCalculator.Successor = minAvgMaxTrainingMseAnalyzer;
       minAvgMaxTrainingMseAnalyzer.Successor = minAvgMaxTestMseAnalyzer;
       minAvgMaxTestMseAnalyzer.Successor = minAvgMaxTrainingRSquaredAnalyzer;
@@ -282,4 +284,6 @@
 
     private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
+      trainingQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      testQualityCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       minAvgMaxTrainingMseAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       minAvgMaxTrainingRelErrorAnalyzer.ValueParameter.Depth = SymbolicExpressionTreeParameter.Depth;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionModelQualityCalculator.cs	(revision 3683)
@@ -57,9 +57,9 @@
 
     #region parameter properties
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
     public IValueLookupParameter<ISymbolicExpressionTreeInterpreter> SymbolicExpressionTreeInterpreterParameter {
       get { return (IValueLookupParameter<ISymbolicExpressionTreeInterpreter>)Parameters[SymbolicExpressionTreeInterpreterParameterName]; }
-    }
-    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
     public IValueLookupParameter<DataAnalysisProblemData> ProblemDataParameter {
@@ -92,5 +92,5 @@
       : base() {
       Parameters.Add(new ValueLookupParameter<ISymbolicExpressionTreeInterpreter>(SymbolicExpressionTreeInterpreterParameterName, "The interpreter that should be used to calculate the output values of the symbolic expression tree."));
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree to analyze."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree to analyze."));
       Parameters.Add(new ValueLookupParameter<DataAnalysisProblemData>(ProblemDataParameterName, "The problem data containing the input varaibles for the symbolic regression problem."));
       Parameters.Add(new ValueLookupParameter<IntValue>(SamplesStartParameterName, "The first index of the data set partition on which the model quality values should be calculated."));
@@ -122,8 +122,8 @@
       simpleR2Evalator.ValuesParameter.ActualName = ValuesParameterName;
       simpleR2Evalator.RSquaredParameter.ActualName = RSquaredQualityParameter.Name;
-      
+
       simpleMseEvaluator.ValuesParameter.ActualName = ValuesParameterName;
       simpleMseEvaluator.MeanSquaredErrorParameter.ActualName = MeanSquaredErrorQualityParameter.Name;
-      
+
       simpleRelErrorEvaluator.ValuesParameter.ActualName = ValuesParameterName;
       simpleRelErrorEvaluator.AverageRelativeErrorParameter.ActualName = AverageRelativeErrorQualityParameter.Name;
@@ -143,4 +143,26 @@
 
     }
+
+    // need to create custom operations for each solution scope (this has to be adapted on basis of the depth value of SymbolicExpressionTreeParameter)
+    public override IOperation Apply() {
+      var scopes = GetScopesOnLevel(ExecutionContext.Scope, SymbolicExpressionTreeParameter.Depth);
+      OperationCollection operations = new OperationCollection();
+      foreach (IScope treeScopes in scopes) {
+        operations.Add(ExecutionContext.CreateChildOperation(OperatorGraph.InitialOperator, treeScopes));
+      }
+      if (Successor != null) operations.Add(ExecutionContext.CreateOperation(Successor));
+      return operations;
+    }
+
+    private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
+      if (d == 0) yield return scope;
+      else {
+        foreach (IScope subScope in scope.SubScopes) {
+          foreach (IScope scopesOfSubScope in GetScopesOnLevel(subScope, d - 1)) {
+            yield return scopesOfSubScope;
+          }
+        }
+      }
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/SymbolicRegressionSolutionLinearScaler.cs	(revision 3683)
@@ -47,41 +47,44 @@
     private const string BetaParameterName = "Beta";
 
-    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
     }
-    public ILookupParameter<SymbolicExpressionTree> ScaledSymbolicExpressionTreeParameter {
-      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters[ScaledSymbolicExpressionTreeParameterName]; }
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> ScaledSymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters[ScaledSymbolicExpressionTreeParameterName]; }
     }
-    public ILookupParameter<DoubleValue> AlphaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[AlphaParameterName]; }
+    public ScopeTreeLookupParameter<DoubleValue> AlphaParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[AlphaParameterName]; }
     }
-    public ILookupParameter<DoubleValue> BetaParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters[BetaParameterName]; }
+    public ScopeTreeLookupParameter<DoubleValue> BetaParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters[BetaParameterName]; }
     }
 
     public SymbolicRegressionSolutionLinearScaler()
       : base() {
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to transform."));
-      Parameters.Add(new LookupParameter<SymbolicExpressionTree>(ScaledSymbolicExpressionTreeParameterName, "The resulting symbolic expression trees after transformation."));
-      Parameters.Add(new LookupParameter<DoubleValue>(AlphaParameterName, "Alpha parameter for linear transformation."));
-      Parameters.Add(new LookupParameter<DoubleValue>(BetaParameterName, "Beta parameter for linear transformation."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression trees to transform."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>(ScaledSymbolicExpressionTreeParameterName, "The resulting symbolic expression trees after transformation."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(AlphaParameterName, "Alpha parameter for linear transformation."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(BetaParameterName, "Beta parameter for linear transformation."));
     }
 
     public override IOperation Apply() {
-      SymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue;
-      double alpha = AlphaParameter.ActualValue.Value;
-      double beta = BetaParameter.ActualValue.Value;
+      ItemArray<SymbolicExpressionTree> trees = SymbolicExpressionTreeParameter.ActualValue;
+      ItemArray<DoubleValue> alphas = AlphaParameter.ActualValue;
+      ItemArray<DoubleValue> betas = BetaParameter.ActualValue;
+      ItemArray<SymbolicExpressionTree> scaledTrees = new ItemArray<SymbolicExpressionTree>(trees.Length);
+      for (int i = 0; i < trees.Length; i++) {
+        var mainBranch = trees[i].Root.SubTrees[0].SubTrees[0];
+        var scaledMainBranch = MakeSum(MakeProduct(betas[i].Value, mainBranch), alphas[i].Value);
 
-      var mainBranch = tree.Root.SubTrees[0].SubTrees[0];
-      var scaledMainBranch = MakeSum(MakeProduct(beta, mainBranch), alpha);
-
-      // remove the main branch before cloning to prevent cloning of sub-trees
-      tree.Root.SubTrees[0].RemoveSubTree(0);
-      var scaledTree = (SymbolicExpressionTree)tree.Clone();
-      // insert main branch into the original tree again 
-      tree.Root.SubTrees[0].InsertSubTree(0, mainBranch);
-      // insert the scaled main branch into the cloned tree
-      scaledTree.Root.SubTrees[0].InsertSubTree(0, scaledMainBranch);
-      ScaledSymbolicExpressionTreeParameter.ActualValue = scaledTree;
+        // remove the main branch before cloning to prevent cloning of sub-trees
+        trees[i].Root.SubTrees[0].RemoveSubTree(0);
+        var scaledTree = (SymbolicExpressionTree)trees[i].Clone();
+        // insert main branch into the original tree again 
+        trees[i].Root.SubTrees[0].InsertSubTree(0, mainBranch);
+        // insert the scaled main branch into the cloned tree
+        scaledTree.Root.SubTrees[0].InsertSubTree(0, scaledMainBranch);
+        scaledTrees[i] = scaledTree;
+      }
+      ScaledSymbolicExpressionTreeParameter.ActualValue = scaledTrees;
       return base.Apply();
     }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 3682)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/ValidationBestScaledSymbolicRegressionSolutionAnalyzer.cs	(revision 3683)
@@ -95,4 +95,8 @@
     [Storable]
     private BestSymbolicRegressionSolutionAnalyzer bestSolutionAnalyzer;
+    [Storable]
+    private SymbolicRegressionSolutionLinearScaler linearScaler;
+    [Storable]
+    private SymbolicRegressionMeanSquaredErrorCalculator validationMseCalculator;
 
     public ValidationBestScaledSymbolicRegressionSolutionAnalyzer()
@@ -110,7 +114,6 @@
 
       #region operator initialization
-      UniformSubScopesProcessor subScopesProc = new UniformSubScopesProcessor();
-      SymbolicRegressionSolutionLinearScaler linearScaler = new SymbolicRegressionSolutionLinearScaler();
-      SymbolicRegressionMeanSquaredErrorEvaluator validationMseEvaluator = new SymbolicRegressionMeanSquaredErrorEvaluator();
+      linearScaler = new SymbolicRegressionSolutionLinearScaler();
+      validationMseCalculator = new SymbolicRegressionMeanSquaredErrorCalculator();
       bestSolutionAnalyzer = new BestSymbolicRegressionSolutionAnalyzer();
       validationQualityMemorizer = new BestQualityMemorizer();
@@ -122,16 +125,21 @@
       #region parameter wiring
       linearScaler.AlphaParameter.ActualName = AlphaParameterName;
+      linearScaler.AlphaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       linearScaler.BetaParameter.ActualName = BetaParameterName;
+      linearScaler.BetaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       linearScaler.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name;
+      linearScaler.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       linearScaler.ScaledSymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
-
-      validationMseEvaluator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
-      validationMseEvaluator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
-      validationMseEvaluator.SymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
-      validationMseEvaluator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
-      validationMseEvaluator.QualityParameter.ActualName = QualityParameterName;
-      validationMseEvaluator.RegressionProblemDataParameter.ActualName = ProblemDataParameter.Name;
-      validationMseEvaluator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;
-      validationMseEvaluator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;
+      linearScaler.ScaledSymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+
+      validationMseCalculator.LowerEstimationLimitParameter.ActualName = LowerEstimationLimitParameter.Name;
+      validationMseCalculator.UpperEstimationLimitParameter.ActualName = UpperEstimationLimitParameter.Name;
+      validationMseCalculator.SymbolicExpressionTreeParameter.ActualName = ScaledSymbolicExpressionTreeParameterName;
+      validationMseCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      validationMseCalculator.SymbolicExpressionTreeInterpreterParameter.ActualName = SymbolicExpressionTreeInterpreterParameter.Name;
+      validationMseCalculator.QualityParameter.ActualName = QualityParameterName;
+      validationMseCalculator.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
+      validationMseCalculator.SamplesStartParameter.ActualName = SamplesStartParameter.Name;
+      validationMseCalculator.SamplesEndParameter.ActualName = SamplesEndParameter.Name;
 
       bestSolutionAnalyzer.BestSolutionParameter.ActualName = BestSolutionParameter.Name;
@@ -167,9 +175,7 @@
 
       #region operator graph
-      OperatorGraph.InitialOperator = subScopesProc;
-      subScopesProc.Operator = linearScaler;
-      linearScaler.Successor = validationMseEvaluator;
-      validationMseEvaluator.Successor = null;
-      subScopesProc.Successor = bestSolutionAnalyzer;
+      OperatorGraph.InitialOperator = linearScaler;
+      linearScaler.Successor = validationMseCalculator;
+      validationMseCalculator.Successor = bestSolutionAnalyzer;
       bestSolutionAnalyzer.Successor = bestAvgWorstValidationQualityCalculator;
       bestAvgWorstValidationQualityCalculator.Successor = validationQualityMemorizer;
@@ -197,6 +203,12 @@
 
     private void SymbolicExpressionTreeParameter_DepthChanged(object sender, EventArgs e) {
+      validationMseCalculator.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       validationQualityMemorizer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
       bestSolutionAnalyzer.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      bestSolutionAnalyzer.QualityParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      linearScaler.AlphaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      linearScaler.BetaParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      linearScaler.SymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
+      linearScaler.ScaledSymbolicExpressionTreeParameter.Depth = SymbolicExpressionTreeParameter.Depth;
     }
   }
