Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs	(revision 6672)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -33,12 +32,15 @@
   public class ClassificationEnsembleProblemData : ClassificationProblemData {
 
-    public override IEnumerable<int> TrainingIndizes {
-      get { return Enumerable.Range(TrainingPartition.Start, TrainingPartition.End - TrainingPartition.Start); }
-    }
-    public override IEnumerable<int> TestIndizes {
-      get { return Enumerable.Range(TestPartition.Start, TestPartition.End - TestPartition.Start); }
+    public override bool IsTrainingSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TrainingPartition.Start <= index && index < TrainingPartition.End;
     }
 
-    private static ClassificationEnsembleProblemData emptyProblemData;
+    public override bool IsTestSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TestPartition.Start <= index && index < TestPartition.End;
+    }
+
+    private static readonly ClassificationEnsembleProblemData emptyProblemData;
     public static ClassificationEnsembleProblemData EmptyProblemData {
       get { return emptyProblemData; }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 6672)
@@ -171,9 +171,9 @@
      {1176881,7,5,3,7,4,10,7,5,5,4        }
 };
-    private static Dataset defaultDataset;
-    private static IEnumerable<string> defaultAllowedInputVariables;
-    private static string defaultTargetVariable;
-
-    private static ClassificationProblemData emptyProblemData;
+    private static readonly Dataset defaultDataset;
+    private static readonly IEnumerable<string> defaultAllowedInputVariables;
+    private static readonly string defaultTargetVariable;
+
+    private static readonly ClassificationProblemData emptyProblemData;
     public static ClassificationProblemData EmptyProblemData {
       get { return EmptyProblemData; }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 6672)
@@ -78,5 +78,5 @@
       get {
         return Enumerable.Range(TrainingPartition.Start, TrainingPartition.End - TrainingPartition.Start)
-                         .Where(i => i >= 0 && i < Dataset.Rows && (i < TestPartition.Start || TestPartition.End <= i));
+                         .Where(IsTrainingSample);
       }
     }
@@ -84,6 +84,17 @@
       get {
         return Enumerable.Range(TestPartition.Start, TestPartition.End - TestPartition.Start)
-           .Where(i => i >= 0 && i < Dataset.Rows);
+           .Where(IsTestSample);
       }
+    }
+
+    public virtual bool IsTrainingSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+        TrainingPartition.Start <= index && index < TrainingPartition.End &&
+        (index < TestPartition.Start || TestPartition.End <= index);
+    }
+
+    public virtual bool IsTestSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TestPartition.Start <= index && index < TestPartition.End;
     }
     #endregion
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleProblemData.cs	(revision 6672)
@@ -21,5 +21,4 @@
 
 using System.Collections.Generic;
-using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -33,17 +32,15 @@
   public sealed class RegressionEnsembleProblemData : RegressionProblemData {
 
-    public override IEnumerable<int> TrainingIndizes {
-      get {
-        return Enumerable.Range(TrainingPartition.Start, TrainingPartition.End - TrainingPartition.Start);
-      }
+    public override bool IsTrainingSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TrainingPartition.Start <= index && index < TrainingPartition.End;
     }
 
-    public override IEnumerable<int> TestIndizes {
-      get {
-        return Enumerable.Range(TestPartition.Start, TestPartition.End - TestPartition.Start);
-      }
+    public override bool IsTestSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TestPartition.Start <= index && index < TestPartition.End;
     }
 
-    private static RegressionEnsembleProblemData emptyProblemData;
+    private static readonly RegressionEnsembleProblemData emptyProblemData;
     public new static RegressionEnsembleProblemData EmptyProblemData {
       get { return emptyProblemData; }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 6672)
@@ -64,9 +64,9 @@
           {0.83763905,	0.468046718}
     };
-    private static Dataset defaultDataset;
-    private static IEnumerable<string> defaultAllowedInputVariables;
-    private static string defaultTargetVariable;
+    private static readonly Dataset defaultDataset;
+    private static readonly IEnumerable<string> defaultAllowedInputVariables;
+    private static readonly string defaultTargetVariable;
 
-    private static RegressionProblemData emptyProblemData;
+    private static readonly RegressionProblemData emptyProblemData;
     public static RegressionProblemData EmptyProblemData {
       get { return emptyProblemData; }
Index: trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 6666)
+++ trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 6672)
@@ -39,4 +39,7 @@
     IEnumerable<int> TestIndizes { get; }
 
+    bool IsTrainingSample(int index);
+    bool IsTestSample(int index);
+
     event EventHandler Changed;
   }
