Index: /trunk/sources/HeuristicLab.ArtificialNeuralNetworks/3.2/Predictor.cs
===================================================================
--- /trunk/sources/HeuristicLab.ArtificialNeuralNetworks/3.2/Predictor.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.ArtificialNeuralNetworks/3.2/Predictor.cs	(revision 2619)
@@ -37,26 +37,20 @@
     }
 
-    public override double[] Predict(Dataset input, int start, int end) {
+    public override IEnumerable<double> Predict(Dataset input, int start, int end) {
 
       if (start < 0 || end <= start) throw new ArgumentException("start must be larger than zero and strictly smaller than end");
       if (end > input.Rows) throw new ArgumentOutOfRangeException("number of rows in input is smaller then end");
-      double[] result = new double[end - start];
-      for (int i = 0; i < result.Length; i++) {
-        try {
-          double[] output = new double[1];
-          double[] inputRow = new double[input.Columns - 1];
-          for (int c = 1; c < inputRow.Length; c++) {
-            inputRow[c - 1] = input.GetValue(i + start, c);
-          }
-          alglib.mlpbase.multilayerperceptron p = perceptron.Perceptron;
-          alglib.mlpbase.mlpprocess(ref p, ref inputRow, ref output);
-          perceptron.Perceptron = p;
-          result[i] = Math.Max(Math.Min(output[0], UpperPredictionLimit), LowerPredictionLimit);
+
+      for (int i = 0; i < end - start; i++) {
+        double[] output = new double[1];
+        double[] inputRow = new double[input.Columns - 1];
+        for (int c = 1; c < inputRow.Length; c++) {
+          inputRow[c - 1] = input.GetValue(i + start, c);
         }
-        catch (ArgumentException) {
-          result[i] = double.NaN;
-        }
+        alglib.mlpbase.multilayerperceptron p = perceptron.Perceptron;
+        alglib.mlpbase.mlpprocess(ref p, ref inputRow, ref output);
+        perceptron.Perceptron = p;
+        yield return Math.Max(Math.Min(output[0], UpperPredictionLimit), LowerPredictionLimit);
       }
-      return result;
     }
 
Index: /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs
===================================================================
--- /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs	(revision 2619)
@@ -29,4 +29,5 @@
 using System.Xml;
 using HeuristicLab.DataAnalysis;
+using System.Linq;
 
 namespace HeuristicLab.GP.StructureIdentification {
@@ -50,5 +51,5 @@
     }
 
-    public override double[] Predict(Dataset input, int start, int end) {
+    public override IEnumerable<double> Predict(Dataset input, int start, int end) {
       treeEvaluator.UpperEvaluationLimit = UpperPredictionLimit;
       treeEvaluator.LowerEvaluationLimit = LowerPredictionLimit;
@@ -56,15 +57,5 @@
       if (start < 0 || end <= start) throw new ArgumentException("start must be larger than zero and strictly smaller than end");
       if (end > input.Rows) throw new ArgumentOutOfRangeException("number of rows in input is smaller then end");
-      treeEvaluator.PrepareForEvaluation(input, functionTree.FunctionTree);
-      double[] result = new double[end - start];
-      for (int i = 0; i < result.Length; i++) {
-        try {
-          result[i] = treeEvaluator.Evaluate(i + start);
-        }
-        catch (ArgumentException) {
-          result[i] = double.NaN;
-        }
-      }
-      return result;
+      return treeEvaluator.Evaluate(input, functionTree.FunctionTree, Enumerable.Range(start, end - start));
     }
 
Index: /trunk/sources/HeuristicLab.Modeling/3.2/IPredictor.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/IPredictor.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/IPredictor.cs	(revision 2619)
@@ -30,5 +30,5 @@
     double UpperPredictionLimit { get; set; }
     double LowerPredictionLimit { get; set; }
-    double[] Predict(Dataset dataset, int start, int end);
+    IEnumerable<double> Predict(Dataset dataset, int start, int end);
     IEnumerable<string> GetInputVariables();
   } 
Index: /trunk/sources/HeuristicLab.Modeling/3.2/PredictorBase.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/PredictorBase.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/PredictorBase.cs	(revision 2619)
@@ -31,5 +31,5 @@
     public double UpperPredictionLimit { get; set; }
     public double LowerPredictionLimit { get; set; }
-    public abstract double[] Predict(Dataset dataset, int start, int end);
+    public abstract IEnumerable<double> Predict(Dataset dataset, int start, int end);
     public abstract IEnumerable<string> GetInputVariables();
 
Index: /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/VariableEvaluationImpactCalculator.cs	(revision 2619)
@@ -85,5 +85,5 @@
       Dataset dirtyDataset = (Dataset)dataset.Clone();
       IPredictor dirtyPredictor = (IPredictor)predictor.Clone();
-      double[] referenceValues = predictor.Predict(dataset, start, end);
+      double[] referenceValues = predictor.Predict(dataset, start, end).ToArray();
 
       double mean;
@@ -101,5 +101,5 @@
             mean = dataset.GetMean(variableName, start, end);
             oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end);
-            newValues = dirtyPredictor.Predict(dirtyDataset, start, end);
+            newValues = dirtyPredictor.Predict(dirtyDataset, start, end).ToArray();
             evaluationImpacts[variableName] = 1 - CalculateVAF(referenceValues, newValues);
             dirtyDataset.ReplaceVariableValues(variableName, oldValues, start, end);
Index: /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.Modeling/3.2/VariableQualityImpactCalculator.cs	(revision 2619)
@@ -85,5 +85,5 @@
       IPredictor dirtyPredictor = (IPredictor)predictor.Clone();
 
-      double[] predictedValues = predictor.Predict(dataset, start, end);
+      double[] predictedValues = predictor.Predict(dataset, start, end).ToArray();
       double[] targetValues = dataset.GetVariableValues(targetVariableName, start, end);
 
@@ -105,5 +105,5 @@
           mean = dataset.GetMean(variableName, start, end);
           oldValues = dirtyDataset.ReplaceVariableValues(variableName, Enumerable.Repeat(mean, end - start), start, end);
-          predictedValues = dirtyPredictor.Predict(dirtyDataset, start, end);
+          predictedValues = dirtyPredictor.Predict(dirtyDataset, start, end).ToArray();
           newMSE = CalculateMSE(predictedValues, targetValues);
           evaluationImpacts[variableName] = newMSE / oldMSE;
Index: /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/Predictor.cs
===================================================================
--- /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/Predictor.cs	(revision 2618)
+++ /trunk/sources/HeuristicLab.SupportVectorMachines/3.2/Predictor.cs	(revision 2619)
@@ -66,5 +66,5 @@
     }
 
-    public override double[] Predict(Dataset input, int start, int end) {
+    public override IEnumerable<double> Predict(Dataset input, int start, int end) {
       if (start < 0 || end <= start) throw new ArgumentException("start must be larger than zero and strictly smaller than end");
       if (end > input.Rows) throw new ArgumentOutOfRangeException("number of rows in input is smaller then end");
@@ -78,17 +78,16 @@
       int targetVariableIndex = input.GetVariableIndex(targetVariable);
       int rows = end - start;
-      double[] result = new double[rows];
+      //double[] result = new double[rows];
       int problemRow = 0;
       for (int resultRow = 0; resultRow < rows; resultRow++) {
         if (double.IsNaN(input.GetValue(resultRow, targetVariableIndex)))
-          result[resultRow] = UpperPredictionLimit;
+          yield return UpperPredictionLimit;
         else if (resultRow + maxTimeOffset < 0) {
-          result[resultRow] = UpperPredictionLimit;
           problemRow++;
+          yield return UpperPredictionLimit;
         } else {
-          result[resultRow] = Math.Max(Math.Min(SVM.Prediction.Predict(model, scaledProblem.X[problemRow++]), UpperPredictionLimit), LowerPredictionLimit);
+          yield return Math.Max(Math.Min(SVM.Prediction.Predict(model, scaledProblem.X[problemRow++]), UpperPredictionLimit), LowerPredictionLimit);
         }
       }
-      return result;
     }
 
