Index: branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Implementation/ConditionActionClassificationProblemData.cs
===================================================================
--- branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Implementation/ConditionActionClassificationProblemData.cs	(revision 9160)
+++ branches/LearningClassifierSystems/HeuristicLab.Problems.ConditionActionClassification/3.3/Implementation/ConditionActionClassificationProblemData.cs	(revision 9161)
@@ -64,18 +64,22 @@
       get { return (IFixedValueParameter<IntMatrix>)Parameters["Bounds"]; }
     }
+    public IFixedValueParameter<IntRange> TrainingPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters["TrainingPartition"]; }
+    }
+    public IFixedValueParameter<IntRange> TestPartitionParameter {
+      get { return (IFixedValueParameter<IntRange>)Parameters["TestPartition"]; }
+    }
     #endregion
 
+    #region properties
     public Dataset Dataset {
       get { return DatasetParameter.Value; }
     }
-
     public ICheckedItemList<StringValue> ConditionVariables {
       get { return ConditionVariablesParameter.Value; }
     }
-
     public ICheckedItemList<StringValue> ActionVariables {
       get { return ActionVariablesParameter.Value; }
     }
-
     public IEnumerable<string> AllowedConditionVariables {
       get { return ConditionVariables.CheckedItems.Select(x => x.Value.Value); }
@@ -84,4 +88,32 @@
       get { return ActionVariables.CheckedItems.Select(x => x.Value.Value); }
     }
+    public IntRange TrainingPartition {
+      get { return TrainingPartitionParameter.Value; }
+    }
+    public IntRange TestPartition {
+      get { return TestPartitionParameter.Value; }
+    }
+    public IEnumerable<int> TrainingIndices {
+      get {
+        return Enumerable.Range(TrainingPartition.Start, Math.Max(0, TrainingPartition.End - TrainingPartition.Start))
+                         .Where(IsTrainingSample);
+      }
+    }
+    public IEnumerable<int> TestIndices {
+      get {
+        return Enumerable.Range(TestPartition.Start, Math.Max(0, TestPartition.End - TestPartition.Start))
+           .Where(IsTestSample);
+      }
+    }
+    public bool IsTrainingSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+        TrainingPartition.Start <= index && index < TrainingPartition.End &&
+        (index < TestPartition.Start || TestPartition.End <= index);
+    }
+    public bool IsTestSample(int index) {
+      return index >= 0 && index < Dataset.Rows &&
+             TestPartition.Start <= index && index < TestPartition.End;
+    }
+    #endregion
 
     private IDictionary<int, IClassifier> fetchClassifiersCache = new Dictionary<int, IClassifier>();
@@ -113,4 +145,9 @@
         conditionVariables.SetItemCheckedState(x, allowedConditionVariables.Contains(x.Value));
       }
+
+      int trainingPartitionStart = 0;
+      int trainingPartitionEnd = dataset.Rows / 2;
+      int testPartitionStart = dataset.Rows / 2;
+      int testPartitionEnd = dataset.Rows;
 
       Parameters.Add(new FixedValueParameter<Dataset>("Dataset", "", dataset));
@@ -120,4 +157,6 @@
       Parameters.Add(new FixedValueParameter<IntValue>("ActionLength", "", new IntValue(allowedActionVariables.Count())));
       Parameters.Add(new FixedValueParameter<IntMatrix>("Bounds", "", GetBoundsMatrix(dataset, allowedConditionVariables, allowedActionVariables)));
+      Parameters.Add(new FixedValueParameter<IntRange>("TrainingPartition", "", new IntRange(trainingPartitionStart, trainingPartitionEnd)));
+      Parameters.Add(new FixedValueParameter<IntRange>("TestPartition", "", new IntRange(testPartitionStart, testPartitionEnd)));
 
       ((ValueParameter<Dataset>)DatasetParameter).ReactOnValueToStringChangedAndValueItemImageChanged = false;
@@ -158,4 +197,10 @@
     public IntMatrix Bounds {
       get { return BoundsParameter.Value; }
+    }
+
+    public IEnumerable<IClassifier> FetchClassifier(IEnumerable<int> rows) {
+      foreach (var row in rows) {
+        yield return FetchClassifier(row);
+      }
     }
 
