Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/CoefficientOfDeterminationEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/CoefficientOfDeterminationEvaluator.cs	(revision 712)
@@ -46,11 +46,11 @@
       double originalDeviationTotalSumOfSquares = 0.0;
       double targetMean = dataset.GetMean(targetVariable, start, end);
-      for(int sample = start; sample < end; sample++) {
+      for (int sample = start; sample < end; sample++) {
         double estimated = evaluator.Evaluate(sample);
-        double original = dataset.GetValue(targetVariable, sample);
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
-        if(!double.IsNaN(original) && !double.IsInfinity(original)) {
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
           double error = estimated - original;
           errorsSquaredSum += error * error;
@@ -62,11 +62,11 @@
 
       double quality = 1 - errorsSquaredSum / originalDeviationTotalSumOfSquares;
-      if(quality > 1)
+      if (quality > 1)
         throw new InvalidProgramException();
-      if(double.IsNaN(quality) || double.IsInfinity(quality))
+      if (double.IsNaN(quality) || double.IsInfinity(quality))
         quality = double.MaxValue;
 
       DoubleData r2 = GetVariableValue<DoubleData>("R2", scope, false, false);
-      if(r2 == null) {
+      if (r2 == null) {
         r2 = new DoubleData();
         scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("R2"), r2));
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/EarlyStoppingMeanSquaredErrorEvaluator.cs	(revision 712)
@@ -47,5 +47,5 @@
       double qualityLimit = GetVariableValue<DoubleData>("QualityLimit", scope, false).Data;
       DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
-      if(mse == null) {
+      if (mse == null) {
         mse = new DoubleData();
         scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MSE"), mse));
@@ -54,16 +54,16 @@
       double errorsSquaredSum = 0;
       int rows = end - start;
-      for(int sample = start; sample < end; sample++) {
+      for (int sample = start; sample < end; sample++) {
         double estimated = evaluator.Evaluate(sample);
-        double original = dataset.GetValue(targetVariable, sample);
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
-        if(!double.IsNaN(original) && !double.IsInfinity(original)) {
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
           double error = estimated - original;
           errorsSquaredSum += error * error;
         }
         // check the limit and stop as soon as we hit the limit
-        if(errorsSquaredSum / rows >= qualityLimit) {
+        if (errorsSquaredSum / rows >= qualityLimit) {
           mse.Data = errorsSquaredSum / (sample - start + 1); // return estimated MSE (when the remaining errors are on average the same)
           return;
@@ -71,5 +71,5 @@
       }
       errorsSquaredSum /= rows;
-      if(double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
+      if (double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
         errorsSquaredSum = double.MaxValue;
       }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/GPEvaluatorBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/GPEvaluatorBase.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/GPEvaluatorBase.cs	(revision 712)
@@ -57,8 +57,8 @@
       double[] backupValues = null;
       // prepare for autoregressive modelling by saving the original values of the target-variable to a backup array
-      if(useEstimatedValues &&
-        (backupValues == null || backupValues.Length!=end-start)) {
+      if (useEstimatedValues &&
+        (backupValues == null || backupValues.Length != end - start)) {
         backupValues = new double[end - start];
-        for(int i = start; i < end; i++) {
+        for (int i = start; i < end; i++) {
           backupValues[i - start] = dataset.GetValue(i, targetVariable);
         }
@@ -72,6 +72,6 @@
 
       // restore the values of the target variable from the backup array if necessary
-      if(useEstimatedValues) {
-        for(int i = start; i < end; i++) {
+      if (useEstimatedValues) {
+        for (int i = start; i < end; i++) {
           dataset.SetValue(i, targetVariable, backupValues[i - start]);
         }
@@ -79,5 +79,5 @@
 
       // update the value of total evaluated nodes
-      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end-start);
+      scope.GetVariableValue<DoubleData>("TotalEvaluatedNodes", true).Data = totalEvaluatedNodes + treeSize * (end - start);
       return null;
     }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanAbsolutePercentageErrorEvaluator.cs	(revision 712)
@@ -46,13 +46,13 @@
       double errorsSum = 0.0;
       int n = 0;
-      for(int sample = start; sample < end; sample++) {
+      for (int sample = start; sample < end; sample++) {
         double estimated = evaluator.Evaluate(sample);
-        double original = dataset.GetValue(targetVariable, sample);
+        double original = dataset.GetValue(sample, targetVariable);
 
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
-        
-        if(!double.IsNaN(original) && !double.IsInfinity(original) && original != 0.0) {
+
+        if (!double.IsNaN(original) && !double.IsInfinity(original) && original != 0.0) {
           double percent_error = Math.Abs((estimated - original) / original);
           errorsSum += percent_error;
@@ -61,10 +61,10 @@
       }
       double quality = errorsSum / n;
-      if(double.IsNaN(quality) || double.IsInfinity(quality))
+      if (double.IsNaN(quality) || double.IsInfinity(quality))
         quality = double.MaxValue;
 
       // create a variable for the MAPE
       DoubleData mape = GetVariableValue<DoubleData>("MAPE", scope, false, false);
-      if(mape == null) {
+      if (mape == null) {
         mape = new DoubleData();
         scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MAPE"), mape));
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanSquaredErrorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/MeanSquaredErrorEvaluator.cs	(revision 712)
@@ -45,11 +45,11 @@
     public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
       double errorsSquaredSum = 0;
-      for(int sample = start; sample < end; sample++) {
-        double original = dataset.GetValue(targetVariable, sample);
+      for (int sample = start; sample < end; sample++) {
+        double original = dataset.GetValue(sample, targetVariable);
         double estimated = evaluator.Evaluate(sample);
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
-        if(!double.IsNaN(original) && !double.IsInfinity(original)) {
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
           double error = estimated - original;
           errorsSquaredSum += error * error;
@@ -58,10 +58,10 @@
 
       errorsSquaredSum /= (end - start);
-      if(double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
+      if (double.IsNaN(errorsSquaredSum) || double.IsInfinity(errorsSquaredSum)) {
         errorsSquaredSum = double.MaxValue;
       }
 
       DoubleData mse = GetVariableValue<DoubleData>("MSE", scope, false, false);
-      if(mse == null) {
+      if (mse == null) {
         mse = new DoubleData();
         scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("MSE"), mse));
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/SimpleEvaluator.cs	(revision 712)
@@ -38,8 +38,8 @@
     public override void Evaluate(IScope scope, BakedTreeEvaluator evaluator, Dataset dataset, int targetVariable, int start, int end, bool updateTargetValues) {
       ItemList values = GetVariableValue<ItemList>("Values", scope, false, false);
-      if(values == null) {
+      if (values == null) {
         values = new ItemList();
         IVariableInfo info = GetVariableInfo("Values");
-        if(info.Local)
+        if (info.Local)
           AddVariable(new HeuristicLab.Core.Variable(info.ActualName, values));
         else
@@ -48,10 +48,10 @@
       values.Clear();
 
-      for(int sample = start; sample < end; sample++) {
+      for (int sample = start; sample < end; sample++) {
         ItemList row = new ItemList();
         double estimated = evaluator.Evaluate(sample);
-        double original = dataset.GetValue(targetVariable, sample);
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
         row.Add(new DoubleData(estimated));
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/VarianceAccountedForEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/VarianceAccountedForEvaluator.cs	(revision 702)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/Evaluators/VarianceAccountedForEvaluator.cs	(revision 712)
@@ -57,11 +57,11 @@
       double[] errors = new double[nSamples];
       double[] originalTargetVariableValues = new double[nSamples];
-      for(int sample = start; sample < end; sample++) {
+      for (int sample = start; sample < end; sample++) {
         double estimated = evaluator.Evaluate(sample);
-        double original = dataset.GetValue(targetVariable, sample);
-        if(updateTargetValues) {
-          dataset.SetValue(targetVariable, sample, estimated);
+        double original = dataset.GetValue(sample, targetVariable);
+        if (updateTargetValues) {
+          dataset.SetValue(sample, targetVariable, estimated);
         }
-        if(!double.IsNaN(original) && !double.IsInfinity(original)) {
+        if (!double.IsNaN(original) && !double.IsInfinity(original)) {
           errors[sample - start] = original - estimated;
           originalTargetVariableValues[sample - start] = original;
@@ -72,9 +72,9 @@
       double quality = 1 - errorsVariance / originalsVariance;
 
-      if(double.IsNaN(quality) || double.IsInfinity(quality)) {
+      if (double.IsNaN(quality) || double.IsInfinity(quality)) {
         quality = double.MaxValue;
       }
       DoubleData vaf = GetVariableValue<DoubleData>("VAF", scope, false, false);
-      if(vaf == null) {
+      if (vaf == null) {
         vaf = new DoubleData();
         scope.AddVariable(new HeuristicLab.Core.Variable(scope.TranslateName("VAF"), vaf));
