Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 7121)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.csproj	(revision 7122)
@@ -117,9 +117,9 @@
     </Compile>
     <Compile Include="Plugin.cs" />
-    <Compile Include="SymbolicDataAnalysisSolutionResponseFunctionView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="SymbolicDataAnalysisSolutionResponseFunctionView.Designer.cs">
-      <DependentUpon>SymbolicDataAnalysisSolutionResponseFunctionView.cs</DependentUpon>
+    <Compile Include="SymbolicRegressionSolutionResponseFunctionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicRegressionSolutionResponseFunctionView.Designer.cs">
+      <DependentUpon>SymbolicRegressionSolutionResponseFunctionView.cs</DependentUpon>
     </Compile>
     <Compile Include="SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs">
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.Designer.cs	(revision 7121)
+++ 	(revision )
@@ -1,169 +1,0 @@
-﻿#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.Regression.Views {
-  partial class SymbolicDataAnalysisSolutionResponseFunctionView {
-    /// <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() {
-      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series();
-      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
-      this.responseChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
-      this.comboBox = new System.Windows.Forms.ComboBox();
-      this.freeVariableLabel = new System.Windows.Forms.Label();
-      ((System.ComponentModel.ISupportInitialize)(this.responseChart)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // flowLayoutPanel
-      // 
-      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.flowLayoutPanel.AutoScroll = true;
-      this.flowLayoutPanel.Location = new System.Drawing.Point(3, 202);
-      this.flowLayoutPanel.Name = "flowLayoutPanel";
-      this.flowLayoutPanel.Size = new System.Drawing.Size(261, 268);
-      this.flowLayoutPanel.TabIndex = 2;
-      this.flowLayoutPanel.WrapContents = false;
-      // 
-      // responseChart
-      // 
-      this.responseChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      chartArea1.Name = "ChartArea";
-      this.responseChart.ChartAreas.Add(chartArea1);
-      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
-      legend1.LegendStyle = System.Windows.Forms.DataVisualization.Charting.LegendStyle.Row;
-      legend1.Name = "Legend";
-      this.responseChart.Legends.Add(legend1);
-      this.responseChart.Location = new System.Drawing.Point(3, 30);
-      this.responseChart.Name = "responseChart";
-      series1.ChartArea = "ChartArea";
-      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
-      series1.Legend = "Legend";
-      series1.MarkerColor = System.Drawing.Color.Gold;
-      series1.MarkerSize = 3;
-      series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
-      series1.Name = "Training Data (edge)";
-      series2.ChartArea = "ChartArea";
-      series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
-      series2.Legend = "Legend";
-      series2.MarkerColor = System.Drawing.Color.OrangeRed;
-      series2.MarkerSize = 3;
-      series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
-      series2.Name = "Test Data (edge)";
-      series3.ChartArea = "ChartArea";
-      series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
-      series3.Legend = "Legend";
-      series3.MarkerColor = System.Drawing.Color.Gold;
-      series3.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
-      series3.Name = "Training Data";
-      series4.ChartArea = "ChartArea";
-      series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
-      series4.Legend = "Legend";
-      series4.MarkerColor = System.Drawing.Color.OrangeRed;
-      series4.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
-      series4.Name = "Test Data";
-      series5.BorderWidth = 3;
-      series5.ChartArea = "ChartArea";
-      series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
-      series5.Color = System.Drawing.Color.DodgerBlue;
-      series5.Legend = "Legend";
-      series5.MarkerSize = 1;
-      series5.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Cross;
-      series5.Name = "Model Response";
-      series5.ShadowColor = System.Drawing.Color.DodgerBlue;
-      this.responseChart.Series.Add(series1);
-      this.responseChart.Series.Add(series2);
-      this.responseChart.Series.Add(series3);
-      this.responseChart.Series.Add(series4);
-      this.responseChart.Series.Add(series5);
-      this.responseChart.Size = new System.Drawing.Size(258, 166);
-      this.responseChart.TabIndex = 3;
-      // 
-      // comboBox
-      // 
-      this.comboBox.FormattingEnabled = true;
-      this.comboBox.Location = new System.Drawing.Point(80, 3);
-      this.comboBox.Name = "comboBox";
-      this.comboBox.Size = new System.Drawing.Size(166, 21);
-      this.comboBox.TabIndex = 4;
-      this.comboBox.SelectedIndexChanged += new System.EventHandler(this.ComboBoxSelectedIndexChanged);
-      // 
-      // freeVariableLabel
-      // 
-      this.freeVariableLabel.AutoSize = true;
-      this.freeVariableLabel.Location = new System.Drawing.Point(3, 6);
-      this.freeVariableLabel.Name = "freeVariableLabel";
-      this.freeVariableLabel.Size = new System.Drawing.Size(71, 13);
-      this.freeVariableLabel.TabIndex = 5;
-      this.freeVariableLabel.Text = "Free variable:";
-      // 
-      // SymbolicDataAnalysisSolutionResponseFunctionView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.freeVariableLabel);
-      this.Controls.Add(this.comboBox);
-      this.Controls.Add(this.responseChart);
-      this.Controls.Add(this.flowLayoutPanel);
-      this.Name = "SymbolicDataAnalysisSolutionResponseFunctionView";
-      this.Size = new System.Drawing.Size(264, 473);
-      ((System.ComponentModel.ISupportInitialize)(this.responseChart)).EndInit();
-      this.ResumeLayout(false);
-      this.PerformLayout();
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
-    private System.Windows.Forms.DataVisualization.Charting.Chart responseChart;
-    private System.Windows.Forms.ComboBox comboBox;
-    private System.Windows.Forms.Label freeVariableLabel;
-  }
-}
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicDataAnalysisSolutionResponseFunctionView.cs	(revision 7121)
+++ 	(revision )
@@ -1,241 +1,0 @@
-﻿#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.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
-  [View("Response Function View")]
-  [Content(typeof(ISymbolicRegressionSolution), false)]
-  public partial class SymbolicDataAnalysisSolutionResponseFunctionView : AsynchronousContentView {
-    private Dictionary<string, List<ISymbolicExpressionTreeNode>> variableNodes;
-    private ISymbolicExpressionTree clonedTree;
-    private Dictionary<string, double> medianValues;
-    public SymbolicDataAnalysisSolutionResponseFunctionView() {
-      InitializeComponent();
-      this.variableNodes = new Dictionary<string, List<ISymbolicExpressionTreeNode>>();
-      medianValues = new Dictionary<string, double>();
-      this.Caption = "Response Function View";
-    }
-
-    public new ISymbolicRegressionSolution Content {
-      get { return (ISymbolicRegressionSolution)base.Content; }
-      set { base.Content = value; }
-    }
-
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.ModelChanged += new EventHandler(Content_ModelChanged);
-      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
-    }
-    protected override void DeregisterContentEvents() {
-      base.DeregisterContentEvents();
-      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
-      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
-    }
-
-    private void Content_ModelChanged(object sender, EventArgs e) {
-      OnModelChanged();
-    }
-    private void Content_ProblemDataChanged(object sender, EventArgs e) {
-      OnProblemDataChanged();
-    }
-
-    protected virtual void OnModelChanged() {
-      this.UpdateView();
-    }
-
-    protected virtual void OnProblemDataChanged() {
-      this.UpdateView();
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      this.UpdateView();
-    }
-
-    private void UpdateView() {
-      if (Content != null && Content.Model != null && Content.ProblemData != null) {
-        var referencedVariables =
-       (from varNode in Content.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<VariableTreeNode>()
-        select varNode.VariableName)
-         .Distinct()
-         .OrderBy(x => x)
-         .ToList();
-
-        medianValues.Clear();
-        foreach (var variableName in referencedVariables) {
-          medianValues.Add(variableName, Content.ProblemData.Dataset.GetDoubleValues(variableName).Median());
-        }
-
-        comboBox.Items.Clear();
-        comboBox.Items.AddRange(referencedVariables.ToArray());
-        comboBox.SelectedIndex = 0;
-      }
-    }
-
-    private void CreateSliders(IEnumerable<string> variableNames) {
-      flowLayoutPanel.Controls.Clear();
-
-      foreach (var variableName in variableNames) {
-        var variableTrackbar = new VariableTrackbar(variableName,
-                                                    Content.ProblemData.Dataset.GetDoubleValues(variableName));
-        variableTrackbar.Size = new Size(variableTrackbar.Size.Width, flowLayoutPanel.Size.Height - 23);
-        variableTrackbar.ValueChanged += TrackBarValueChanged;
-        flowLayoutPanel.Controls.Add(variableTrackbar);
-      }
-    }
-
-    private void TrackBarValueChanged(object sender, EventArgs e) {
-      var trackBar = (VariableTrackbar)sender;
-      string variableName = trackBar.VariableName;
-      ChangeVariableValue(variableName, trackBar.Value);
-    }
-
-    private void ChangeVariableValue(string variableName, double value) {
-      foreach (var constNode in variableNodes[variableName].Cast<ConstantTreeNode>())
-        constNode.Value = value;
-
-      UpdateResponseSeries();
-    }
-
-    private void UpdateScatterPlot() {
-      string freeVariable = (string)comboBox.SelectedItem;
-      IEnumerable<string> fixedVariables = comboBox.Items.OfType<string>()
-        .Except(new string[] { freeVariable });
-      
-      // scatter plots for subset of samples that have values near the median values for all variables
-      Func<int, bool> NearMedianValue = (r) => {
-        foreach (var fixedVar in fixedVariables) {
-          double med = medianValues[fixedVar];
-          if (!(Content.ProblemData.Dataset.GetDoubleValue(fixedVar, r) < med + 0.1 * Math.Abs(med) &&
-            Content.ProblemData.Dataset.GetDoubleValue(fixedVar, r) > med - 0.1 * Math.Abs(med)))
-            return false;
-        }
-        return true;
-      };
-
-      var mainTrainingIndizes = (from row in Content.ProblemData.TrainingIndizes
-                                 where NearMedianValue(row)
-                                 select row)
-        .ToArray();
-      var mainTestIndizes = (from row in Content.ProblemData.TestIndizes
-                             where NearMedianValue(row)
-                             select row)
-        .ToArray();
-
-      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTrainingIndizes).ToArray();
-      var trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
-                                                                     mainTrainingIndizes).ToArray();
-      Array.Sort(freeVariableValues, trainingValues);
-      responseChart.Series["Training Data"].Points.DataBindXY(freeVariableValues, trainingValues);
-
-      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTestIndizes).ToArray();
-      var testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
-                                                                     mainTestIndizes).ToArray();
-      Array.Sort(freeVariableValues, testValues);
-      responseChart.Series["Test Data"].Points.DataBindXY(freeVariableValues, testValues);
-
-      // draw scatter plots of remaining values
-      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
-      trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
-                                                                     Content.ProblemData.TrainingIndizes).ToArray();
-      Array.Sort(freeVariableValues, trainingValues);
-      responseChart.Series["Training Data (edge)"].Points.DataBindXY(freeVariableValues, trainingValues);
-
-      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TestIndizes).ToArray();
-      testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
-                                                                     Content.ProblemData.TestIndizes).ToArray();
-      Array.Sort(freeVariableValues, testValues);
-      responseChart.Series["Test Data (edge)"].Points.DataBindXY(freeVariableValues, testValues);
-
-
-
-      responseChart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(freeVariableValues.Max());
-      responseChart.ChartAreas[0].AxisX.Minimum = Math.Floor(freeVariableValues.Min());
-      responseChart.ChartAreas[0].AxisY.Maximum = Math.Ceiling(Math.Max(testValues.Max(), trainingValues.Max()));
-      responseChart.ChartAreas[0].AxisY.Minimum = Math.Floor(Math.Min(testValues.Min(), trainingValues.Min()));
-    }
-
-    private void UpdateResponseSeries() {
-      string freeVariable = (string)comboBox.SelectedItem;
-
-      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
-      var responseValues = Content.Model.Interpreter.GetSymbolicExpressionTreeValues(clonedTree,
-                                                                              Content.ProblemData.Dataset,
-                                                                              Content.ProblemData.TrainingIndizes)
-                                                                              .ToArray();
-      Array.Sort(freeVariableValues, responseValues);
-      responseChart.Series["Model Response"].Points.DataBindXY(freeVariableValues, responseValues);
-    }
-
-    private void ComboBoxSelectedIndexChanged(object sender, EventArgs e) {
-      string freeVariable = (string)comboBox.SelectedItem;
-      IEnumerable<string> fixedVariables = comboBox.Items.OfType<string>()
-        .Except(new string[] { freeVariable });
-
-      variableNodes.Clear();
-      clonedTree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
-
-      foreach (var varNode in clonedTree.IterateNodesPrefix().OfType<VariableTreeNode>()) {
-        if (fixedVariables.Contains(varNode.VariableName)) {
-          if (!variableNodes.ContainsKey(varNode.VariableName))
-            variableNodes.Add(varNode.VariableName, new List<ISymbolicExpressionTreeNode>());
-
-          int childIndex = varNode.Parent.IndexOfSubtree(varNode);
-          var replacementNode = MakeConstantTreeNode(medianValues[varNode.VariableName]);
-          var parent = varNode.Parent;
-          parent.RemoveSubtree(childIndex);
-          parent.InsertSubtree(childIndex, MakeProduct(replacementNode, varNode.Weight));
-          variableNodes[varNode.VariableName].Add(replacementNode);
-        }
-      }
-
-      CreateSliders(fixedVariables);
-      UpdateScatterPlot();
-      UpdateResponseSeries();
-    }
-
-    private ISymbolicExpressionTreeNode MakeProduct(ConstantTreeNode c, double weight) {
-      var mul = new Multiplication();
-      var prod = mul.CreateTreeNode();
-      prod.AddSubtree(MakeConstantTreeNode(weight));
-      prod.AddSubtree(c);
-      return prod;
-    }
-
-    private ConstantTreeNode MakeConstantTreeNode(double value) {
-      Constant constant = new Constant();
-      constant.MinValue = value - 1;
-      constant.MaxValue = value + 1;
-      ConstantTreeNode constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
-      constantTreeNode.Value = value;
-      return constantTreeNode;
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.Designer.cs	(revision 7122)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.Designer.cs	(revision 7122)
@@ -0,0 +1,169 @@
+﻿#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.Regression.Views {
+  partial class SymbolicRegressionSolutionResponseFunctionView {
+    /// <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() {
+      System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+      System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+      System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series();
+      this.flowLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
+      this.responseChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
+      this.comboBox = new System.Windows.Forms.ComboBox();
+      this.freeVariableLabel = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.responseChart)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // flowLayoutPanel
+      // 
+      this.flowLayoutPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.flowLayoutPanel.AutoScroll = true;
+      this.flowLayoutPanel.Location = new System.Drawing.Point(3, 202);
+      this.flowLayoutPanel.Name = "flowLayoutPanel";
+      this.flowLayoutPanel.Size = new System.Drawing.Size(261, 268);
+      this.flowLayoutPanel.TabIndex = 2;
+      this.flowLayoutPanel.WrapContents = false;
+      // 
+      // responseChart
+      // 
+      this.responseChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      chartArea1.Name = "ChartArea";
+      this.responseChart.ChartAreas.Add(chartArea1);
+      legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top;
+      legend1.LegendStyle = System.Windows.Forms.DataVisualization.Charting.LegendStyle.Row;
+      legend1.Name = "Legend";
+      this.responseChart.Legends.Add(legend1);
+      this.responseChart.Location = new System.Drawing.Point(3, 30);
+      this.responseChart.Name = "responseChart";
+      series1.ChartArea = "ChartArea";
+      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
+      series1.Legend = "Legend";
+      series1.MarkerColor = System.Drawing.Color.Gold;
+      series1.MarkerSize = 3;
+      series1.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
+      series1.Name = "Training Data (edge)";
+      series2.ChartArea = "ChartArea";
+      series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
+      series2.Legend = "Legend";
+      series2.MarkerColor = System.Drawing.Color.OrangeRed;
+      series2.MarkerSize = 3;
+      series2.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
+      series2.Name = "Test Data (edge)";
+      series3.ChartArea = "ChartArea";
+      series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
+      series3.Legend = "Legend";
+      series3.MarkerColor = System.Drawing.Color.Gold;
+      series3.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
+      series3.Name = "Training Data";
+      series4.ChartArea = "ChartArea";
+      series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastPoint;
+      series4.Legend = "Legend";
+      series4.MarkerColor = System.Drawing.Color.OrangeRed;
+      series4.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Diamond;
+      series4.Name = "Test Data";
+      series5.BorderWidth = 3;
+      series5.ChartArea = "ChartArea";
+      series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.FastLine;
+      series5.Color = System.Drawing.Color.DodgerBlue;
+      series5.Legend = "Legend";
+      series5.MarkerSize = 1;
+      series5.MarkerStyle = System.Windows.Forms.DataVisualization.Charting.MarkerStyle.Cross;
+      series5.Name = "Model Response";
+      series5.ShadowColor = System.Drawing.Color.DodgerBlue;
+      this.responseChart.Series.Add(series1);
+      this.responseChart.Series.Add(series2);
+      this.responseChart.Series.Add(series3);
+      this.responseChart.Series.Add(series4);
+      this.responseChart.Series.Add(series5);
+      this.responseChart.Size = new System.Drawing.Size(258, 166);
+      this.responseChart.TabIndex = 3;
+      // 
+      // comboBox
+      // 
+      this.comboBox.FormattingEnabled = true;
+      this.comboBox.Location = new System.Drawing.Point(80, 3);
+      this.comboBox.Name = "comboBox";
+      this.comboBox.Size = new System.Drawing.Size(166, 21);
+      this.comboBox.TabIndex = 4;
+      this.comboBox.SelectedIndexChanged += new System.EventHandler(this.ComboBoxSelectedIndexChanged);
+      // 
+      // freeVariableLabel
+      // 
+      this.freeVariableLabel.AutoSize = true;
+      this.freeVariableLabel.Location = new System.Drawing.Point(3, 6);
+      this.freeVariableLabel.Name = "freeVariableLabel";
+      this.freeVariableLabel.Size = new System.Drawing.Size(71, 13);
+      this.freeVariableLabel.TabIndex = 5;
+      this.freeVariableLabel.Text = "Free variable:";
+      // 
+      // SymbolicDataAnalysisSolutionResponseFunctionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.freeVariableLabel);
+      this.Controls.Add(this.comboBox);
+      this.Controls.Add(this.responseChart);
+      this.Controls.Add(this.flowLayoutPanel);
+      this.Name = "SymbolicDataAnalysisSolutionResponseFunctionView";
+      this.Size = new System.Drawing.Size(264, 473);
+      ((System.ComponentModel.ISupportInitialize)(this.responseChart)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel;
+    private System.Windows.Forms.DataVisualization.Charting.Chart responseChart;
+    private System.Windows.Forms.ComboBox comboBox;
+    private System.Windows.Forms.Label freeVariableLabel;
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs	(revision 7122)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionResponseFunctionView.cs	(revision 7122)
@@ -0,0 +1,242 @@
+﻿#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.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views {
+  [View("Response Function View")]
+  [Content(typeof(ISymbolicRegressionSolution), false)]
+  public partial class SymbolicRegressionSolutionResponseFunctionView : ItemView {
+    private Dictionary<string, List<ISymbolicExpressionTreeNode>> variableNodes;
+    private ISymbolicExpressionTree clonedTree;
+    private Dictionary<string, double> medianValues;
+    public SymbolicRegressionSolutionResponseFunctionView() {
+      InitializeComponent();
+      variableNodes = new Dictionary<string, List<ISymbolicExpressionTreeNode>>();
+      medianValues = new Dictionary<string, double>();
+      Caption = "Response Function View";
+    }
+
+    public new ISymbolicRegressionSolution Content {
+      get { return (ISymbolicRegressionSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      OnModelChanged();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      OnProblemDataChanged();
+    }
+
+    protected virtual void OnModelChanged() {
+      this.UpdateView();
+    }
+
+    protected virtual void OnProblemDataChanged() {
+      this.UpdateView();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      this.UpdateView();
+    }
+
+    private void UpdateView() {
+      if (Content != null && Content.Model != null && Content.ProblemData != null) {
+        var referencedVariables =
+       (from varNode in Content.Model.SymbolicExpressionTree.IterateNodesPrefix().OfType<VariableTreeNode>()
+        select varNode.VariableName)
+         .Distinct()
+         .OrderBy(x => x, new NaturalStringComparer())
+         .ToList();
+
+        medianValues.Clear();
+        foreach (var variableName in referencedVariables) {
+          medianValues.Add(variableName, Content.ProblemData.Dataset.GetDoubleValues(variableName).Median());
+        }
+
+        comboBox.Items.Clear();
+        comboBox.Items.AddRange(referencedVariables.ToArray());
+        comboBox.SelectedIndex = 0;
+      }
+    }
+
+    private void CreateSliders(IEnumerable<string> variableNames) {
+      flowLayoutPanel.Controls.Clear();
+
+      foreach (var variableName in variableNames) {
+        var variableTrackbar = new VariableTrackbar(variableName,
+                                                    Content.ProblemData.Dataset.GetDoubleValues(variableName));
+        variableTrackbar.Size = new Size(variableTrackbar.Size.Width, flowLayoutPanel.Size.Height - 23);
+        variableTrackbar.ValueChanged += TrackBarValueChanged;
+        flowLayoutPanel.Controls.Add(variableTrackbar);
+      }
+    }
+
+    private void TrackBarValueChanged(object sender, EventArgs e) {
+      var trackBar = (VariableTrackbar)sender;
+      string variableName = trackBar.VariableName;
+      ChangeVariableValue(variableName, trackBar.Value);
+    }
+
+    private void ChangeVariableValue(string variableName, double value) {
+      foreach (var constNode in variableNodes[variableName].Cast<ConstantTreeNode>())
+        constNode.Value = value;
+
+      UpdateResponseSeries();
+    }
+
+    private void UpdateScatterPlot() {
+      string freeVariable = (string)comboBox.SelectedItem;
+      IEnumerable<string> fixedVariables = comboBox.Items.OfType<string>()
+        .Except(new string[] { freeVariable });
+
+      // scatter plots for subset of samples that have values near the median values for all variables
+      Func<int, bool> NearMedianValue = (r) => {
+        foreach (var fixedVar in fixedVariables) {
+          double med = medianValues[fixedVar];
+          if (!(Content.ProblemData.Dataset.GetDoubleValue(fixedVar, r) < med + 0.1 * Math.Abs(med) &&
+            Content.ProblemData.Dataset.GetDoubleValue(fixedVar, r) > med - 0.1 * Math.Abs(med)))
+            return false;
+        }
+        return true;
+      };
+
+      var mainTrainingIndizes = (from row in Content.ProblemData.TrainingIndizes
+                                 where NearMedianValue(row)
+                                 select row)
+        .ToArray();
+      var mainTestIndizes = (from row in Content.ProblemData.TestIndizes
+                             where NearMedianValue(row)
+                             select row)
+        .ToArray();
+
+      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTrainingIndizes).ToArray();
+      var trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
+                                                                     mainTrainingIndizes).ToArray();
+      Array.Sort(freeVariableValues, trainingValues);
+      responseChart.Series["Training Data"].Points.DataBindXY(freeVariableValues, trainingValues);
+
+      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, mainTestIndizes).ToArray();
+      var testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
+                                                                     mainTestIndizes).ToArray();
+      Array.Sort(freeVariableValues, testValues);
+      responseChart.Series["Test Data"].Points.DataBindXY(freeVariableValues, testValues);
+
+      // draw scatter plots of remaining values
+      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
+      trainingValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
+                                                                     Content.ProblemData.TrainingIndizes).ToArray();
+      Array.Sort(freeVariableValues, trainingValues);
+      responseChart.Series["Training Data (edge)"].Points.DataBindXY(freeVariableValues, trainingValues);
+
+      freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TestIndizes).ToArray();
+      testValues = Content.ProblemData.Dataset.GetDoubleValues(Content.ProblemData.TargetVariable,
+                                                                     Content.ProblemData.TestIndizes).ToArray();
+      Array.Sort(freeVariableValues, testValues);
+      responseChart.Series["Test Data (edge)"].Points.DataBindXY(freeVariableValues, testValues);
+
+
+
+      responseChart.ChartAreas[0].AxisX.Maximum = Math.Ceiling(freeVariableValues.Max());
+      responseChart.ChartAreas[0].AxisX.Minimum = Math.Floor(freeVariableValues.Min());
+      responseChart.ChartAreas[0].AxisY.Maximum = Math.Ceiling(Math.Max(testValues.Max(), trainingValues.Max()));
+      responseChart.ChartAreas[0].AxisY.Minimum = Math.Floor(Math.Min(testValues.Min(), trainingValues.Min()));
+    }
+
+    private void UpdateResponseSeries() {
+      string freeVariable = (string)comboBox.SelectedItem;
+
+      var freeVariableValues = Content.ProblemData.Dataset.GetDoubleValues(freeVariable, Content.ProblemData.TrainingIndizes).ToArray();
+      var responseValues = Content.Model.Interpreter.GetSymbolicExpressionTreeValues(clonedTree,
+                                                                              Content.ProblemData.Dataset,
+                                                                              Content.ProblemData.TrainingIndizes)
+                                                                              .ToArray();
+      Array.Sort(freeVariableValues, responseValues);
+      responseChart.Series["Model Response"].Points.DataBindXY(freeVariableValues, responseValues);
+    }
+
+    private void ComboBoxSelectedIndexChanged(object sender, EventArgs e) {
+      string freeVariable = (string)comboBox.SelectedItem;
+      IEnumerable<string> fixedVariables = comboBox.Items.OfType<string>()
+        .Except(new string[] { freeVariable });
+
+      variableNodes.Clear();
+      clonedTree = (ISymbolicExpressionTree)Content.Model.SymbolicExpressionTree.Clone();
+
+      foreach (var varNode in clonedTree.IterateNodesPrefix().OfType<VariableTreeNode>()) {
+        if (fixedVariables.Contains(varNode.VariableName)) {
+          if (!variableNodes.ContainsKey(varNode.VariableName))
+            variableNodes.Add(varNode.VariableName, new List<ISymbolicExpressionTreeNode>());
+
+          int childIndex = varNode.Parent.IndexOfSubtree(varNode);
+          var replacementNode = MakeConstantTreeNode(medianValues[varNode.VariableName]);
+          var parent = varNode.Parent;
+          parent.RemoveSubtree(childIndex);
+          parent.InsertSubtree(childIndex, MakeProduct(replacementNode, varNode.Weight));
+          variableNodes[varNode.VariableName].Add(replacementNode);
+        }
+      }
+
+      CreateSliders(fixedVariables);
+      UpdateScatterPlot();
+      UpdateResponseSeries();
+    }
+
+    private ISymbolicExpressionTreeNode MakeProduct(ConstantTreeNode c, double weight) {
+      var mul = new Multiplication();
+      var prod = mul.CreateTreeNode();
+      prod.AddSubtree(MakeConstantTreeNode(weight));
+      prod.AddSubtree(c);
+      return prod;
+    }
+
+    private ConstantTreeNode MakeConstantTreeNode(double value) {
+      Constant constant = new Constant();
+      constant.MinValue = value - 1;
+      constant.MaxValue = value + 1;
+      ConstantTreeNode constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
+      constantTreeNode.Value = value;
+      return constantTreeNode;
+    }
+  }
+}
