Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 1906)
@@ -70,4 +70,12 @@
     }
 
+    public virtual IModel Model {
+      get {
+        if (!engine.Terminated) throw new InvalidOperationException("The algorithm is still running. Wait until the algorithm is terminated to retrieve the result.");
+        IScope bestModelScope = engine.GlobalScope.GetVariableValue<IScope>("BestValidationSolution", false);
+        return CreateGPModel(bestModelScope);
+      }
+    }
+
     public virtual int Elites {
       get { return GetVariableInjector().GetVariable("Elites").GetValue<IntData>().Data; }
@@ -405,4 +413,15 @@
     }
 
+    protected internal virtual Model CreateGPModel(IScope bestModelScope) {
+      Model model = new Model();
+      Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true);
+      model.Data = bestModelScope.GetVariableValue<IFunctionTree>("FunctionTree", false);
+      model.Dataset = ds;
+      model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
+      model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data;
+      model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data;
+      return model;
+    }
+
     public override object Clone(IDictionary<Guid, object> clonedObjects) {
       AlgorithmBase clone = (AlgorithmBase)base.Clone(clonedObjects);
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 1906)
@@ -312,4 +312,10 @@
     }
 
+    protected internal override Model CreateGPModel(IScope bestModelScope) {
+      Model model = base.CreateGPModel(bestModelScope);
+      model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data;
+      return model;
+    }
+
     public virtual IEditor CreateEditor() {
       return new StandardGpEditor(this);
Index: trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLab.Modeling-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLab.Modeling-3.2.csproj	(revision 1905)
+++ trunk/sources/HeuristicLab.Modeling/3.2/HeuristicLab.Modeling-3.2.csproj	(revision 1906)
@@ -83,4 +83,6 @@
   <ItemGroup>
     <Compile Include="ClassificationProblemInjector.cs" />
+    <Compile Include="Model.cs" />
+    <Compile Include="IModel.cs" />
     <Compile Include="SimpleEvaluatorBase.cs" />
     <Compile Include="ITimeSeriesAlgorithm.cs" />
Index: trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs	(revision 1906)
@@ -31,4 +31,6 @@
     IOperator ProblemInjector { get; set; }
     IEngine Engine { get; }
+
+    IModel Model { get; }
   }
 }
