Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Analyzer/ValidationBestScaledSymbolicVectorRegressionSolutionAnalyzer.cs	(revision 4112)
@@ -145,5 +145,5 @@
       if (Alpha.Length == trees.Length) {
         scaledTrees = from i in Enumerable.Range(0, trees.Length)
-                      select SymbolicVectorRegressionSolutionLinearScaler.Scale(trees[i], Alpha[i].ToArray(), Beta[i].ToArray());
+                      select SymbolicVectorRegressionSolutionLinearScaler.Scale(trees[i], Beta[i].ToArray(), Alpha[i].ToArray());
       } else {
         scaledTrees = trees;
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 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicRegressionNormalizedMeanSquaredErrorEvaluator.cs	(revision 4112)
@@ -65,26 +65,5 @@
 
     public static double Calculate(ISymbolicExpressionTreeInterpreter interpreter, SymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, Dataset dataset, string targetVariable, IEnumerable<int> rows) {
-      int targetVariableIndex = dataset.GetVariableIndex(targetVariable);
-      var estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, dataset, rows);
-      var originalValues = dataset.GetEnumeratedVariableValues(targetVariableIndex, rows);
-      IEnumerator<double> originalEnumerator = originalValues.GetEnumerator();
-      IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator();
-      OnlineNormalizedMeanSquaredErrorEvaluator mseEvaluator = new OnlineNormalizedMeanSquaredErrorEvaluator();
-
-      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.NormalizedMeanSquaredError;
-      }
+      return SymbolicRegressionScaledNormalizedMeanSquaredErrorEvaluator.CalculateWithScaling(interpreter, solution, lowerEstimationLimit, upperEstimationLimit, dataset, targetVariable, rows, 1.0, 0.0);
     }
   }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionNormalizedMseEvaluator.cs	(revision 4112)
@@ -73,5 +73,5 @@
         tree.Root.SubTrees[0].AddSubTree(treeNode);
       }
-      return nmseSum / targetVariablesList.Count;
+      return nmseSum;
     }
   }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledMseEvaluator.cs	(revision 4112)
@@ -75,5 +75,5 @@
         double mse = SymbolicRegressionScaledMeanSquaredErrorEvaluator.Calculate(interpreter, tree,
           lowerEstimationBound[i], upperEstimationBound[i],
-          problemData.Dataset, targetVariablesList[i], rows, out compAlpha, out compBeta);
+          problemData.Dataset, targetVariablesList[i], rows, out compBeta, out compAlpha);
 
         qualities[i] = mse;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionScaledNormalizedMseEvaluator.cs	(revision 4112)
@@ -87,5 +87,5 @@
       AlphaParameter.ActualValue = alpha;
       BetaParameter.ActualValue = beta;
-      QualityParameter.ActualValue = new DoubleValue(nmseSum / targetVariables.Count());
+      QualityParameter.ActualValue = new DoubleValue(nmseSum);
     }
   }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/SymbolicVectorRegressionSolutionLinearScaler.cs	(revision 4112)
@@ -68,5 +68,5 @@
       DoubleArray beta = BetaParameter.ActualValue;
       if (alpha != null && beta != null) {
-        ScaledSymbolicExpressionTreeParameter.ActualValue = Scale(tree, alpha.ToArray(), beta.ToArray());
+        ScaledSymbolicExpressionTreeParameter.ActualValue = Scale(tree, beta.ToArray(), alpha.ToArray());
       } else {
         // alpha or beta parameter not available => do not scale tree
@@ -77,5 +77,5 @@
     }
 
