Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 1922)
@@ -44,5 +44,5 @@
     }
 
-    public Execution GetNextJob() {
+    public IAlgorithm GetNextJob() {
       // find and select a dataset
       var dataSetVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("DataSet");
@@ -67,9 +67,7 @@
 
       if (selectedAlgorithm != null) {
-        Execution exec = CreateExecution(dataSet.Problem, targetVariable, selectedAlgorithm);
-        exec.DataSetEntity = dataSetEntity;
-        exec.TargetVariable = targetVariableName;
-        return exec;
-      } else return null;
+        SetProblemParameters(selectedAlgorithm, dataSet.Problem, targetVariable);
+      }
+      return selectedAlgorithm;
     }
 
@@ -78,14 +76,7 @@
     public abstract IAlgorithm SelectAlgorithm(Entity dataSet, int targetVariable, LearningTask learningTask);
 
-    private Execution CreateExecution(Problem problem, int targetVariable, IAlgorithm algorithm) {
-      SetProblemParameters(algorithm, problem, targetVariable);
-      Execution exec = new Execution(algorithm.Engine);
-      exec.Description = algorithm.Name;
-      return exec;
-    }
-
     private void SetProblemParameters(IAlgorithm algo, Problem problem, int targetVariable) {
-      algo.ProblemInjector.GetVariable("Dataset").Value = problem.DataSet;
-      algo.ProblemInjector.GetVariable("TargetVariable").GetValue<IntData>().Data = targetVariable;
+      algo.Dataset = problem.DataSet;
+      algo.TargetVariable = targetVariable;
       algo.ProblemInjector.GetVariable("TrainingSamplesStart").GetValue<IntData>().Data = problem.TrainingSamplesStart;
       algo.ProblemInjector.GetVariable("TrainingSamplesEnd").GetValue<IntData>().Data = problem.TrainingSamplesEnd;
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 1922)
@@ -38,4 +38,5 @@
 using HeuristicLab.Core;
 using System.Threading;