Index: trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 1906)
+++ trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 1906)
@@ -0,0 +1,37 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.Modeling {
+  public interface IModel {
+    Dataset Dataset { get; }
+    string TargetVariable { get; }
+    double TrainingMeanSquaredError { get; }
+    double ValidationMeanSquaredError { get; }
+    double TestMeanSquaredError { get; }
+    IItem Data { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 1906)
+++ trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 1906)
@@ -0,0 +1,70 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 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.Text;
+using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
+
+namespace HeuristicLab.Modeling {
+  public class Model : IModel {
+    #region IModel Members
+
+    private Dataset dataset;
+    public Dataset Dataset {
+      get { return dataset; }
+      set { dataset = value; }
+    }
+
+    private string targetVariable;
+    public string TargetVariable {
+      get { return targetVariable; }
+      set { targetVariable = value; }
+    }
+
+    private double trainingMSE;
+    public double TrainingMeanSquaredError {
+      get { return trainingMSE; }
+      set { trainingMSE = value; }
+    }
+
+    private double validationMSE;
+    public double ValidationMeanSquaredError {
+      get { return validationMSE; }
+      set { validationMSE = value; }
+    }
+
+    private double testMSE;
+    public double TestMeanSquaredError {
+      get { return testMSE; }
+      set { testMSE = value; }
+    }
+
+    private IItem data;
+    public IItem Data {
+      get { return data; }
+      set { data = value; }
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj	(revision 1905)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj	(revision 1906)
@@ -82,5 +82,4 @@
   <ItemGroup>
     <Compile Include="SupportVectorRegression.cs" />
-    <Compile Include="SVMRangeTransform.cs" />
     <Compile Include="SVMModel.cs" />
     <Compile Include="HeuristicLabSupportVectorMachinesPlugin.cs" />
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModel.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModel.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SVMModel.cs	(revision 1906)
@@ -29,13 +29,22 @@
 
 namespace HeuristicLab.Data {
-  public class SVMModel : ObjectData {
+  public class SVMModel : ItemBase {
+    private SVM.Model model;
     /// <summary>
     /// Gets or sets the SVM model.
     /// </summary>
-    /// <remarks>Uses property <see cref="ObjectData.Data"/> of base class <see cref="ObjectData"></see>. 
-    /// No own data storage present.</remarks>
-    public new SVM.Model Data {
-      get { return (SVM.Model)base.Data; }
-      set { base.Data = value; }
+    public SVM.Model Model {
+      get { return model; }
+      set { model = value; }
+    }
+
+
+    /// <summary>
+    /// Gets or sets the range transformation for the model.
+    /// </summary>
+    private SVM.RangeTransform rangeTransform;
+    public SVM.RangeTransform RangeTransform {
+      get { return rangeTransform; }
+      set { rangeTransform = value; }
     }
 
@@ -49,5 +58,6 @@
       clonedObjects.Add(Guid, clone);
       // beware we are only using a shallow copy here! (gkronber)
-      clone.Data = Data;
+      clone.Model = Model;
+      clone.RangeTransform = RangeTransform;
       return clone;
     }
@@ -64,13 +74,22 @@
     public override XmlNode GetXmlNode(string name, XmlDocument document, IDictionary<Guid, IStorable> persistedObjects) {
       XmlNode node = base.GetXmlNode(name, document, persistedObjects);
-      XmlNode data = document.CreateElement("Data");
-
+      XmlNode model = document.CreateElement("Model");
       using (MemoryStream stream = new MemoryStream()) {
-        SVM.Model.Write(stream, Data);
+        SVM.Model.Write(stream, Model);
         stream.Seek(0, System.IO.SeekOrigin.Begin);
         StreamReader reader = new StreamReader(stream);
-        data.InnerText = reader.ReadToEnd();
-        node.AppendChild(data);
+        model.InnerText = reader.ReadToEnd();
+        node.AppendChild(model);
       }
+
+      XmlNode rangeTransform = document.CreateElement("RangeTransform");
+      using (MemoryStream stream = new MemoryStream()) {
+        SVM.RangeTransform.Write(stream, RangeTransform);
+        stream.Seek(0, System.IO.SeekOrigin.Begin);
+        StreamReader reader = new StreamReader(stream);
+        rangeTransform.InnerText = reader.ReadToEnd();
+        node.AppendChild(rangeTransform);
+      }
+
       return node;
     }
@@ -84,7 +103,11 @@
     public override void Populate(XmlNode node, IDictionary<Guid, IStorable> restoredObjects) {
       base.Populate(node, restoredObjects);
-      XmlNode data = node.SelectSingleNode("Data");
-      using (MemoryStream stream = new MemoryStream(Encoding.ASCII.GetBytes(data.InnerText))) {
-        Data = SVM.Model.Read(stream);
+      XmlNode model = node.SelectSingleNode("Model");
+      using (MemoryStream stream = new MemoryStream(Encoding.ASCII.GetBytes(model.InnerText))) {
+        Model = SVM.Model.Read(stream);
+      }
+      XmlNode rangeTransform = node.SelectSingleNode("RangeTransform");
+      using (MemoryStream stream = new MemoryStream(Encoding.ASCII.GetBytes(rangeTransform.InnerText))) {
+        RangeTransform = SVM.RangeTransform.Read(stream);
       }
     }
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorCreator.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorCreator.cs	(revision 1906)
@@ -53,5 +53,5 @@
       AddVariableInfo(new VariableInfo("SVMGamma", "Gamma parameter in kernel function", typeof(DoubleData), VariableKind.In));
       AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(SVMModel), VariableKind.New | VariableKind.Out));
-      AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.New | VariableKind.Out));
+//    AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.New | VariableKind.Out));
     }
 
@@ -92,9 +92,10 @@
         //persist variables in scope
         SVMModel modelData = new SVMModel();
-        modelData.Data = model;
+        modelData.Model = model;
+        modelData.RangeTransform = rangeTransform;
         scope.AddVariable(new Variable(scope.TranslateName("SVMModel"), modelData));
-        SVMRangeTransform rangeTransformData = new SVMRangeTransform();
-        rangeTransformData.Data = rangeTransform;
-        scope.AddVariable(new Variable(scope.TranslateName("SVMRangeTransform"), rangeTransformData));
+        //SVMRangeTransform rangeTransformData = new SVMRangeTransform();
+        //rangeTransformData.Data = rangeTransform;
+        //scope.AddVariable(new Variable(scope.TranslateName("SVMRangeTransform"), rangeTransformData));
         return null;
       } else {
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorEvaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorEvaluator.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorEvaluator.cs	(revision 1906)
@@ -41,5 +41,5 @@
 
       AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(SVMModel), VariableKind.In));
-      AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.In));
+      // AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.In));
 
       AddVariableInfo(new VariableInfo("Values", "Target vs predicted values", typeof(DoubleMatrixData), VariableKind.New | VariableKind.Out));
