Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame	(revision 5539)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLabAlgorithmsDataAnalysisPlugin.cs.frame	(revision 5540)
@@ -28,4 +28,5 @@
   [Plugin("HeuristicLab.Algorithms.DataAnalysis", "3.4.0.$WCREV$")]
   [PluginFile("HeuristicLab.Algorithms.DataAnalysis-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.ALGLIB", "3.1.0")]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
   [PluginDependency("HeuristicLab.Common", "3.3")]
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblem.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblem.cs	(revision 5540)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblem.cs	(revision 5540)
@@ -0,0 +1,57 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  public abstract class DataAnalysisProblem<T> : Problem<IDataAnalysisEvaluator<T>, IDataAnalysisSolutionCreator<T>>,
+    IDataAnalysisProblem<T>
+    where T : class, IDataAnalysisProblemData {
+    private const string ProblemDataParameterName = "ProblemData";
+    #region parameter properties
+    public IValueParameter<T> ProblemDataParameter {
+      get { return (IValueParameter<T>)Parameters[ProblemDataParameterName]; }
+    }
+    #endregion
+    #region properties
+    public T ProblemData {
+      get { return ProblemDataParameter.Value; }
+    }
+    #endregion
+    protected DataAnalysisProblem(DataAnalysisProblem<T> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    [StorableConstructor]
+    protected DataAnalysisProblem(bool deserializing) : base(deserializing) { }
+    public DataAnalysisProblem()
+      : base() {
+    }
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblemData.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblemData.cs	(revision 5540)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisProblemData.cs	(revision 5540)
@@ -0,0 +1,251 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  public abstract class DataAnalysisProblemData : ParameterizedNamedItem,
+    IDataAnalysisProblemData {
+    private const string DatasetParameterName = "Dataset";
+    private const string InputVariablesParameterName = "Input variables";
+    private const string TrainingSamplesStartParameterName = "Training partition start";
+    private const string TrainingSamplesEndParameterName = "Training partition end";
+    private const string TestSamplesStartParameterName = "Test partition start";
+    private const string TestSamplesEndParameterName = "Test partition end";
+
+    #region default data
+    // y = x^4 + x^3 + x^2 + x
+    private static double[,] kozaF1 = new double[,] {
+{2.017885919,	-1.449165046},
+{1.30060506,	-1.344523885},
+{1.147134798,	-1.317989331},
+{0.877182504,	-1.266142284},
+{0.852562452,	-1.261020794},
+{0.431095788,	-1.158793317},
+{0.112586002,	-1.050908405},
+{0.04594507,	-1.021989402},
+{0.042572879,	-1.020438113},
+{-0.074027291,	-0.959859562},
+{-0.109178553,	-0.938094706},
+{-0.259721109,	-0.803635355},
+{-0.272991057,	-0.387519561},
+{-0.161978191,	-0.193611001},
+{-0.102489983,	-0.114215349},
+{-0.01469968,	-0.014918985},
+{-0.008863365,	-0.008942626},
+{0.026751057,	0.026054094},
+{0.166922436,	0.14309643},
+{0.176953808,	0.1504144},
+{0.190233418,	0.159916534},
+{0.199800708,	0.166635331},
+{0.261502822,	0.207600348},
+{0.30182879,	0.232370249},
+{0.83763905,	0.468046718}
+    };
+    #endregion
+
+    #region parameter properties
+    public IValueParameter<Dataset> DatasetParameter {
+      get { return (IValueParameter<Dataset>)Parameters[DatasetParameterName]; }
+    }
+    public IValueParameter<CheckedItemList<StringValue>> InputVariablesParameter {
+      get { return (IValueParameter<CheckedItemList<StringValue>>)Parameters[InputVariablesParameterName]; }
+    }
+    public IValueParameter<IntValue> TrainingSamplesStartParameter {
+      get { return (IValueParameter<IntValue>)Parameters[TrainingSamplesStartParameterName]; }
+    }
+    public IValueParameter<IntValue> TrainingSamplesEndParameter {
+      get { return (IValueParameter<IntValue>)Parameters[TrainingSamplesEndParameterName]; }
+    }
+    public IValueParameter<IntValue> TestSamplesStartParameter {
+      get { return (IValueParameter<IntValue>)Parameters[TestSamplesStartParameterName]; }
+    }
+    public IValueParameter<IntValue> TestSamplesEndParameter {
+      get { return (IValueParameter<IntValue>)Parameters[TestSamplesEndParameterName]; }
+    }
+    #endregion
+    #region propeties
+    public Dataset Dataset {
+      get { return DatasetParameter.Value; }
+    }
+
+    public IEnumerable<string> InputVariables {
+      get { return InputVariablesParameter.Value.CheckedItems.Select(i => i.Value.Value); }
+    }
+
+    public int TrainingSamplesStart {
+      get { return TrainingSamplesStartParameter.Value.Value; }
+      set {
+        if (value != TrainingSamplesStart) {
+          TrainingSamplesStartParameter.Value.Value = value;
+        }
+      }
+    }
+
+    public int TrainingSamplesEnd {
+      get { return TrainingSamplesEndParameter.Value.Value; }
+      set {
+        if (value != TrainingSamplesEnd) {
+          TrainingSamplesEndParameter.Value.Value = value;
+        }
+      }
+    }
+
+    public int TestSamplesStart {
+      get { return TestSamplesStartParameter.Value.Value; }
+      set {
+        if (value != TestSamplesStart) {
+          TestSamplesStartParameter.Value.Value = value;
+        }
+      }
+    }
+
+    public int TestSamplesEnd {
+      get { return TestSamplesEndParameter.Value.Value; }
+      set {
+        if (value != TestSamplesEnd) {
+          TestSamplesEndParameter.Value.Value = value;
+        }
+      }
+    }
+
+    public event EventHandler Changed;
+    #endregion
+
+    protected DataAnalysisProblemData(DataAnalysisProblemData original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    [StorableConstructor]
+    protected DataAnalysisProblemData(bool deserializing) : base(deserializing) { }
+    public DataAnalysisProblemData()
+      : base() {
+      List<string> variableNames = new List<string>() { "x", "f(x)" };
+      Dataset kozaF1Dataset = new Dataset(variableNames, kozaF1);
+      kozaF1Dataset.Name = "Fourth-order Polynomial Function Benchmark Dataset";
+      kozaF1Dataset.Description = "f(x) = x^4 + x^3 + x^2 + x^1";
+      CheckedItemList<StringValue> inputVariablesList = new CheckedItemList<StringValue>();
+      StringValue x = new StringValue(variableNames[0]);
+      StringValue fx = new StringValue(variableNames[1]);
+      inputVariablesList.Add(x, true);
+      inputVariablesList.Add(fx, false);
+      Parameters.Add(new ValueParameter<Dataset>(DatasetParameterName, kozaF1Dataset));
+      Parameters.Add(new ValueParameter<CheckedItemList<StringValue>>(InputVariablesParameterName, inputVariablesList));
+      Parameters.Add(new ValueParameter<IntValue>(TrainingSamplesStartParameterName, new IntValue(0)));
+      Parameters.Add(new ValueParameter<IntValue>(TrainingSamplesEndParameterName, new IntValue(kozaF1Dataset.Rows)));
+      Parameters.Add(new ValueParameter<IntValue>(TestSamplesStartParameterName, new IntValue(kozaF1Dataset.Rows)));
+      Parameters.Add(new ValueParameter<IntValue>(TestSamplesEndParameterName, new IntValue(kozaF1Dataset.Rows)));
+
+      RegisterEventHandlers();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    #region changed event propagation
+    private void RegisterEventHandlers() {
+      DatasetParameter.Value.Reset += new EventHandler(DatasetChanged);
+      DatasetParameter.Value.ColumnsChanged += new EventHandler(DatasetChanged);
+      DatasetParameter.Value.RowsChanged += new EventHandler(DatasetChanged);
+      InputVariablesParameter.Value.CheckedItemsChanged += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_CheckedItemsChanged);
+      InputVariablesParameter.Value.CollectionReset += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_CollectionReset);
+      InputVariablesParameter.Value.ItemsAdded += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_ItemsAdded);
+      InputVariablesParameter.Value.ItemsMoved += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_ItemsMoved);
+      InputVariablesParameter.Value.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_ItemsRemoved);
+      InputVariablesParameter.Value.ItemsReplaced += new Collections.CollectionItemsChangedEventHandler<Collections.IndexedItem<StringValue>>(InputVariables_ItemsReplaced);
+
+      TrainingSamplesStartParameter.ValueChanged += new EventHandler(TrainingSamplesStartParameter_ValueChanged);
+      TrainingSamplesEndParameter.ValueChanged += new EventHandler(TrainingSamplesEndParameter_ValueChanged);
+      TestSamplesStartParameter.ValueChanged += new EventHandler(TestSamplesStartParameter_ValueChanged);
+      TestSamplesEndParameter.ValueChanged += new EventHandler(TestSamplesEndParameter_ValueChanged);
+
+      TrainingSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+      TrainingSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+      TestSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+      TestSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+    }
+
+    private void TestSamplesEndParameter_ValueChanged(object sender, EventArgs e) {
+      TestSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+    }
+
+    private void TestSamplesStartParameter_ValueChanged(object sender, EventArgs e) {
+      TestSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+    }
+
+    private void TrainingSamplesEndParameter_ValueChanged(object sender, EventArgs e) {
+      TrainingSamplesEndParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+    }
+
+    private void TrainingSamplesStartParameter_ValueChanged(object sender, EventArgs e) {
+      TrainingSamplesStartParameter.Value.ValueChanged += new EventHandler(Partitions_ValueChanged);
+    }
+
+    private void Partitions_ValueChanged(object sender, EventArgs e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_ItemsReplaced(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_ItemsMoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_CollectionReset(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void InputVariables_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<StringValue>> e) {
+      OnProblemChanged();
+    }
+
+    private void DatasetChanged(object sender, EventArgs e) {
+      OnProblemChanged();
+    }
+
+    protected void OnProblemChanged() {
+      var listeners = Changed;
+      if (listeners != null) listeners(this, EventArgs.Empty);
+    }
+    #endregion
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 5539)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj	(revision 5540)
@@ -108,4 +108,8 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="RegressionProblemData.cs" />
+    <Compile Include="DataAnalysisProblemData.cs" />
+    <Compile Include="RegressionProblem.cs" />
+    <Compile Include="DataAnalysisProblem.cs" />
     <Compile Include="Dataset.cs" />
     <Compile Include="Interfaces\Classification\IClassificationEvaluator.cs" />
@@ -162,20 +166,4 @@
       <Name>HeuristicLab.Data-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
-      <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
-      <Name>ALGLIB-3.1.0</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0.csproj">
-      <Project>{DE69A359-A5B8-4D3D-BA8D-D5780D7F96D6}</Project>
-      <Name>HeuristicLab.ALGLIB-3.1.0 %28HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\HeuristicLab.ALGLIB-3.1.0\HeuristicLab.ALGLIB-3.1.0%29</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3.csproj">
-      <Project>{89B50302-9CEE-4D13-9779-633EADCAE624}</Project>
-      <Name>HeuristicLab.LibSVM-1.6.3 %28HeuristicLab.ExtLibs\HeuristicLab.LibSVM\HeuristicLab.LibSVM-1.6.3\HeuristicLab.LibSVM-1.6.3%29</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.LibSVM\1.6.3\LibSVM-1.6.3\LibSVM-1.6.3.csproj">
-      <Project>{A16F23B5-FB62-499E-A831-26953AA56FE2}</Project>
-      <Name>LibSVM-1.6.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs	(revision 5539)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs	(revision 5540)
@@ -21,8 +21,10 @@
 
 using HeuristicLab.Optimization;
+using HeuristicLab.Core;
 
 namespace HeuristicLab.Problems.DataAnalysis {
   public interface IDataAnalysisProblem<T> : IProblem
   where T : class, IDataAnalysisProblemData {
+    IValueParameter<T> ProblemDataParameter { get; }
     T ProblemData { get; }
     new IDataAnalysisEvaluator<T> Evaluator { get; }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblem.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblem.cs	(revision 5540)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblem.cs	(revision 5540)
@@ -0,0 +1,83 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  [Item("RegressionProblem", "")]
+  [Creatable]
+  public class RegressionProblem : DataAnalysisProblem<IRegressionProblemData>,
+    IRegressionProblem {
+    private const string ProblemDataParameterName = "ProblemData";
+    #region properties
+    public new IDataAnalysisEvaluator<IRegressionProblemData> Evaluator {
+      get { throw new NotImplementedException(); }
+    }
+
+    public new IRegressionSolutionCreator SolutionCreator {
+      get { throw new NotImplementedException(); }
+    }
+    IDataAnalysisSolutionCreator<IRegressionProblemData> IDataAnalysisProblem<IRegressionProblemData>.SolutionCreator {
+      get { throw new NotImplementedException(); }
+    }
+    #endregion
+
+    public RegressionProblem(RegressionProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    [StorableConstructor]
+    public RegressionProblem(bool deserializing) : base(deserializing) { }
+    public RegressionProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<IRegressionProblemData>(ProblemDataParameterName, "", new RegressionProblemData()));
+      RegisterEventHandlers();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RegressionProblem(this, cloner);
+    }
+
+    private void RegisterEventHandlers() {
+      ProblemDataParameter.Value.Changed += new EventHandler(Value_Changed);
+    }
+
+    #region event propagation
+    private void Value_Changed(object sender, EventArgs e) {
+      OnReset();
+    }
+    #endregion
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblemData.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblemData.cs	(revision 5540)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionProblemData.cs	(revision 5540)
@@ -0,0 +1,68 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.DataAnalysis {
+  [StorableClass]
+  public sealed class RegressionProblemData : DataAnalysisProblemData,
+    IRegressionProblemData {
+    private const string TargetVariableParameterName = "Target variable";
+
+    #region parameter properties
+    public IValueParameter<StringValue> TargetVariableParameter {
+      get { return (IValueParameter<StringValue>)Parameters[TargetVariableParameterName]; }
+    }
+    #endregion
+    #region propeties
+    public string TargetVariable {
+      get { return TargetVariableParameter.Value.Value; }
+    }
+    #endregion
+
+    private RegressionProblemData(RegressionProblemData original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    [StorableConstructor]
+    private RegressionProblemData(bool deserializing) : base(deserializing) { }
+    public RegressionProblemData()
+      : base() {
+      ConstrainedValueParameter<StringValue> targetVariableParameter = new ConstrainedValueParameter<StringValue>(TargetVariableParameterName);
+      foreach (var variableName in Dataset.VariableNames)
+        targetVariableParameter.ValidValues.Add(new StringValue(variableName));
+      targetVariableParameter.Value = targetVariableParameter.ValidValues.First();
+
+      Parameters.Add(targetVariableParameter);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RegressionProblemData(this, cloner);
+    }
+  }
+}