+using HeuristicLab.Modeling;
 
 namespace HeuristicLab.CEDMA.Server {
@@ -68,42 +69,30 @@
     protected abstract void StartJobs();
 
-    protected void StoreResults(Execution finishedExecution, IEngine finishedEngine) {
-      Entity model = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-      store.Add(new Statement(finishedExecution.DataSetEntity, Ontology.PredicateHasModel, model));
-      StoreModelAttribute(model, Ontology.TargetVariable, finishedExecution.TargetVariable);
-      StoreModelAttribute(model, Ontology.AlgorithmName, finishedExecution.Description);
-      Scope bestModelScope = finishedEngine.GlobalScope.GetVariableValue<Scope>("BestValidationSolution", false);
-      StoreModelVariable(model, Ontology.TrainingMeanSquaredError, bestModelScope, "Quality");
-      StoreModelVariable(model, Ontology.ValidationMeanSquaredError, bestModelScope, "ValidationQuality");
-      StoreModelVariable(model, Ontology.TestMeanSquaredError, bestModelScope, "TestQuality");
-      StoreModelVariable(model, Ontology.TrainingMeanAbsolutePercentageError, bestModelScope, "TrainingMAPE");
-      StoreModelVariable(model, Ontology.ValidationMeanAbsolutePercentageError, bestModelScope, "ValidationMAPE");
-      StoreModelVariable(model, Ontology.TestMeanAbsolutePercentageError, bestModelScope, "TestMAPE");
-      StoreModelVariable(model, Ontology.TrainingMeanAbsolutePercentageOfRangeError, bestModelScope, "TrainingMAPRE");
-      StoreModelVariable(model, Ontology.ValidationMeanAbsolutePercentageOfRangeError, bestModelScope, "ValidationMAPRE");
-      StoreModelVariable(model, Ontology.TestMeanAbsolutePercentageOfRangeError, bestModelScope, "TestMAPRE");
-      StoreModelVariable(model, Ontology.TrainingCoefficientOfDetermination, bestModelScope, "TrainingR2");
-      StoreModelVariable(model, Ontology.ValidationCoefficientOfDetermination, bestModelScope, "ValidationR2");
-      StoreModelVariable(model, Ontology.TestCoefficientOfDetermination, bestModelScope, "TestR2");
-      StoreModelVariable(model, Ontology.TrainingCoefficientOfDetermination, bestModelScope, "TrainingVAF");
-      StoreModelVariable(model, Ontology.ValidationCoefficientOfDetermination, bestModelScope, "ValidationVAF");
-      StoreModelVariable(model, Ontology.TestCoefficientOfDetermination, bestModelScope, "TestVAF");
-      StoreModelVariable(model, Ontology.TrainingTheilsInequalityCoefficient, bestModelScope, "TrainingTheilInequalityCoefficient");
-      StoreModelVariable(model, Ontology.ValidationTheilsInequalityCoefficient, bestModelScope, "ValidationTheilInequalityCoefficient");
-      StoreModelVariable(model, Ontology.TestTheilsInequalityCoefficient, bestModelScope, "TestTheilInequalityCoefficient");
-      StoreModelVariable(model, Ontology.TrainingAccuracy, bestModelScope, "TrainingAccuracy");
-      StoreModelVariable(model, Ontology.ValidationAccuracy, bestModelScope, "ValidationAccuracy");
-      StoreModelVariable(model, Ontology.TestAccuracy, bestModelScope, "TestAccuracy");
-      StoreModelVariable(model, Ontology.TreeSize, bestModelScope, "TreeSize");
-      StoreModelVariable(model, Ontology.TreeHeight, bestModelScope, "TreeHeight");
-      StoreModelVariable(model, Ontology.EvaluatedSolutions, bestModelScope, "EvaluatedSolutions");
+    protected void StoreResults(IAlgorithm finishedAlgorithm) {
+      Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      // TODO (gkronber 27052009)
+      // store.Add(new Statement(finishedAlgorithm.DataSetEntity, Ontology.PredicateHasModel, modelEntity));
+      StoreModelAttribute(modelEntity, Ontology.TargetVariable, finishedAlgorithm.Model.TargetVariable);
+      StoreModelAttribute(modelEntity, Ontology.AlgorithmName, finishedAlgorithm.Description);
+      
+      IModel model = finishedAlgorithm.Model;
+      StoreModelAttribute(modelEntity, Ontology.TrainingMeanSquaredError, model.TrainingMeanSquaredError);
+      StoreModelAttribute(modelEntity, Ontology.ValidationMeanSquaredError, model.ValidationMeanSquaredError);
+      StoreModelAttribute(modelEntity, Ontology.TestMeanSquaredError, model.TestMeanSquaredError);
+      StoreModelAttribute(modelEntity, Ontology.TrainingCoefficientOfDetermination, model.TrainingCoefficientOfDetermination);
+      StoreModelAttribute(modelEntity, Ontology.ValidationCoefficientOfDetermination, model.ValidationCoefficientOfDetermination);
+      StoreModelAttribute(modelEntity, Ontology.TestCoefficientOfDetermination, model.TestCoefficientOfDetermination);
+      StoreModelAttribute(modelEntity, Ontology.TrainingVarianceAccountedFor, model.TrainingVarianceAccountedFor);
+      StoreModelAttribute(modelEntity, Ontology.ValidationVarianceAccountedFor, model.ValidationVarianceAccountedFor);
+      StoreModelAttribute(modelEntity, Ontology.TestVarianceAccountedFor, model.TestVarianceAccountedFor);
+      StoreModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, model.TrainingMeanAbsolutePercentageError);
+      StoreModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, model.ValidationMeanAbsolutePercentageError);
+      StoreModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageError, model.TestMeanAbsolutePercentageError);
+      StoreModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, model.TrainingMeanAbsolutePercentageOfRangeError);
+      StoreModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, model.ValidationMeanAbsolutePercentageOfRangeError);
+      StoreModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, model.TestMeanAbsolutePercentageOfRangeError);
 
