Index: branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ClassificationInstanceProvider.cs
===================================================================
--- branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ClassificationInstanceProvider.cs	(revision 7685)
+++ branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ClassificationInstanceProvider.cs	(revision 7759)
@@ -26,12 +26,17 @@
 using System.Linq;
 using System.Text;
+using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.Problems.Instances.Classification {
-  public abstract class ClassificationInstanceProvider : IProblemInstanceProvider<ClassificationData> {
-    public ClassificationData LoadData(string path) {
+  public abstract class ClassificationInstanceProvider : IProblemInstanceProvider<ClassificationProblemData> {
+    public ClassificationProblemData LoadData(string path) {
       TableFileParser csvFileParser = new TableFileParser();
       csvFileParser.Parse(path);
 
-      ClassificationData claData = new ClassificationData();
+      Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);
+      string targetVar = csvFileParser.VariableNames.Last();
+      IEnumerable<string> allowedInputVars = csvFileParser.VariableNames.Where(x => !x.Equals(targetVar));
+
+      ClassificationProblemData claData = new ClassificationProblemData(dataset, allowedInputVars, targetVar);
       int pos = path.LastIndexOf('\\');
       if (pos < 0)
@@ -41,25 +46,14 @@
         claData.Name = path.Substring(pos, path.Length - pos);
       }
-      claData.InputVariables = new List<string>(csvFileParser.VariableNames).ToArray();
-      claData.TargetVariable = csvFileParser.VariableNames.Last();
-      claData.AllowedInputVariables = claData.InputVariables.Where(x => !x.Equals(claData.TargetVariable)).ToArray();
-      //convert to multidimensional array
-      List<IList> values = csvFileParser.Values;
-      claData.Values = new double[values.First().Count, values.Count];
-      for (int i = 0; i < values.Count; i++) {
-        for (int j = 0; j < values.First().Count; j++) {
-          claData.Values[j, i] = (double)values[i][j];
-        }
-      }
 
       int trainingPartEnd = csvFileParser.Rows * 2 / 3;
-      claData.TrainingPartitionStart = 0;
-      claData.TrainingPartitionEnd = trainingPartEnd;
-      claData.TestPartitionStart = trainingPartEnd;
-      claData.TestPartitionEnd = csvFileParser.Rows;
+      claData.TrainingPartition.Start = 0;
+      claData.TrainingPartition.End = trainingPartEnd;
+      claData.TestPartition.Start = trainingPartEnd;
+      claData.TestPartition.End = csvFileParser.Rows;
       return claData;
     }
 
-    public void SaveData(ClassificationData instance, string path) {
+    public void SaveData(ClassificationProblemData instance, string path) {
       StringBuilder strBuilder = new StringBuilder();
 
@@ -70,9 +64,9 @@
       strBuilder.AppendLine();
 
-      double[,] values = instance.Values;
+      Dataset dataset = instance.Dataset;
 
-      for (int i = 0; i < values.GetLength(0); i++) {
-        for (int j = 0; j < values.GetLength(1); j++) {
-          strBuilder.Append(values[i, j] + ";");
+      for (int i = 0; i < dataset.Rows; i++) {
+        for (int j = 0; j < dataset.Columns; j++) {
+          strBuilder.Append(dataset.GetValue(i, j) + ";");
         }
         strBuilder.Remove(strBuilder.Length - 1, 1);
@@ -86,5 +80,5 @@
 
     public abstract IEnumerable<IDataDescriptor> GetDataDescriptors();
-    public abstract ClassificationData LoadData(IDataDescriptor descriptor);
+    public abstract ClassificationProblemData LoadData(IDataDescriptor descriptor);
 
     public abstract string Name { get; }
@@ -92,6 +86,4 @@
     public abstract Uri WebLink { get; }
     public abstract string ReferencePublication { get; }
-
-    public IProblemInstanceConsumer<ClassificationData> Consumer { get; set; }
   }
 }