@@ -54,13 +54,13 @@
       int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data;
 
-      SVM.Model model = GetVariableValue<SVMModel>("SVMModel", scope, true).Data;
-      SVM.RangeTransform rangeTransform = GetVariableValue<SVMRangeTransform>("SVMRangeTransform", scope, true).Data;
+      SVMModel modelData = GetVariableValue<SVMModel>("SVMModel", scope, true);
+      // SVM.RangeTransform rangeTransform = GetVariableValue<SVMRangeTransform>("SVMRangeTransform", scope, true).Data;
 
       SVM.Problem problem = SVMHelper.CreateSVMProblem(dataset, allowedFeatures, targetVariable, start, end);
-      SVM.Problem scaledProblem = SVM.Scaling.Scale(problem, rangeTransform);
+      SVM.Problem scaledProblem = SVM.Scaling.Scale(problem, modelData.RangeTransform);
 
       double[,] values = new double[end-start, 2];
       for (int i = 0; i < end - start; i++) {
-        values[i,0] = SVM.Prediction.Predict(model, scaledProblem.X[i]);
+        values[i,0] = SVM.Prediction.Predict(modelData.Model, scaledProblem.X[i]);
         values[i,1] = dataset.Samples[(start + i) * dataset.Columns + targetVariable];
       }
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 1905)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 1906)
@@ -58,4 +58,12 @@
     }
 
+    public IModel Model {
+      get {
+        if (!engine.Terminated) throw new InvalidOperationException("The algorithm is still running. Wait until the algorithm is terminated to retrieve the result.");
+        IScope bestModelScope = engine.GlobalScope.GetVariableValue<IScope>("BestValidationSolution", false);
+        return CreateSVMModel(bestModelScope);
+      }
+    }
+
     public DoubleArrayData NuList {
       get { return GetVariableInjector().GetVariable("NuList").GetValue<DoubleArrayData>(); }
@@ -127,7 +135,5 @@
       modelCreator.GetVariableInfo("SVMModel").ActualName = "Model";
       modelCreator.GetVariableInfo("SVMNu").ActualName = "Nu";
-      modelCreator.GetVariableInfo("SVMRangeTransform").ActualName = "RangeTransform";
       modelCreator.GetVariableInfo("SVMType").ActualName = "Type";
-
 
       modelProcessor.AddSubOperator(modelCreator);
@@ -196,5 +202,4 @@
       evaluator.Name = p + "SimpleEvaluator";
       evaluator.GetVariableInfo("SVMModel").ActualName = "Model";
-      evaluator.GetVariableInfo("SVMRangeTransform").ActualName = "RangeTransform";
       evaluator.GetVariableInfo("SamplesStart").ActualName = p + "SamplesStart";
       evaluator.GetVariableInfo("SamplesEnd").ActualName = p + "SamplesEnd";
@@ -277,4 +282,10 @@
     }
 
+    protected internal virtual Model CreateSVMModel(IScope bestModelScope) {
+      Model model = new Model();
+      model.Data = bestModelScope.GetVariableValue<SVMModel>("BestValidationModel", false);
+      return model;
+    }
+
     private IOperator GetVariableInjector() {
       return GetMainOperator().SubOperators[0];