-      byte[] serializedModel = PersistenceManager.SaveToGZip(bestModelScope.GetVariableValue("FunctionTree", false));
-      store.Add(new Statement(model, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));
-    }
-
-    private void StoreModelVariable(Entity model, Entity entity, Scope scope, string variableName) {
-      if (scope.GetVariable(variableName) != null)
-        StoreModelAttribute(model, entity, scope.GetVariableValue<ObjectData>(variableName, false).Data);
+      byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data);
+      store.Add(new Statement(modelEntity, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));
     }
 
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/Execution.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/Execution.cs	(revision 1921)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#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 System.Windows.Forms;
-using HeuristicLab.PluginInfrastructure;
-using System.Net;
-using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
-using System.ServiceModel.Description;
-using System.Linq;
-using HeuristicLab.CEDMA.Core;
-using HeuristicLab.GP.StructureIdentification;
-using HeuristicLab.Data;
-using HeuristicLab.Grid;
-using System.Diagnostics;
-using HeuristicLab.Core;
-using System.Threading;
-
-namespace HeuristicLab.CEDMA.Server {
-  public class Execution {
-    private Entity dataSetEntity;
-    public Entity DataSetEntity {
-      get { return dataSetEntity; }
-      set { dataSetEntity = value; }
-    }
-
-    private IEngine engine;
-    public IEngine Engine {
-      get { return engine; }
-      set { engine = value; }
-    }
-
-    private string targetVariable;
-    public string TargetVariable {
-      get { return targetVariable; }
-      set { targetVariable = value; }
-    }
-
-    private string description;
-    public string Description {
-      get { return description; }
-      set { description = value; }
-    }
-
-    public Execution(IEngine engine) {
-      this.engine = engine;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 1922)
@@ -38,9 +38,10 @@
 using HeuristicLab.Core;
 using System.Threading;
+using HeuristicLab.Modeling;
 
 namespace HeuristicLab.CEDMA.Server {
   public class GridExecuter : ExecuterBase {
     private JobManager jobManager;
-    private Dictionary<WaitHandle, Execution> activeExecutions;
+    private Dictionary<WaitHandle, IAlgorithm> activeAlgorithms;
 
     private TimeSpan StartJobInterval {
@@ -66,12 +67,12 @@
             Thread.Sleep(StartJobInterval);
             // get an execution from the dispatcher and execute in grid via job-manager
-            Execution execution = Dispatcher.GetNextJob();
-            if (execution != null) {
-              AtomicOperation op = new AtomicOperation(execution.Engine.OperatorGraph.InitialOperator, execution.Engine.GlobalScope);
-              WaitHandle opWh = jobManager.BeginExecuteOperation(execution.Engine.GlobalScope, op);
+            IAlgorithm algorithm = Dispatcher.GetNextJob();
+            if (algorithm != null) {
+              AtomicOperation op = new AtomicOperation(algorithm.Engine.OperatorGraph.InitialOperator, algorithm.Engine.GlobalScope);
+              WaitHandle opWh = jobManager.BeginExecuteOperation(algorithm.Engine.GlobalScope, op);
               wh.Add(opWh);
               activeOperations.Add(opWh, op);
-              lock (activeExecutions) {
-                activeExecutions.Add(opWh, execution);
+              lock (activeAlgorithms) {
+                activeAlgorithms.Add(opWh, algorithm);
               }
             }
@@ -84,8 +85,8 @@
             AtomicOperation finishedOp = activeOperations[readyHandle];
             wh.Remove(readyHandle);
-            Execution finishedExecution = null;
-            lock (activeExecutions) {
-              finishedExecution = activeExecutions[readyHandle];
-              activeExecutions.Remove(readyHandle);
+            IAlgorithm finishedAlgorithm = null;
+            lock (activeAlgorithms) {
+              finishedAlgorithm = activeAlgorithms[readyHandle];
+              activeAlgorithms.Remove(readyHandle);
             }
             activeOperations.Remove(readyHandle);
@@ -99,5 +100,5 @@
             }
             if (finishedEngine != null) {
-              StoreResults(finishedExecution, finishedEngine);
+              StoreResults(finishedAlgorithm);
             }
           }
@@ -110,9 +111,9 @@
 
     public override string[] GetJobs() {
-      lock (activeExecutions) {
-        string[] retVal = new string[activeExecutions.Count];
+      lock (activeAlgorithms) {
+        string[] retVal = new string[activeAlgorithms.Count];
         int i = 0;
-        foreach (Execution e in activeExecutions.Values) {
-          retVal[i++] = "Target-Variable: " + e.TargetVariable + " " + e.Description;
+        foreach (IAlgorithm a in activeAlgorithms.Values) {
+          retVal[i++] = "Target-Variable: " + a.TargetVariable + " " + a.Description;
         }
         return retVal;
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 1922)
@@ -99,5 +99,4 @@
     <Compile Include="GridExecuter.cs" />
     <Compile Include="IDispatcher.cs" />
-    <Compile Include="Execution.cs" />
     <Compile Include="Server.cs" />
     <Compile Include="ServerApplication.cs" />
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/HiveExecuter.cs	(revision 1922)
@@ -39,8 +39,9 @@
 using System.Threading;
 using HeuristicLab.Hive.Engine;
+using HeuristicLab.Modeling;
 
 namespace HeuristicLab.CEDMA.Server {
   public class HiveExecuter : ExecuterBase {
-    private Dictionary<WaitHandle, Execution> activeExecutions;
+    private Dictionary<WaitHandle, IAlgorithm> activeAlgorithms;
     private Dictionary<WaitHandle, HiveEngine> activeEngines;
     private string hiveUrl;
@@ -57,5 +58,5 @@
       : base(dispatcher, store) {
       this.hiveUrl = hiveUrl;
-      activeExecutions = new Dictionary<WaitHandle, Execution>();
+      activeAlgorithms = new Dictionary<WaitHandle, IAlgorithm>();
       activeEngines = new Dictionary<WaitHandle, HiveEngine>();
     }
@@ -68,13 +69,13 @@
           while (wh.Count < MaxActiveJobs) {
             Thread.Sleep(StartJobInterval);
-            // get an execution from the dispatcher and execute in grid via job-manager
-            Execution execution = Dispatcher.GetNextJob();
-            if (execution != null) {
+            // get an algo from the dispatcher and execute in grid via job-manager
+            IAlgorithm algorithm = Dispatcher.GetNextJob();
+            if (algorithm != null) {
               HiveEngine engine = new HiveEngine();
               engine.HiveServerUrl = hiveUrl;
-              IOperator initialOp = execution.Engine.OperatorGraph.InitialOperator;
+              IOperator initialOp = algorithm.Engine.OperatorGraph.InitialOperator;
               engine.OperatorGraph.AddOperator(initialOp);
               engine.OperatorGraph.InitialOperator = initialOp;
-              RegisterFinishedCallback(engine, execution, wh);
+              RegisterFinishedCallback(engine, algorithm, wh);
               engine.Reset();
               engine.Execute();
@@ -90,9 +91,9 @@
             activeEngines.Remove(readyHandle);
 
-            Execution finishedExecution = activeExecutions[readyHandle];
-            lock (activeExecutions) {
-              activeExecutions.Remove(readyHandle);
+            IAlgorithm finishedAlgorithm = activeAlgorithms[readyHandle];
+            lock (activeAlgorithms) {
+              activeAlgorithms.Remove(readyHandle);
             }
-            StoreResults(finishedExecution, finishedEngine);
+            StoreResults(finishedAlgorithm);
             readyHandle.Close();
           }
@@ -104,10 +105,10 @@
     }
 
-    private void RegisterFinishedCallback(HiveEngine engine, Execution execution, List<WaitHandle> wh) {
+    private void RegisterFinishedCallback(HiveEngine engine, IAlgorithm algorithm, List<WaitHandle> wh) {
       ManualResetEvent waithandle = new ManualResetEvent(false);
       wh.Add(waithandle);
       engine.Finished += (sender, args) => waithandle.Set();
-      lock (activeExecutions) {
-        activeExecutions.Add(waithandle, execution);
+      lock (activeAlgorithms) {
+        activeAlgorithms.Add(waithandle, algorithm);
       }
       activeEngines.Add(waithandle, engine);
@@ -115,9 +116,9 @@
 
     public override string[] GetJobs() {
-      lock (activeExecutions) {
-        string[] retVal = new string[activeExecutions.Count];
+      lock (activeAlgorithms) {
+        string[] retVal = new string[activeAlgorithms.Count];
         int i = 0;
-        foreach (Execution e in activeExecutions.Values) {
-          retVal[i++] = "Target-Variable: " + e.TargetVariable + " " + e.Description;
+        foreach (IAlgorithm a in activeAlgorithms.Values) {
+          retVal[i++] = "Target-Variable: " + a.TargetVariable + " " + a.Description;
         }
         return retVal;
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/IDispatcher.cs	(revision 1922)
@@ -35,8 +35,9 @@
 using HeuristicLab.Data;
 using HeuristicLab.Core;
+using HeuristicLab.Modeling;
 
 namespace HeuristicLab.CEDMA.Server {
   public interface IDispatcher {
-    Execution GetNextJob();
+    IAlgorithm GetNextJob();
   }
 }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/AlgorithmBase.cs	(revision 1922)
@@ -42,4 +42,7 @@
     public virtual string Description { get { return "TODO"; } }
 
+    public abstract Dataset Dataset { get; set; }
+    public abstract int TargetVariable { get; set; }
+
     public virtual double MutationRate {
       get { return GetVariableInjector().GetVariable("MutationRate").GetValue<DoubleData>().Data; }
@@ -457,4 +460,5 @@
     #endregion
 
+
   }
 }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/StandardGP.cs	(revision 1922)
@@ -40,4 +40,14 @@
 
     public override string Name { get { return "StandardGP"; } }
+
+    public override int TargetVariable {
+      get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
+      set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
+    }
+
+    public override Dataset Dataset {
+      get { return ProblemInjector.GetVariableValue<Dataset>("Dataset", null, false); }
+      set { ProblemInjector.GetVariable("Dataset").Value = value; }
+    }
 
     public virtual int MaxGenerations {
@@ -315,4 +325,17 @@
       Model model = base.CreateGPModel(bestModelScope);
       model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data;
+      model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TrainingR2", false).Data;
+      model.ValidationCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ValidationR2", false).Data;
+      model.TestCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TestR2", false).Data;
+      model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data;
+      model.ValidationMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data;
+      model.TestMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TestMAPE", false).Data;
+      model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPRE", false).Data;
+      model.ValidationMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPRE", false).Data;
+      model.TestMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TestMAPRE", false).Data;
+      model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TrainingVAF", false).Data;
+      model.ValidationVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ValidationVAF", false).Data;
+      model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data;
+
       return model;
     }
Index: trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.Modeling/3.2/IAlgorithm.cs	(revision 1922)
@@ -24,4 +24,5 @@
 using System.Text;
 using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
 
 namespace HeuristicLab.Modeling {
@@ -30,6 +31,7 @@
     string Description { get; }
     IOperator ProblemInjector { get; set; }
+    Dataset Dataset { get; set; }
+    int TargetVariable { 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 1921)
+++ trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 1922)
@@ -33,4 +33,17 @@
     double ValidationMeanSquaredError { get; }
     double TestMeanSquaredError { get; }
+    double TrainingMeanAbsolutePercentageError { get; }
+    double ValidationMeanAbsolutePercentageError { get; }
+    double TestMeanAbsolutePercentageError { get; }
+    double TrainingMeanAbsolutePercentageOfRangeError { get; }
+    double ValidationMeanAbsolutePercentageOfRangeError { get; }
+    double TestMeanAbsolutePercentageOfRangeError { get; }
+    double TrainingCoefficientOfDetermination { get; }
+    double ValidationCoefficientOfDetermination { get; }
+    double TestCoefficientOfDetermination { get; }
+    double TrainingVarianceAccountedFor { get; }
+    double ValidationVarianceAccountedFor { get; }
+    double TestVarianceAccountedFor { get; }
+
     IItem Data { get; }
   }
Index: trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 1922)
@@ -60,4 +60,64 @@
     }
 
+    public double TrainingMeanAbsolutePercentageError {
+      get;
+      set;
+    }
+
+    public double ValidationMeanAbsolutePercentageError {
+      get;
+      set;
+    }
+
+    public double TestMeanAbsolutePercentageError {
+      get;
+      set;
+    }
+
+    public double TrainingMeanAbsolutePercentageOfRangeError {
+      get;
+      set;
+    }
+
+    public double ValidationMeanAbsolutePercentageOfRangeError {
+      get;
+      set;
+    }
+
+    public double TestMeanAbsolutePercentageOfRangeError {
+      get;
+      set;
+    }
+
+    public double TrainingCoefficientOfDetermination {
+      get;
+      set;
+    }
+
+    public double ValidationCoefficientOfDetermination {
+      get;
+      set;
+    }
+
+    public double TestCoefficientOfDetermination {
+      get;
+      set;
+    }
+
+    public double TrainingVarianceAccountedFor {
+      get;
+      set;
+    }
+
+    public double ValidationVarianceAccountedFor {
+      get;
+      set;
+    }
+
+    public double TestVarianceAccountedFor {
+      get;
+      set;
+    }
+
     private IItem data;
     public IItem Data {
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 1921)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 1922)
@@ -44,4 +44,14 @@
     public IEngine Engine {
       get { return engine; }
+    }
+
+    public Dataset Dataset {
+      get { return ProblemInjector.GetVariableValue<Dataset>("Dataset", null, false); }
+      set { ProblemInjector.GetVariable("Dataset").Value = value; }
+    }
+
+    public int TargetVariable {
+      get { return ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data; }
+      set { ProblemInjector.GetVariableValue<IntData>("TargetVariable", null, false).Data = value; }
     }
 
@@ -284,5 +294,24 @@
     protected internal virtual Model CreateSVMModel(IScope bestModelScope) {
       Model model = new Model();
+      model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data;
+      model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data;
+      model.TestMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TestQuality", false).Data;
+      model.TrainingCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TrainingR2", false).Data;
+      model.ValidationCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("ValidationR2", false).Data;
+      model.TestCoefficientOfDetermination = bestModelScope.GetVariableValue<DoubleData>("TestR2", false).Data;
+      model.TrainingMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data;
+      model.ValidationMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data;
+      model.TestMeanAbsolutePercentageError = bestModelScope.GetVariableValue<DoubleData>("TestMAPE", false).Data;
+      model.TrainingMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TrainingMAPRE", false).Data;
+      model.ValidationMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("ValidationMAPRE", false).Data;
+      model.TestMeanAbsolutePercentageOfRangeError = bestModelScope.GetVariableValue<DoubleData>("TestMAPRE", false).Data;
+      model.TrainingVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TrainingVAF", false).Data;
+      model.ValidationVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("ValidationVAF", false).Data;
+      model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data;
+      
       model.Data = bestModelScope.GetVariableValue<SVMModel>("BestValidationModel", false);
+      HeuristicLab.DataAnalysis.Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true);
+      model.Dataset = ds;
+      model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
       return model;
     }
@@ -308,4 +337,5 @@
 
     #endregion
+
   }
 }