-    public static SymbolicExpressionTree Scale(SymbolicExpressionTree original, double[] alpha, double[] beta) {
+    public static SymbolicExpressionTree Scale(SymbolicExpressionTree original, double[] beta, double[] alpha) {
       List<SymbolicExpressionTreeNode> resultProducingBranches = new List<SymbolicExpressionTreeNode>(original.Root.SubTrees[0].SubTrees);
       // remove the main branch before cloning to prevent cloning of sub-trees
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.MultiVariate/3.3/MultiVariateDataAnalysisProblem.cs	(revision 4112)
@@ -51,5 +51,5 @@
 
     [StorableConstructor]
-    private MultiVariateDataAnalysisProblem(bool deserializing) : base() { }
+    protected MultiVariateDataAnalysisProblem(bool deserializing) : base(deserializing) { }
     public MultiVariateDataAnalysisProblem()
       : base() {
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 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj	(revision 4112)
@@ -115,5 +115,4 @@
     <Compile Include="LinearRegression\LinearRegressionSolutionCreator.cs" />
     <Compile Include="LinearRegression\LinearRegressionUtil.cs" />
-    <Compile Include="RandomEnumerable.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SupportVectorRegression\BestSupportVectorRegressionSolutionAnalyzer.cs" />
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/RandomEnumerable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/RandomEnumerable.cs	(revision 4111)
+++ 	(revision )
@@ -1,56 +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.Random;
-
-namespace HeuristicLab.Problems.DataAnalysis.Regression {
-  public class RandomEnumerable {
-    public static IEnumerable<int> SampleRandomNumbers(int maxElement, int count) {
-      return SampleRandomNumbers(((uint)DateTime.Now.Ticks), 0, maxElement, count);
-    }
-
-    public static IEnumerable<int> SampleRandomNumbers(int start, int end, int count) {
-      return SampleRandomNumbers(((uint)DateTime.Now.Ticks), start, end, count);
-    }
-
-    public static IEnumerable<int> SampleRandomNumbers(uint seed, int maxElement, int count) {
-      return SampleRandomNumbers(seed, 0, maxElement, count);
-    }
-
-    //algorithm taken from progamming pearls page 127
-    //IMPORTANT because IEnumerables with yield are used the seed must best be specified to return always 
-    //the same sequence of numbers without caching the values.
-    public static IEnumerable<int> SampleRandomNumbers(uint seed, int start, int end, int count) {
-      int remaining = end - start;
-      var mt = new MersenneTwister(seed);
-      for (int i = start; i < end && count > 0; i++) {
-        double probability = mt.NextDouble();
-        if (probability < ((double)count) / remaining) {
-          count--;
-          yield return i;
-        }
-        remaining--;
-      }
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 4111)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/HeuristicLab.Problems.DataAnalysis-3.3.csproj	(revision 4112)
@@ -135,4 +135,5 @@
     <Compile Include="Operators\WeightedParentsQualityVarianceComparator.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RandomEnumerable.cs" />
     <Compile Include="SupportVectorMachine\ParameterAdjustmentProblem\SupportVectorMachineParameterAdjustmentBestSolutionAnalyzer.cs" />
     <Compile Include="SupportVectorMachine\ParameterAdjustmentProblem\SupportVectorMachineParameterAdjustmentEvaluator.cs" />
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/RandomEnumerable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/RandomEnumerable.cs	(revision 4112)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/RandomEnumerable.cs	(revision 4112)
@@ -0,0 +1,56 @@
+﻿#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.Random;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  public class RandomEnumerable {
+    public static IEnumerable<int> SampleRandomNumbers(int maxElement, int count) {
+      return SampleRandomNumbers(((uint)DateTime.Now.Ticks), 0, maxElement, count);
+    }
+
+    public static IEnumerable<int> SampleRandomNumbers(int start, int end, int count) {
+      return SampleRandomNumbers(((uint)DateTime.Now.Ticks), start, end, count);
+    }
+
+    public static IEnumerable<int> SampleRandomNumbers(uint seed, int maxElement, int count) {
+      return SampleRandomNumbers(seed, 0, maxElement, count);
+    }
+
+    //algorithm taken from progamming pearls page 127
+    //IMPORTANT because IEnumerables with yield are used the seed must best be specified to return always 
+    //the same sequence of numbers without caching the values.
+    public static IEnumerable<int> SampleRandomNumbers(uint seed, int start, int end, int count) {
+      int remaining = end - start;
+      var mt = new MersenneTwister(seed);
+      for (int i = start; i < end && count > 0; i++) {
+        double probability = mt.NextDouble();
+        if (probability < ((double)count) / remaining) {
+          count--;
+          yield return i;
+        }
+        remaining--;
+      }
+    }
+  }
+}
