Index: branches/SpectralKernelForGaussianProcesses/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolutionImpactValuesCalculator.cs
===================================================================
--- branches/SpectralKernelForGaussianProcesses/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolutionImpactValuesCalculator.cs	(revision 10204)
+++ branches/SpectralKernelForGaussianProcesses/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolutionImpactValuesCalculator.cs	(revision 10479)
@@ -20,10 +20,24 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using HeuristicLab.Common;
+using HeuristicLab.Core;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
+  [StorableClass]
+  [Item("SymbolicClassificationSolutionImpactValuesCalculator", "Calculate symbolic expression tree node impact values for classification problems.")]
   public class SymbolicClassificationSolutionImpactValuesCalculator : SymbolicDataAnalysisSolutionImpactValuesCalculator {
+    public SymbolicClassificationSolutionImpactValuesCalculator() { }
+    protected SymbolicClassificationSolutionImpactValuesCalculator(SymbolicClassificationSolutionImpactValuesCalculator original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicClassificationSolutionImpactValuesCalculator(this, cloner);
+    }
+    [StorableConstructor]
+    protected SymbolicClassificationSolutionImpactValuesCalculator(bool deserializing) : base(deserializing) { }
+
     public override double CalculateReplacementValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows) {
       var classificationModel = (ISymbolicClassificationModel)model;
@@ -34,4 +48,12 @@
 
     public override double CalculateImpactValue(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node, IDataAnalysisProblemData problemData, IEnumerable<int> rows, double originalQuality = double.NaN) {
+      double impactValue, replacementValue;
+      CalculateImpactAndReplacementValues(model, node, problemData, rows, out impactValue, out replacementValue, originalQuality);
+      return impactValue;
+    }
+
+    public override void CalculateImpactAndReplacementValues(ISymbolicDataAnalysisModel model, ISymbolicExpressionTreeNode node,
+      IDataAnalysisProblemData problemData, IEnumerable<int> rows, out double impactValue, out double replacementValue,
+      double originalQuality = Double.NaN) {
       var classificationModel = (ISymbolicClassificationModel)model;
       var classificationProblemData = (IClassificationProblemData)problemData;
@@ -47,10 +69,15 @@
       }
 
-      var replacementValue = CalculateReplacementValue(classificationModel, node, classificationProblemData, rows);
+      replacementValue = CalculateReplacementValue(classificationModel, node, classificationProblemData, rows);
       var constantNode = new ConstantTreeNode(new Constant()) { Value = replacementValue };
+
       var cloner = new Cloner();
-      cloner.RegisterClonedObject(node, constantNode);
       var tempModel = cloner.Clone(classificationModel);
-      tempModel.RecalculateModelParameters(classificationProblemData, rows);
+      var tempModelNode = (ISymbolicExpressionTreeNode)cloner.GetClone(node);
+
+      var tempModelParentNode = tempModelNode.Parent;
+      int i = tempModelParentNode.IndexOfSubtree(tempModelNode);
+      tempModelParentNode.RemoveSubtree(i);
+      tempModelParentNode.InsertSubtree(i, constantNode);
 
       var estimatedClassValues = tempModel.GetEstimatedClassValues(dataset, rows);
@@ -58,7 +85,6 @@
       if (errorState != OnlineCalculatorError.None) newQuality = 0.0;
 
-      return originalQuality - newQuality;
+      impactValue = originalQuality - newQuality;
     }
-
   }
 }
