Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 12872)
@@ -82,6 +82,6 @@
       get { return (FixedValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; }
     }
-    public IConstrainedValueParameter<ILossFunction> LossFunctionParameter {
-      get { return (IConstrainedValueParameter<ILossFunction>)Parameters[LossFunctionParameterName]; }
+    public IConstrainedValueParameter<StringValue> LossFunctionParameter {
+      get { return (IConstrainedValueParameter<StringValue>)Parameters[LossFunctionParameterName]; }
     }
     public IFixedValueParameter<IntValue> UpdateIntervalParameter {
@@ -164,32 +164,9 @@
       Parameters[CreateSolutionParameterName].Hidden = true;
 
-      var lossFunctions = ApplicationManager.Manager.GetInstances<ILossFunction>();
-      Parameters.Add(new ConstrainedValueParameter<ILossFunction>(LossFunctionParameterName, "The loss function", new ItemSet<ILossFunction>(lossFunctions)));
-      LossFunctionParameter.Value = LossFunctionParameter.ValidValues.First(f => f.ToString().Contains("Squared")); // squared error loss is the default
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      // BackwardsCompatibility3.4
-      #region Backwards compatible code, remove with 3.5
-      // parameter type has been changed
-      var lossFunctionParam = Parameters[LossFunctionParameterName] as ConstrainedValueParameter<StringValue>;
-      if (lossFunctionParam != null) {
-        Parameters.Remove(LossFunctionParameterName);
-        var selectedValue = lossFunctionParam.Value; // to be restored below
-
-        var lossFunctions = ApplicationManager.Manager.GetInstances<ILossFunction>();
-        Parameters.Add(new ConstrainedValueParameter<ILossFunction>(LossFunctionParameterName, "The loss function", new ItemSet<ILossFunction>(lossFunctions)));
-        // try to restore selected value
-        var selectedLossFunction =
-          LossFunctionParameter.ValidValues.FirstOrDefault(f => f.ToString() == selectedValue.Value);
-        if (selectedLossFunction != null) {
-          LossFunctionParameter.Value = selectedLossFunction;
-        } else {
-          LossFunctionParameter.Value = LossFunctionParameter.ValidValues.First(f => f.ToString().Contains("Squared")); // default: SE
-        }
-      }
-      #endregion
-    }
+      var lossFunctionNames = ApplicationManager.Manager.GetInstances<ILossFunction>().Select(l => new StringValue(l.ToString()).AsReadOnly());
+      Parameters.Add(new ConstrainedValueParameter<StringValue>(LossFunctionParameterName, "The loss function", new ItemSet<StringValue>(lossFunctionNames)));
+      LossFunctionParameter.ActualValue = LossFunctionParameter.ValidValues.First(l => l.Value.Contains("Squared")); // squared error loss is the default
+    }
+
 
     protected override void Run(CancellationToken cancellationToken) {
@@ -210,5 +187,6 @@
       // init
       var problemData = (IRegressionProblemData)Problem.ProblemData.Clone();
-      var lossFunction = LossFunctionParameter.Value;
+      var lossFunction = ApplicationManager.Manager.GetInstances<ILossFunction>()
+        .Single(l => l.ToString() == LossFunctionParameter.Value.Value);
       var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, lossFunction, (uint)Seed, MaxSize, R, M, Nu);
 
