Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj	(revision 1889)
+++ 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 1889)
+++ 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 1889)
+++ 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 1889)
+++ 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 1889)
+++ 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];
