Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/HeuristicLab.Algorithms.DataAnalysis.Views-3.4.csproj	(revision 5717)
@@ -128,5 +128,7 @@
       <DependentUpon>SupportVectorMachineModelView.cs</DependentUpon>
     </Compile>
-    <Compile Include="SupportVectorRegressionSolutionView.cs" />
+    <Compile Include="SupportVectorRegressionSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="SupportVectorRegressionSolutionView.Designer.cs">
       <DependentUpon>SupportVectorRegressionSolutionView.cs</DependentUpon>
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineModel.cs	(revision 5717)
@@ -29,5 +29,5 @@
   /// Interface to represent a support vector machine model
   /// </summary>
-  public interface ISupportVectorMachineModel : IDataAnalysisModel {
+  public interface ISupportVectorMachineModel : IDataAnalysisModel, IRegressionModel, IClassificationModel {
     SVM.Model Model { get; }
     SVM.RangeTransform RangeTransform { get; }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/Interfaces/ISupportVectorMachineSolution.cs	(revision 5717)
@@ -29,5 +29,5 @@
   /// </summary>
   public interface ISupportVectorMachineSolution : IDataAnalysisSolution {
-    ISupportVectorMachineModel Model { get; }
+    new ISupportVectorMachineModel Model { get; }
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassificationSolution.cs	(revision 5717)
@@ -39,4 +39,5 @@
     public new ISupportVectorMachineModel Model {
       get { return (ISupportVectorMachineModel)base.Model; }
+      set { base.Model = value; }
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs	(revision 5717)
@@ -38,5 +38,5 @@
   [StorableClass]
   [Item("SupportVectorMachineModel", "Represents a support vector machine model.")]
-  public sealed class SupportVectorMachineModel : NamedItem, ISupportVectorMachineModel, IRegressionModel, IClassificationModel {
+  public sealed class SupportVectorMachineModel : NamedItem, ISupportVectorMachineModel {
 
     private SVM.Model model;
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegressionSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegressionSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegressionSolution.cs	(revision 5717)
@@ -39,4 +39,5 @@
     public new ISupportVectorMachineModel Model {
       get { return (ISupportVectorMachineModel)base.Model; }
+      set { base.Model = value; }
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringSolution.cs	(revision 5717)
@@ -42,4 +42,5 @@
     public new KMeansClusteringModel Model {
       get { return (KMeansClusteringModel)base.Model; }
+      set { base.Model = value; }
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views-3.4.csproj	(revision 5717)
@@ -110,8 +110,20 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="SymbolicDiscriminantFunctionClassificationSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs">
+      <DependentUpon>SymbolicDiscriminantFunctionClassificationSolutionView.cs</DependentUpon>
+    </Compile>
     <None Include="HeuristicLab.snk" />
     <None Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationViewsPlugin.cs.frame" />
     <None Include="Properties\AssemblyInfo.frame" />
     <Compile Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationViewsPlugin.cs" />
+    <Compile Include="InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.Designer.cs">
+      <DependentUpon>InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
   </ItemGroup>
@@ -141,4 +153,8 @@
       <Name>HeuristicLab.Data-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.1.0\ALGLIB-3.1.0\ALGLIB-3.1.0.csproj">
       <Project>{FC841674-62A7-4055-BE91-E41944B6C606}</Project>
@@ -176,4 +192,20 @@
       <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
       <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj">
+      <Project>{05BAE4E1-A9FA-4644-AA77-42558720159E}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic.Views\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj">
+      <Project>{7A2531CE-3F7C-4F13-BCCA-ED6DC27A7086}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj">
+      <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Views\3.4\HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj">
+      <Project>{3E9E8944-44FF-40BB-A622-3A4A7DD0F198}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.Views-3.4</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.Designer.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.Designer.cs	(revision 5717)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.Designer.cs	(revision 5717)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  partial class InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.SuspendLayout();
+      // 
+      // InteractiveSymbolicRegressionSolutionSimplifierView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "InteractiveSymbolicRegressionSolutionSimplifierView";
+      this.Size = new System.Drawing.Size(564, 348);
+      this.ResumeLayout(false);
+    }
+
+    #endregion
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 5717)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView.cs	(revision 5717)
@@ -0,0 +1,135 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  public partial class InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView : InteractiveSymbolicDataAnalysisSolutionSimplifierView {
+    private readonly ConstantTreeNode constantNode;
+    private readonly SymbolicExpressionTree tempTree;
+
+    public new SymbolicDiscriminantFunctionClassificationSolution Content {
+      get { return (SymbolicDiscriminantFunctionClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView()
+      : base() {
+      InitializeComponent();
+      this.Caption = "Interactive Classification Solution Simplifier";
+
+      constantNode = ((ConstantTreeNode)new Constant().CreateTreeNode());
+      ISymbolicExpressionTreeNode root = new ProgramRootSymbol().CreateTreeNode();
+      ISymbolicExpressionTreeNode start = new StartSymbol().CreateTreeNode();
+      root.AddSubTree(start);
+      tempTree = new SymbolicExpressionTree(root);
+    }
+
+    protected override void UpdateModel(ISymbolicExpressionTree tree) {
+      var dataset = Content.ProblemData.Dataset;
+      var interpreter = Content.Model.Interpreter;
+      var rows = Content.ProblemData.TrainingIndizes;
+      string targetVariable = Content.ProblemData.TargetVariable;
+
+      var targetClassValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
+        .ToArray();
+      double[] classValues;
+      double[] thresholds;
+      NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, originalOutput, targetClassValues, out classValues, out thresholds);
+      Content.Model = new SymbolicDiscriminantFunctionClassificationModel(tree, Content.Model.Interpreter, classValues, thresholds);
+    }
+
+    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree) {
+      Dictionary<ISymbolicExpressionTreeNode, double> replacementValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
+      foreach (ISymbolicExpressionTreeNode node in tree.IterateNodesPrefix()) {
+        if (!(node.Symbol is ProgramRootSymbol || node.Symbol is StartSymbol)) {
+          replacementValues[node] = CalculateReplacementValue(node);
+        }
+      }
+      return replacementValues;
+    }
+
+    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree) {
+      var interpreter = Content.Model.Interpreter;
+      var dataset = Content.ProblemData.Dataset;
+      var rows = Content.ProblemData.TrainingIndizes;
+      string targetVariable = Content.ProblemData.TargetVariable;
+      Dictionary<ISymbolicExpressionTreeNode, double> impactValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
+      List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubTree(0).GetSubTree(0).IterateNodesPostfix().ToList();
+
+      var targetClassValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+      var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
+        .ToArray();
+      double[] classValues;
+      double[] thresholds;
+      NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, originalOutput, targetClassValues, out classValues, out thresholds);
+      var classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter, classValues, thresholds);
+      double originalAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows));
+
+      foreach (ISymbolicExpressionTreeNode node in nodes) {
+        var parent = node.Parent;
+        constantNode.Value = CalculateReplacementValue(node);
+        ISymbolicExpressionTreeNode replacementNode = constantNode;
+        SwitchNode(parent, node, replacementNode);
+        var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows);
+        NormalDistributionCutPointsThresholdCalculator.CalculateThresholds(Content.ProblemData, newOutput, targetClassValues, out classValues, out thresholds);
+        classifier = new SymbolicDiscriminantFunctionClassificationModel(tree, interpreter, classValues, thresholds);
+        double newAccuracy = OnlineAccuracyEvaluator.Calculate(targetClassValues, classifier.GetEstimatedClassValues(dataset, rows));
+
+        // impact = 0 if no change
+        // impact < 0 if new solution is better
+        // impact > 0 if new solution is worse
+        impactValues[node] = originalAccuracy - newAccuracy;
+        SwitchNode(parent, replacementNode, node);
+      }
+      return impactValues;
+    }
+
+    private double CalculateReplacementValue(ISymbolicExpressionTreeNode node) {
+      var start = tempTree.Root.GetSubTree(0);
+      while (start.SubTrees.Count() > 0) start.RemoveSubTree(0);
+      start.AddSubTree((ISymbolicExpressionTreeNode)node.Clone());
+      var interpreter = Content.Model.Interpreter;
+      var rows = Content.ProblemData.TrainingIndizes;
+      return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median();
+    }
+
+
+    private void SwitchNode(ISymbolicExpressionTreeNode root, ISymbolicExpressionTreeNode oldBranch, ISymbolicExpressionTreeNode newBranch) {
+      for (int i = 0; i < root.SubTrees.Count(); i++) {
+        if (root.GetSubTree(i) == oldBranch) {
+          root.RemoveSubTree(i);
+          root.InsertSubTree(i, newBranch);
+          return;
+        }
+      }
+    }
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 5717)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs	(revision 5717)
@@ -0,0 +1,104 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  partial class SymbolicDiscriminantFunctionClassificationSolutionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.btn_SimplifyModel = new System.Windows.Forms.Button();
+      this.tabControl.SuspendLayout();
+      this.dataTabPage.SuspendLayout();
+      this.modelTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // tabControl
+      // 
+      this.tabControl.Size = new System.Drawing.Size(380, 233);
+      // 
+      // dataTabPage
+      // 
+      this.dataTabPage.Size = new System.Drawing.Size(372, 207);
+      // 
+      // modelTabPage
+      // 
+      this.modelTabPage.Size = new System.Drawing.Size(372, 207);
+      // 
+      // dataViewHost
+      // 
+      this.dataViewHost.Size = new System.Drawing.Size(360, 195);
+      // 
+      // modelViewHost
+      // 
+      this.modelViewHost.Size = new System.Drawing.Size(360, 195);
+      // 
+      // btn_SimplifyModel
+      // 
+      this.btn_SimplifyModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.btn_SimplifyModel.Location = new System.Drawing.Point(3, 238);
+      this.btn_SimplifyModel.Name = "btn_SimplifyModel";
+      this.btn_SimplifyModel.Size = new System.Drawing.Size(376, 23);
+      this.btn_SimplifyModel.TabIndex = 2;
+      this.btn_SimplifyModel.Text = "Simplify Model";
+      this.btn_SimplifyModel.UseVisualStyleBackColor = true;
+      this.btn_SimplifyModel.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      // 
+      // SymbolicRegressionSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.btn_SimplifyModel);
+      this.Name = "SymbolicRegressionSolutionView";
+      this.Controls.SetChildIndex(this.btn_SimplifyModel, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      this.tabControl.ResumeLayout(false);
+      this.dataTabPage.ResumeLayout(false);
+      this.modelTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button btn_SimplifyModel;
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 5717)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.cs	(revision 5717)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views {
+  [Content(typeof(SymbolicDiscriminantFunctionClassificationSolution))]
+  [View("Symbolic Discriminant Function Classification Solution View")]
+  public partial class SymbolicDiscriminantFunctionClassificationSolutionView : DataAnalysisSolutionView {
+    public SymbolicDiscriminantFunctionClassificationSolutionView() {
+      InitializeComponent();
+    }
+
+    protected new SymbolicDiscriminantFunctionClassificationSolution Content {
+      get { return (SymbolicDiscriminantFunctionClassificationSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    private void btn_SimplifyModel_Click(object sender, EventArgs e) {
+      var view = new InteractiveSymbolicDiscriminantFunctionClassificationSolutionSimplifierView();
+      view.Content = (SymbolicDiscriminantFunctionClassificationSolution)this.Content.Clone();
+      view.Show();
+    }
+  }
+}
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.csproj	(revision 5717)
@@ -112,5 +112,4 @@
     <Compile Include="SingleObjective\SymbolicClassificationSingleObjectiveValidationBestSolutionAnalyzer.cs" />
     <Compile Include="SymbolicDiscriminantFunctionClassificationModel.cs" />
-    <Compile Include="SymbolicDiscriminantFunctionClassificationSolution.cs" />
     <Compile Include="Interfaces\ISymbolicClassificationModel.cs" />
     <Compile Include="Interfaces\ISymbolicClassificationSolution.cs" />
@@ -130,4 +129,7 @@
     </Compile>
     <Compile Include="SymbolicClassificationSolution.cs" />
+    <Compile Include="SymbolicDiscriminantFunctionClassificationSolution.cs">
+      <SubType>Code</SubType>
+    </Compile>
     <None Include="HeuristicLab.snk" />
     <None Include="HeuristicLabProblemsDataAnalysisSymbolicClassificationPlugin.cs.frame" />
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicDiscriminantFunctionClassificationModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicDiscriminantFunctionClassificationModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicDiscriminantFunctionClassificationModel.cs	(revision 5717)
@@ -22,5 +22,5 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification {
-  public interface ISymbolicDiscriminantFunctionClassificationModel : IDiscriminantFunctionClassificationModel, ISymbolicDataAnalysisModel {
+  public interface ISymbolicDiscriminantFunctionClassificationModel : IDiscriminantFunctionClassificationModel, ISymbolicClassificationModel {
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationSolution.cs	(revision 5717)
@@ -38,9 +38,10 @@
   [StorableClass]
   [Item(Name = "SymbolicClassificationSolution", Description = "Represents a symbolic classification solution (model + data) and attributes of the solution like accuracy and complexity.")]
-  public class SymbolicClassificationSolution : ClassificationSolution, ISymbolicClassificationSolution {
+  public sealed class SymbolicClassificationSolution : ClassificationSolution, ISymbolicClassificationSolution {
     #region ISymbolicClassificationSolution Members
 
     public new ISymbolicClassificationModel Model {
       get { return (ISymbolicClassificationModel)base.Model; }
+      set { base.Model = value; }
     }
 
@@ -51,6 +52,6 @@
     #endregion
     [StorableConstructor]
-    protected SymbolicClassificationSolution(bool deserializing) : base(deserializing) { }
-    protected SymbolicClassificationSolution(SymbolicClassificationSolution original, Cloner cloner)
+    private SymbolicClassificationSolution(bool deserializing) : base(deserializing) { }
+    private SymbolicClassificationSolution(SymbolicClassificationSolution original, Cloner cloner)
       : base(original, cloner) {
     }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicDiscriminantFunctionClassificationSolution.cs	(revision 5717)
@@ -38,26 +38,25 @@
   [StorableClass]
   [Item(Name = "SymbolicDiscriminantFunctionClassificationSolution", Description = "Represents a symbolic classification solution (model + data) and attributes of the solution like accuracy and complexity.")]
-  public class SymbolicDiscriminantFunctionClassificationSolution : DiscriminantFunctionClassificationSolution, ISymbolicClassificationSolution {
-    #region ISymbolicClassificationSolution Members
+  public sealed class SymbolicDiscriminantFunctionClassificationSolution : DiscriminantFunctionClassificationSolution, ISymbolicClassificationSolution {
 
-    public new IDiscriminantFunctionClassificationModel Model {
-      get { return (IDiscriminantFunctionClassificationModel)base.Model; }
+    public new ISymbolicDiscriminantFunctionClassificationModel Model {
+      get { return (ISymbolicDiscriminantFunctionClassificationModel)base.Model; }
+      set { base.Model = value; }
     }
 
     ISymbolicClassificationModel ISymbolicClassificationSolution.Model {
-      get { return (ISymbolicClassificationModel)Model; }
+      get { return Model; }
     }
 
     ISymbolicDataAnalysisModel ISymbolicDataAnalysisSolution.Model {
-      get { return (ISymbolicDataAnalysisModel)Model; }
+      get { return Model; }
     }
 
-    #endregion
     [StorableConstructor]
-    protected SymbolicDiscriminantFunctionClassificationSolution(bool deserializing) : base(deserializing) { }
-    protected SymbolicDiscriminantFunctionClassificationSolution(SymbolicDiscriminantFunctionClassificationSolution original, Cloner cloner)
+    private SymbolicDiscriminantFunctionClassificationSolution(bool deserializing) : base(deserializing) { }
+    private SymbolicDiscriminantFunctionClassificationSolution(SymbolicDiscriminantFunctionClassificationSolution original, Cloner cloner)
       : base(original, cloner) {
     }
-    public SymbolicDiscriminantFunctionClassificationSolution(IDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData)
+    public SymbolicDiscriminantFunctionClassificationSolution(ISymbolicDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData)
       : base(model, problemData) {
     }
@@ -65,5 +64,5 @@
     public override IDeepCloneable Clone(Cloner cloner) {
       return new SymbolicDiscriminantFunctionClassificationSolution(this, cloner);
-    }  
+    }
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs	(revision 5717)
@@ -34,4 +34,10 @@
     private readonly ConstantTreeNode constantNode;
     private readonly SymbolicExpressionTree tempTree;
+
+    public new SymbolicRegressionSolution Content {
+      get { return (SymbolicRegressionSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
     public InteractiveSymbolicRegressionSolutionSimplifierView()
       : base() {
@@ -46,14 +52,13 @@
     }
 
-    public new ISymbolicRegressionSolution Content {
-      get { return (ISymbolicRegressionSolution)base.Content; }
-      set { base.Content = value; }
+    protected override void UpdateModel(ISymbolicExpressionTree tree) {
+      Content.Model = new SymbolicRegressionModel(tree, Content.Model.Interpreter);
     }
 
-    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree) {
       Dictionary<ISymbolicExpressionTreeNode, double> replacementValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
       foreach (ISymbolicExpressionTreeNode node in tree.IterateNodesPrefix()) {
         if (!(node.Symbol is ProgramRootSymbol || node.Symbol is StartSymbol)) {
-          replacementValues[node] = CalculateReplacementValue(node, interpreter, dataset, rows);
+          replacementValues[node] = CalculateReplacementValue(node);
         }
       }
@@ -61,18 +66,29 @@
     }
 
-    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) {
+    protected override Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree) {
+      var interpreter = Content.Model.Interpreter;
+      var dataset = Content.ProblemData.Dataset;
+      var rows = Content.ProblemData.TrainingIndizes;
+      string targetVariable = Content.ProblemData.TargetVariable;
       Dictionary<ISymbolicExpressionTreeNode, double> impactValues = new Dictionary<ISymbolicExpressionTreeNode, double>();
       List<ISymbolicExpressionTreeNode> nodes = tree.Root.GetSubTree(0).GetSubTree(0).IterateNodesPostfix().ToList();
       var originalOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows)
         .ToArray();
+      var targetValues = dataset.GetEnumeratedVariableValues(targetVariable, rows);
+
+      double originalR2 = OnlinePearsonsRSquaredEvaluator.Calculate(targetValues, originalOutput);
 
       foreach (ISymbolicExpressionTreeNode node in nodes) {
         var parent = node.Parent;
-        constantNode.Value = CalculateReplacementValue(node, interpreter, dataset, rows);
+        constantNode.Value = CalculateReplacementValue(node);
         ISymbolicExpressionTreeNode replacementNode = constantNode;
         SwitchNode(parent, node, replacementNode);
-        var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows).ToArray();
+        var newOutput = interpreter.GetSymbolicExpressionTreeValues(tree, dataset, rows);
+        double newR2 = OnlinePearsonsRSquaredEvaluator.Calculate(targetValues, newOutput);
 
-        impactValues[node] = 1 - OnlinePearsonsRSquaredEvaluator.Calculate(originalOutput, newOutput);
+        // impact = 0 if no change
+        // impact < 0 if new solution is better
+        // impact > 0 if new solution is worse
+        impactValues[node] = originalR2 - newR2;
         SwitchNode(parent, replacementNode, node);
       }
@@ -80,8 +96,10 @@
     }
 
-    private double CalculateReplacementValue(ISymbolicExpressionTreeNode node, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, Dataset dataset, IEnumerable<int> rows) {
+    private double CalculateReplacementValue(ISymbolicExpressionTreeNode node) {
       var start = tempTree.Root.GetSubTree(0);
       while (start.SubTrees.Count() > 0) start.RemoveSubTree(0);
       start.AddSubTree((ISymbolicExpressionTreeNode)node.Clone());
+      var interpreter = Content.Model.Interpreter;
+      var rows = Content.ProblemData.TrainingIndizes;
       return interpreter.GetSymbolicExpressionTreeValues(tempTree, Content.ProblemData.Dataset, rows).Median();
     }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.cs	(revision 5717)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
-  [Content(typeof(ISymbolicRegressionSolution))]
+  [Content(typeof(SymbolicRegressionSolution))]
   [View("Symbolic Regression Solution View")]
   public partial class SymbolicRegressionSolutionView : DataAnalysisSolutionView {
@@ -33,6 +33,6 @@
     }
 
-    protected new ISymbolicRegressionSolution Content {
-      get { return (ISymbolicRegressionSolution)base.Content; }
+    protected new SymbolicRegressionSolution Content {
+      get { return (SymbolicRegressionSolution)base.Content; }
       set { base.Content = value; }
     }
@@ -40,5 +40,5 @@
     private void btn_SimplifyModel_Click(object sender, EventArgs e) {
       InteractiveSymbolicRegressionSolutionSimplifierView view = new InteractiveSymbolicRegressionSolutionSimplifierView();
-      view.Content = (ISymbolicRegressionSolution)this.Content.Clone();
+      view.Content = (SymbolicRegressionSolution)this.Content.Clone();
       view.Show();
     }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 5717)
@@ -38,9 +38,10 @@
   [StorableClass]
   [Item(Name = "SymbolicRegressionSolution", Description = "Represents a symbolic regression solution (model + data) and attributes of the solution like accuracy and complexity.")]
-  public class SymbolicRegressionSolution : RegressionSolution, ISymbolicRegressionSolution {
+  public sealed class SymbolicRegressionSolution : RegressionSolution, ISymbolicRegressionSolution {
     #region ISymbolicRegressionSolution Members
 
     public new ISymbolicRegressionModel Model {
       get { return (ISymbolicRegressionModel)base.Model; }
+      set { base.Model = value; }
     }
     ISymbolicDataAnalysisModel ISymbolicDataAnalysisSolution.Model {
@@ -51,6 +52,6 @@
 
     [StorableConstructor]
-    protected SymbolicRegressionSolution(bool deserializing) : base(deserializing) { }
-    protected SymbolicRegressionSolution(SymbolicRegressionSolution original, Cloner cloner)
+    private SymbolicRegressionSolution(bool deserializing) : base(deserializing) { }
+    private SymbolicRegressionSolution(SymbolicRegressionSolution original, Cloner cloner)
       : base(original, cloner) {
     }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs	(revision 5717)
@@ -88,9 +88,9 @@
         simplifiedExpressionTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
 
-        var replacementValues = CalculateReplacementValues(Content.Model.Interpreter, simplifiedExpressionTree, Content.ProblemData.Dataset, Content.ProblemData.TrainingIndizes);
+        var replacementValues = CalculateReplacementValues(simplifiedExpressionTree);
         foreach (var pair in replacementValues) {
           replacementNodes.Add(pair.Key, MakeConstantTreeNode(pair.Value));
         }
-        nodeImpacts = CalculateImpactValues(Content.Model.Interpreter, simplifiedExpressionTree, Content.ProblemData.Dataset, Content.ProblemData.TrainingIndizes);
+        nodeImpacts = CalculateImpactValues(simplifiedExpressionTree);
 
         // automatically fold all branches with impact = 1
@@ -110,6 +110,7 @@
     }
 
-    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
-    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows);
+    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateReplacementValues(ISymbolicExpressionTree tree);
+    protected abstract Dictionary<ISymbolicExpressionTreeNode, double> CalculateImpactValues(ISymbolicExpressionTree tree);
+    protected abstract void UpdateModel(ISymbolicExpressionTree tree);
 
     private ConstantTreeNode MakeConstantTreeNode(double value) {
@@ -137,9 +138,5 @@
 
       SymbolicExpressionTree tree = (SymbolicExpressionTree)simplifiedExpressionTree.Clone();
-
-      //this.Content.ModelChanged -= new EventHandler(Content_ModelChanged);
-      //this.Content.Model = new SymbolicRegressionModel(Content.Model.Interpreter, tree);
-      //this.Content.ModelChanged += new EventHandler(Content_ModelChanged);
-
+      UpdateModel(tree);
       this.PaintNodeImpacts();
     }
@@ -166,9 +163,12 @@
           VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
           
-          //if (impact < 1.0) {
-          //  visualTree.FillColor = Color.FromArgb((int)((1.0 - impact) * 255), Color.Red);
-          //} else {
-          visualTree.FillColor = Color.FromArgb((int)((impact - 1.0) / max * 255), Color.Green);
-          //}
+          // impact = 0 if no change
+          // impact < 0 if new solution is better
+          // impact > 0 if new solution is worse
+          if (impact < 0.0) {
+            visualTree.FillColor = Color.FromArgb((int)(impact / min * 255), Color.Red);
+          } else {
+            visualTree.FillColor = Color.FromArgb((int)(impact / max * 255), Color.Green);
+          }
           visualTree.ToolTip += Environment.NewLine + "Node impact: " + impact;
           visualTree.ToolTip += Environment.NewLine + "Replacement value: " + replacementValue;
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs	(revision 5717)
@@ -35,5 +35,5 @@
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
   /// <summary>
-  /// Abstract base class symbolic data analysis models
+  /// Abstract base class for symbolic data analysis models
   /// </summary>
   [StorableClass]
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationSolutionView.cs	(revision 5717)
@@ -87,5 +87,4 @@
       Content.ModelChanged += new EventHandler(Content_ModelChanged);
       Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
-      Content.ThresholdsChanged += new EventHandler(Content_ThresholdsChanged);
     }
     protected override void DeregisterContentEvents() {
@@ -93,5 +92,4 @@
       Content.ModelChanged -= new EventHandler(Content_ModelChanged);
       Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
-      Content.ThresholdsChanged -= new EventHandler(Content_ThresholdsChanged);
     }
 
@@ -168,5 +166,5 @@
       chart.Annotations.Clear();
       int classIndex = 1;
-      foreach (double threshold in Content.Thresholds) {
+      foreach (double threshold in Content.Model.Thresholds) {
         if (!double.IsInfinity(threshold)) {
           HorizontalLineAnnotation annotation = new HorizontalLineAnnotation();
@@ -235,5 +233,5 @@
     private void chart_AnnotationPositionChanging(object sender, AnnotationPositionChangingEventArgs e) {
       int classIndex = (int)e.Annotation.Tag;
-      double[] thresholds = Content.Thresholds.ToArray();
+      double[] thresholds = Content.Model.Thresholds.ToArray();
       double max = thresholds[classIndex + 1];
       double min = thresholds[classIndex - 1];
@@ -246,5 +244,5 @@
 
       thresholds[classIndex] = e.NewLocationY;
-      Content.Thresholds = thresholds;
+      Content.Model.Thresholds = thresholds;
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationEnsembleModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationEnsembleModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationEnsembleModel.cs	(revision 5717)
@@ -54,5 +54,5 @@
       this.name = ItemName;
       this.description = ItemDescription;
-      this.models = new List<IClassificationModel>(models);
+      this.models = new List<IClassificationModel>(models);      
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClassificationSolution.cs	(revision 5717)
@@ -39,4 +39,25 @@
     private const string TrainingAccuracyResultName = "Accuracy (training)";
     private const string TestAccuracyResultName = "Accuracy (test)";
+
+    public new IClassificationModel Model {
+      get { return (IClassificationModel)base.Model; }
+      protected set { base.Model = value; }
+    }
+
+    public new IClassificationProblemData ProblemData {
+      get { return (IClassificationProblemData)base.ProblemData; }
+      protected set { base.ProblemData = value; }
+    }
+
+    public double TrainingAccuracy {
+      get { return ((DoubleValue)this[TrainingAccuracyResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingAccuracyResultName].Value).Value = value; }
+    }
+
+    public double TestAccuracy {
+      get { return ((DoubleValue)this[TestAccuracyResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestAccuracyResultName].Value).Value = value; }
+    }
+
     [StorableConstructor]
     protected ClassificationSolution(bool deserializing) : base(deserializing) { }
@@ -46,4 +67,20 @@
     public ClassificationSolution(IClassificationModel model, IClassificationProblemData problemData)
       : base(model, problemData) {
+      Add(new Result(TrainingAccuracyResultName, "Accuracy of the model on the training partition (percentage of correctly classified instances).", new PercentValue()));
+      Add(new Result(TestAccuracyResultName, "Accuracy of the model on the test partition (percentage of correctly classified instances).", new PercentValue()));
+      RecalculateResults();
+    }
+
+    protected override void OnProblemDataChanged(EventArgs e) {
+      base.OnProblemDataChanged(e);
+      RecalculateResults();
+    }
+
+    protected override void OnModelChanged(EventArgs e) {
+      base.OnModelChanged(e);
+      RecalculateResults();
+    }
+
+    private void RecalculateResults() {
       double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values
       IEnumerable<double> originalTrainingClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
@@ -54,16 +91,6 @@
       double testAccuracy = OnlineAccuracyEvaluator.Calculate(estimatedTestClassValues, originalTestClassValues);
 
-      Add(new Result(TrainingAccuracyResultName, "Accuracy of the model on the training partition (percentage of correctly classified instances).", new PercentValue(trainingAccuracy)));
-      Add(new Result(TestAccuracyResultName, "Accuracy of the model on the test partition (percentage of correctly classified instances).", new PercentValue(testAccuracy)));
-    }
-
-    #region IClassificationSolution Members
-
-    public new IClassificationModel Model {
-      get { return (IClassificationModel)base.Model; }
-    }
-
-    public new IClassificationProblemData ProblemData {
-      get { return (IClassificationProblemData)base.ProblemData; }
+      TrainingAccuracy = trainingAccuracy;
+      TestAccuracy = testAccuracy;
     }
 
@@ -89,5 +116,4 @@
       return Model.GetEstimatedClassValues(ProblemData.Dataset, rows);
     }
-    #endregion
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClusteringSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClusteringSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ClusteringSolution.cs	(revision 5717)
@@ -51,8 +51,10 @@
     public new IClusteringModel Model {
       get { return (IClusteringModel)base.Model; }
+      set { base.Model = value; }
     }
 
     public new IClusteringProblemData ProblemData {
       get { return (IClusteringProblemData)base.ProblemData; }
+      set { base.ProblemData = value; }
     }
 
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DataAnalysisSolution.cs	(revision 5717)
@@ -48,26 +48,26 @@
     public IDataAnalysisModel Model {
       get { return (IDataAnalysisModel)this[ModelResultName].Value; }
-      //set {
-      //  if (this[ModelResultName].Value != value) {
-      //    if (value != null) {
-      //      this[ModelResultName].Value = value;
-      //      OnModelChanged(EventArgs.Empty);
-      //    }
-      //  }
-      //}
+      protected set {
+        if (this[ModelResultName].Value != value) {
+          if (value != null) {
+            this[ModelResultName].Value = value;
+            OnModelChanged(EventArgs.Empty);
+          }
+        }
+      }
     }
 
     public IDataAnalysisProblemData ProblemData {
       get { return (IDataAnalysisProblemData)this[ProblemDataResultName].Value; }
-      //set {
-      //  if (this[ProblemDataResultName].Value != value) {
-      //    if (value != null) {
-      //      ProblemData.Changed -= new EventHandler(ProblemData_Changed);
-      //      this[ProblemDataResultName].Value = value;
-      //      ProblemData.Changed += new EventHandler(ProblemData_Changed);
-      //      OnProblemDataChanged(EventArgs.Empty);
-      //    }
-      //  }
-      //}
+      protected set {
+        if (this[ProblemDataResultName].Value != value) {
+          if (value != null) {
+            ProblemData.Changed -= new EventHandler(ProblemData_Changed);
+            this[ProblemDataResultName].Value = value;
+            ProblemData.Changed += new EventHandler(ProblemData_Changed);
+            OnProblemDataChanged(EventArgs.Empty);
+          }
+        }
+      }
     }
     #endregion
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/DiscriminantFunctionClassificationSolution.cs	(revision 5717)
@@ -38,4 +38,9 @@
   [Item("DiscriminantFunctionClassificationSolution", "Represents a classification solution that uses a discriminant function and classification thresholds.")]
   public class DiscriminantFunctionClassificationSolution : ClassificationSolution, IDiscriminantFunctionClassificationSolution {
+    public new IDiscriminantFunctionClassificationModel Model {
+      get { return (IDiscriminantFunctionClassificationModel)base.Model; }
+      protected set { base.Model = value; }
+    }
+
     [StorableConstructor]
     protected DiscriminantFunctionClassificationSolution(bool deserializing) : base(deserializing) { }
@@ -48,11 +53,4 @@
     public DiscriminantFunctionClassificationSolution(IDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData)
       : base(model, problemData) {
-      Model.ThresholdsChanged += new EventHandler(Model_ThresholdsChanged);
-    }
-
-    #region IDiscriminantFunctionClassificationSolution Members
-
-    public new IDiscriminantFunctionClassificationModel Model {
-      get { return (IDiscriminantFunctionClassificationModel)base.Model; }
     }
 
@@ -72,23 +70,4 @@
       return Model.GetEstimatedValues(ProblemData.Dataset, rows);
     }
-
-    public IEnumerable<double> Thresholds {
-      get {
-        return Model.Thresholds;
-      }
-      set { Model.Thresholds = new List<double>(value); }
-    }
-
-    public event EventHandler ThresholdsChanged;
-
-    private void Model_ThresholdsChanged(object sender, EventArgs e) {
-      OnThresholdsChanged(e);
-    }
-
-    protected virtual void OnThresholdsChanged(EventArgs e) {
-      var listener = ThresholdsChanged;
-      if (listener != null) listener(this, e);
-    }
-    #endregion
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IClassificationSolution.cs	(revision 5717)
@@ -31,4 +31,7 @@
     IEnumerable<double> EstimatedTestClassValues { get; }
     IEnumerable<double> GetEstimatedClassValues(IEnumerable<int> rows);
+
+    double TrainingAccuracy { get; }
+    double TestAccuracy { get; }
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationModel.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationModel.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationModel.cs	(revision 5717)
@@ -26,6 +26,7 @@
     IEnumerable<double> Thresholds { get; set; }
     IEnumerable<double> ClassValues { get; set; }
+    IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows);
+
     event EventHandler ThresholdsChanged;
-    IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows);
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationSolution.cs	(revision 5717)
@@ -30,8 +30,4 @@
     IEnumerable<double> EstimatedTestValues { get; }
     IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows);
-
-    IEnumerable<double> Thresholds { get; set; }
-
-    event EventHandler ThresholdsChanged;
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionSolution.cs	(revision 5717)
@@ -30,4 +30,9 @@
     IEnumerable<double> EstimatedTestValues { get; }
     IEnumerable<double> GetEstimatedValues(IEnumerable<int> rows);
+
+    double TrainingMeanSquaredError { get; }
+    double TestMeanSquaredError { get; }
+    double TrainingRSquared { get; }
+    double TestRSquared { get; }
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionSolution.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionSolution.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/RegressionSolution.cs	(revision 5717)
@@ -44,4 +44,45 @@
     private const string TestRelativeErrorResultName = "Average relative error (test)";
 
+    public new IRegressionModel Model {
+      get { return (IRegressionModel)base.Model; }
+      protected set { base.Model = value; }
+    }
+
+    public new IRegressionProblemData ProblemData {
+      get { return (IRegressionProblemData)base.ProblemData; }
+      protected set { base.ProblemData = value; }
+    }
+
+    public double TrainingMeanSquaredError {
+      get { return ((DoubleValue)this[TrainingMeanSquaredErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingMeanSquaredErrorResultName].Value).Value = value; }
+    }
+
+    public double TestMeanSquaredError {
+      get { return ((DoubleValue)this[TestMeanSquaredErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestMeanSquaredErrorResultName].Value).Value = value; }
+    }
+
+    public double TrainingRSquared {
+      get { return ((DoubleValue)this[TrainingSquaredCorrelationResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingSquaredCorrelationResultName].Value).Value = value; }
+    }
+
+    public double TestRSquared {
+      get { return ((DoubleValue)this[TestSquaredCorrelationResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestSquaredCorrelationResultName].Value).Value = value; }
+    }
+
+    public double TrainingRelativeError {
+      get { return ((DoubleValue)this[TrainingRelativeErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TrainingRelativeErrorResultName].Value).Value = value; }
+    }
+
+    public double TestRelativeError {
+      get { return ((DoubleValue)this[TestRelativeErrorResultName].Value).Value; }
+      private set { ((DoubleValue)this[TestRelativeErrorResultName].Value).Value = value; }
+    }
+
+
     [StorableConstructor]
     protected RegressionSolution(bool deserializing) : base(deserializing) { }
@@ -51,4 +92,24 @@
     public RegressionSolution(IRegressionModel model, IRegressionProblemData problemData)
       : base(model, problemData) {
+      Add(new Result(TrainingMeanSquaredErrorResultName, "Mean of squared errors of the model on the training partition", new DoubleValue()));
+      Add(new Result(TestMeanSquaredErrorResultName, "Mean of squared errors of the model on the test partition", new DoubleValue()));
+      Add(new Result(TrainingSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the training partition", new DoubleValue()));
+      Add(new Result(TestSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the test partition", new DoubleValue()));
+      Add(new Result(TrainingRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the training partition", new PercentValue()));
+      Add(new Result(TestRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the test partition", new PercentValue()));
+
+      RecalculateResults();
+    }
+
+    protected override void OnProblemDataChanged(EventArgs e) {
+      base.OnProblemDataChanged(e);
+      RecalculateResults();
+    }
+    protected override void OnModelChanged(EventArgs e) {
+      base.OnModelChanged(e);
+      RecalculateResults();
+    }
+
+    private void RecalculateResults() {
       double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values
       IEnumerable<double> originalTrainingValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes);
@@ -63,28 +124,10 @@
       double testRelError = OnlineMeanAbsolutePercentageErrorEvaluator.Calculate(estimatedTestValues, originalTestValues);
 
-      Add(new Result(TrainingMeanSquaredErrorResultName, "Mean of squared errors of the model on the training partition", new DoubleValue(trainingMSE)));
-      Add(new Result(TestMeanSquaredErrorResultName, "Mean of squared errors of the model on the test partition", new DoubleValue(testMSE)));
-      Add(new Result(TrainingSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the training partition", new DoubleValue(trainingR2)));
-      Add(new Result(TestSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the test partition", new DoubleValue(testR2)));
-      Add(new Result(TrainingRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the training partition", new PercentValue(trainingRelError)));
-      Add(new Result(TestRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the test partition", new PercentValue(testRelError)));
-    }
-
-    protected override void OnProblemDataChanged(EventArgs e) {
-      base.OnProblemDataChanged(e);
-      throw new NotImplementedException(); // need to recalculate results
-    }
-    protected override void OnModelChanged(EventArgs e) {
-      base.OnModelChanged(e);
-      throw new NotImplementedException(); // need to recalculate results
-    }
-    #region IRegressionSolution Members
-
-    public new IRegressionModel Model {
-      get { return (IRegressionModel)base.Model; }
-    }
-
-    public new IRegressionProblemData ProblemData {
-      get { return (IRegressionProblemData)base.ProblemData; }
+      TrainingMeanSquaredError = trainingMSE;
+      TestMeanSquaredError = testMSE;
+      TrainingRSquared = trainingR2;
+      TestRSquared = testR2;
+      TrainingRelativeError = trainingRelError;
+      TestRelativeError = testRelError;
     }
 
@@ -110,5 +153,4 @@
       return Model.GetEstimatedValues(ProblemData.Dataset, rows);
     }
-    #endregion
   }
 }
Index: /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs
===================================================================
--- /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs	(revision 5716)
+++ /branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis/3.4/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs	(revision 5717)
@@ -76,5 +76,4 @@
       int[,] confusionMatrix = new int[nClasses, nClasses];
 
-      // one threshold is always treated as binary separation of the remaining classes
       for (int i = 1; i < thresholds.Length - 1; i++) {
         double lowerThreshold = thresholds[i - 1];