@@ -255,5 +233,5 @@
       // produce solution 
       if (CreateSolution) {
-        var surrogateModel = new GradientBoostedTreesModelSurrogate(problemData, (uint)Seed, lossFunction,
+        var surrogateModel = new GradientBoostedTreesModelSurrogate(problemData, (uint)Seed, lossFunction.ToString(),
           Iterations, MaxSize, R, M, Nu, state.GetModel());
 
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModelSurrogate.cs	(revision 12872)
@@ -45,5 +45,5 @@
     private readonly uint seed;
     [Storable]
-    private ILossFunction lossFunction;
+    private string lossFunctionName;
     [Storable]
     private double r;
@@ -66,6 +66,6 @@
 
       this.trainingProblemData = cloner.Clone(original.trainingProblemData);
-      this.lossFunction = cloner.Clone(original.lossFunction);
       this.seed = original.seed;
+      this.lossFunctionName = original.lossFunctionName;
       this.iterations = original.iterations;
       this.maxSize = original.maxSize;
@@ -76,9 +76,9 @@
 
     // create only the surrogate model without an actual model
-    public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu)
+    public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, string lossFunctionName, int iterations, int maxSize, double r, double m, double nu)
       : base("Gradient boosted tree model", string.Empty) {
       this.trainingProblemData = trainingProblemData;
       this.seed = seed;
-      this.lossFunction = lossFunction;
+      this.lossFunctionName = lossFunctionName;
       this.iterations = iterations;
       this.maxSize = maxSize;
@@ -89,6 +89,6 @@
 
     // wrap an actual model in a surrograte
-    public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, ILossFunction lossFunction, int iterations, int maxSize, double r, double m, double nu, IRegressionModel model)
-      : this(trainingProblemData, seed, lossFunction, iterations, maxSize, r, m, nu) {
+    public GradientBoostedTreesModelSurrogate(IRegressionProblemData trainingProblemData, uint seed, string lossFunctionName, int iterations, int maxSize, double r, double m, double nu, IRegressionModel model)
+      : this(trainingProblemData, seed, lossFunctionName, iterations, maxSize, r, m, nu) {
       this.actualModel = model;
     }
@@ -110,4 +110,5 @@
 
     private IRegressionModel RecalculateModel() {
+      var lossFunction = ApplicationManager.Manager.GetInstances<ILossFunction>().Single(l => l.ToString() == lossFunctionName);
       return GradientBoostedTreesAlgorithmStatic.TrainGbm(trainingProblemData, lossFunction, maxSize, nu, r, m, iterations, seed).Model;
     }
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/AbsoluteErrorLoss.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/AbsoluteErrorLoss.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/AbsoluteErrorLoss.cs	(revision 12872)
@@ -23,15 +23,11 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   // loss function for the weighted absolute error
-  [StorableClass]
-  [Item("Absolute error loss", "")]
-  public class AbsoluteErrorLoss : Item, ILossFunction {
-    public AbsoluteErrorLoss() { }
-
+  public class AbsoluteErrorLoss : ILossFunction {
     public double GetLoss(IEnumerable<double> target, IEnumerable<double> pred) {
       var targetEnum = target.GetEnumerator();
@@ -81,11 +77,7 @@
     }
 
-    #region item implementation
-    private AbsoluteErrorLoss(AbsoluteErrorLoss original, Cloner cloner) : base(original, cloner) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new AbsoluteErrorLoss(this, cloner);
+    public override string ToString() {
+      return "Absolute error loss";
     }
-    #endregion
   }
 }
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/ILossFunction.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/ILossFunction.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/ILossFunction.cs	(revision 12872)
@@ -22,5 +22,4 @@
 
 using System.Collections.Generic;
-using HeuristicLab.Core;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
@@ -28,5 +27,5 @@
   // target represents the target vector  (original targets from the problem data, never changed)
   // pred   represents the current vector of predictions (a weighted combination of models learned so far, this vector is updated after each step)
-  public interface ILossFunction : IItem {
+  public interface ILossFunction {
     // returns the loss of the current prediction vector 
     double GetLoss(IEnumerable<double> target, IEnumerable<double> pred);
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/LogisticRegressionLoss.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/LogisticRegressionLoss.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/LogisticRegressionLoss.cs	(revision 12872)
@@ -26,14 +26,8 @@
 using System.Linq;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   // Greedy Function Approximation: A Gradient Boosting Machine (page 9) 
-  [StorableClass]
-  [Item("Logistic regression loss", "")]
-  public class LogisticRegressionLoss : Item, ILossFunction {
-    public LogisticRegressionLoss() { }
-
+  public class LogisticRegressionLoss : ILossFunction {
     public double GetLoss(IEnumerable<double> target, IEnumerable<double> pred) {
       var targetEnum = target.GetEnumerator();
@@ -89,12 +83,7 @@
     }
 
-    #region item implementation
-    private LogisticRegressionLoss(LogisticRegressionLoss original, Cloner cloner) : base(original, cloner) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new LogisticRegressionLoss(this, cloner);
+    public override string ToString() {
+      return "Logistic regression loss";
     }
-    #endregion
-
   }
 }
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs	(revision 12872)
@@ -26,14 +26,8 @@
 using System.Linq;
 using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
   // relative error loss is a special case of weighted absolute error loss with weights = (1/target)
-  [StorableClass]
-  [Item("Relative error loss", "")]
-  public class RelativeErrorLoss : Item, ILossFunction {
-    public RelativeErrorLoss() { }
-
+  public class RelativeErrorLoss : ILossFunction {
     public double GetLoss(IEnumerable<double> target, IEnumerable<double> pred) {
       var targetEnum = target.GetEnumerator();
@@ -111,11 +105,7 @@
     }
 
-    #region item implementation
-    private RelativeErrorLoss(RelativeErrorLoss original, Cloner cloner) : base(original, cloner) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new RelativeErrorLoss(this, cloner);
+    public override string ToString() {
+      return "Relative error loss";
     }
-    #endregion
   }
 }
Index: branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/SquaredErrorLoss.cs
===================================================================
--- branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/SquaredErrorLoss.cs	(revision 12871)
+++ branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/SquaredErrorLoss.cs	(revision 12872)
@@ -24,14 +24,7 @@
 using System.Collections.Generic;
 using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Algorithms.DataAnalysis {
-  [StorableClass]
-  [Item("Squared error loss", "")]
-  public class SquaredErrorLoss : Item, ILossFunction {
-    public SquaredErrorLoss() { }
-
+  public class SquaredErrorLoss : ILossFunction {
     public double GetLoss(IEnumerable<double> target, IEnumerable<double> pred) {
       var targetEnum = target.GetEnumerator();
@@ -77,11 +70,7 @@
     }
 
-    #region item implementation
-    private SquaredErrorLoss(SquaredErrorLoss original, Cloner cloner) : base(original, cloner) { }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SquaredErrorLoss(this, cloner);
+    public override string ToString() {
+      return "Squared error loss";
     }
-    #endregion
   }
 }
