Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs	(revision 14888)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.Designer.cs	(revision 14889)
@@ -139,4 +139,5 @@
       this.xAxisComboBox.Size = new System.Drawing.Size(400, 21);
       this.xAxisComboBox.TabIndex = 7;
+      this.xAxisComboBox.Sorted = false;
       this.xAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
       // 
@@ -160,4 +161,5 @@
       this.yAxisComboBox.Size = new System.Drawing.Size(400, 21);
       this.yAxisComboBox.TabIndex = 5;
+      this.yAxisComboBox.Sorted = false;
       this.yAxisComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
       // 
@@ -183,4 +185,5 @@
       this.sizeComboBox.Name = "sizeComboBox";
       this.sizeComboBox.Size = new System.Drawing.Size(300, 21);
+      this.sizeComboBox.Sorted = false;
       this.sizeComboBox.TabIndex = 14;
       this.sizeComboBox.SelectedValueChanged += new System.EventHandler(this.AxisComboBox_SelectedValueChanged);
@@ -264,5 +267,5 @@
       this.radioButtonGroup.Controls.Add(this.zoomButton);
       this.radioButtonGroup.Controls.Add(this.selectButton);
-      this.radioButtonGroup.Location = new System.Drawing.Point(3, 704);
+      this.radioButtonGroup.Location = new System.Drawing.Point(6, 679);
       this.radioButtonGroup.Name = "radioButtonGroup";
       this.radioButtonGroup.Size = new System.Drawing.Size(122, 32);
@@ -275,5 +278,5 @@
       this.colorRunsButton.Enabled = false;
       this.colorRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-      this.colorRunsButton.Location = new System.Drawing.Point(131, 713);
+      this.colorRunsButton.Location = new System.Drawing.Point(6, 715);
       this.colorRunsButton.Name = "colorRunsButton";
       this.colorRunsButton.Size = new System.Drawing.Size(21, 21);
@@ -317,5 +320,5 @@
       this.transparencyTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.transparencyTrackBar.LargeChange = 16;
-      this.transparencyTrackBar.Location = new System.Drawing.Point(302, 715);
+      this.transparencyTrackBar.Location = new System.Drawing.Point(177, 717);
       this.transparencyTrackBar.Maximum = 254;
       this.transparencyTrackBar.Name = "transparencyTrackBar";
@@ -331,5 +334,5 @@
       this.hideRunsButton.Enabled = false;
       this.hideRunsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-      this.hideRunsButton.Location = new System.Drawing.Point(172, 713);
+      this.hideRunsButton.Location = new System.Drawing.Point(47, 715);
       this.hideRunsButton.Name = "hideRunsButton";
       this.hideRunsButton.Size = new System.Drawing.Size(43, 21);
@@ -347,5 +350,5 @@
       this.colorDialogButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
       this.colorDialogButton.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
-      this.colorDialogButton.Location = new System.Drawing.Point(152, 713);
+      this.colorDialogButton.Location = new System.Drawing.Point(27, 715);
       this.colorDialogButton.Name = "colorDialogButton";
       this.colorDialogButton.Size = new System.Drawing.Size(14, 21);
@@ -390,5 +393,5 @@
       this.transparencyLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.transparencyLabel.AutoSize = true;
-      this.transparencyLabel.Location = new System.Drawing.Point(233, 717);
+      this.transparencyLabel.Location = new System.Drawing.Point(108, 719);
       this.transparencyLabel.Name = "transparencyLabel";
       this.transparencyLabel.Size = new System.Drawing.Size(75, 13);
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 14888)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBubbleChartView.cs	(revision 14889)
@@ -93,4 +93,21 @@
     }
 
+    public string SelectedXAxis {
+      get { return xAxisValue; }
+      set {
+        if (xAxisComboBox.Items.Contains(value)) {
+          xAxisComboBox.SelectedItem = value;
+        }
+      }
+    }
+    public string SelectedYAxis {
+      get { return yAxisValue; }
+      set {
+        if (yAxisComboBox.Items.Contains(value)) {
+          yAxisComboBox.SelectedItem = value;
+        }
+      }
+    }
+
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
@@ -227,10 +244,13 @@
         string[] additionalAxisDimension = Enum.GetNames(typeof(AxisDimension));
         this.xAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.xAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        var comparer = new HeuristicLab.Common.NaturalStringComparer();
+        var sortedColumnNames = Matrix.ColumnNames.ToArray();
+        sortedColumnNames.StableSort(comparer);
+        this.xAxisComboBox.Items.AddRange(sortedColumnNames);
         this.yAxisComboBox.Items.AddRange(additionalAxisDimension);
-        this.yAxisComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        this.yAxisComboBox.Items.AddRange(sortedColumnNames);
         string[] additionalSizeDimension = Enum.GetNames(typeof(SizeDimension));
         this.sizeComboBox.Items.AddRange(additionalSizeDimension);
-        this.sizeComboBox.Items.AddRange(Matrix.ColumnNames.ToArray());
+        this.sizeComboBox.Items.AddRange(sortedColumnNames);
         this.sizeComboBox.SelectedItem = SizeDimension.Constant.ToString();
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 14888)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 14889)
@@ -272,4 +272,10 @@
       <DependentUpon>RegressionSolutionResidualsLineChartView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Regression\RegressionSolutionResidualAnalysisView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Regression\RegressionSolutionResidualAnalysisView.Designer.cs">
+      <DependentUpon>RegressionSolutionResidualAnalysisView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Regression\RegressionSolutionVariableImpactsView.cs">
       <SubType>UserControl</SubType>
@@ -588,4 +594,7 @@
     <EmbeddedResource Include="FeatureCorrelation\AbstractFeatureCorrelationView.resx">
       <DependentUpon>AbstractFeatureCorrelationView.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Regression\RegressionSolutionResidualAnalysisView.resx">
+      <DependentUpon>RegressionSolutionResidualAnalysisView.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.Designer.cs	(revision 14889)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.Designer.cs	(revision 14889)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Views {
+  partial class RegressionSolutionResidualAnalysisView {
+    /// <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.bubbleChartView = new HeuristicLab.Optimization.Views.RunCollectionBubbleChartView();
+      this.SuspendLayout();
+      // 
+      // bubbleChartView
+      // 
+      this.bubbleChartView.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)));
+      this.bubbleChartView.BackColor = System.Drawing.SystemColors.Window;
+      this.bubbleChartView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+      this.bubbleChartView.Caption = "Bubble Chart";
+      this.bubbleChartView.Content = null;
+      this.bubbleChartView.Location = new System.Drawing.Point(3, 3);
+      this.bubbleChartView.Name = "bubbleChartView";
+      this.bubbleChartView.ReadOnly = false;
+      this.bubbleChartView.Size = new System.Drawing.Size(855, 523);
+      this.bubbleChartView.TabIndex = 0;
+      // 
+      // RegressionSolutionResidualAnalysisView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.bubbleChartView);
+      this.Name = "RegressionSolutionResidualAnalysisView";
+      this.Size = new System.Drawing.Size(861, 529);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private Optimization.Views.RunCollectionBubbleChartView bubbleChartView;
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.cs	(revision 14889)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualAnalysisView.cs	(revision 14889)
@@ -0,0 +1,147 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Drawing;
+using System.Linq;
+using System.Runtime.Remoting.Contexts;
+using System.Threading.Tasks;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Residual Analysis")]
+  [Content(typeof(IRegressionSolution))]
+  public partial class RegressionSolutionResidualAnalysisView : DataAnalysisSolutionEvaluationView {
+
+    public new IRegressionSolution Content {
+      get { return (IRegressionSolution)base.Content; }
+      set {
+        base.Content = value;
+      }
+    }
+
+    public RegressionSolutionResidualAnalysisView()
+      : base() {
+      InitializeComponent();
+    }
+
+    #region events
+    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);
+    }
+
+    protected virtual void Content_ProblemDataChanged(object sender, EventArgs e) {
+      OnContentChanged();
+    }
+
+    protected virtual void Content_ModelChanged(object sender, EventArgs e) {
+      OnContentChanged();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        bubbleChartView.Content = null;
+      } else {
+        UpdateBubbleChart();
+      }
+    }
+
+    private void UpdateBubbleChart() {
+      if (Content == null) return;
+      var selectedXAxis = bubbleChartView.SelectedXAxis;
+      var selectedYAxis = bubbleChartView.SelectedYAxis;
+
+      var problemData = Content.ProblemData;
+      var ds = problemData.Dataset;
+      var runs = new RunCollection();
+      // produce training and test values separately as they might overlap (e.g. for ensembles)
+      var predictedValuesTrain = Content.EstimatedTrainingValues.ToArray();
+      int j = 0; // idx for predictedValues array
+      var partitionId = "Partition";
+      while (ds.VariableNames.Contains(partitionId)) partitionId += "_";
+      foreach (var i in problemData.TrainingIndices) {
+        var run = CreateRunForIdx(i, problemData);
+        var targetValue = ds.GetDoubleValue(problemData.TargetVariable, i);
+        AddErrors(run, predictedValuesTrain[j++], targetValue);
+        run.Results.Add(partitionId, new StringValue("Training"));
+        run.Color = Color.Gold;
+        runs.Add(run);
+      }
+      var predictedValuesTest = Content.EstimatedTestValues.ToArray();
+      j = 0;
+      foreach (var i in problemData.TestIndices) {
+        var run = CreateRunForIdx(i, problemData);
+        var targetValue = ds.GetDoubleValue(problemData.TargetVariable, i);
+        AddErrors(run, predictedValuesTest[j++], targetValue);
+        run.Results.Add(partitionId, new StringValue("Test"));
+        run.Color = Color.Red;
+        runs.Add(run);
+      }
+      if (string.IsNullOrEmpty(selectedXAxis))
+        selectedXAxis = "Index";
+      if (string.IsNullOrEmpty(selectedYAxis))
+        selectedYAxis = "Residual";
+
+      bubbleChartView.Content = runs;
+      bubbleChartView.SelectedXAxis = selectedXAxis;
+      bubbleChartView.SelectedYAxis = selectedYAxis;
+    }
+
+    private void AddErrors(IRun run, double pred, double target) {
+      var residual = target - pred;
+      var relError = residual / target;
+      var predId = "Prediction";
+      while (run.Results.ContainsKey(predId)) predId += "_";
+      var resId = "Residual";
+      while (run.Results.ContainsKey(resId)) resId += "_";
+      var relErrorId = "Rel. Error";
+      while (run.Results.ContainsKey(relErrorId)) relErrorId+= "_";
+      run.Results.Add(predId, new DoubleValue(pred));
+      run.Results.Add(resId, new DoubleValue(residual));
+      run.Results.Add(relErrorId, new DoubleValue(relError));
+    }
+
+    private IRun CreateRunForIdx(int i, IRegressionProblemData problemData) {
+      var ds = problemData.Dataset;
+      var run = new Run();
+      foreach (var variableName in ds.DoubleVariables) {
+        run.Results.Add(variableName, new DoubleValue(ds.GetDoubleValue(variableName, i)));
+      }
+      foreach (var variableName in ds.StringVariables) {
+        run.Results.Add(variableName, new StringValue(ds.GetStringValue(variableName, i)));
+      }
+
+      return run;
+    }
+    #endregion
+
+  }
+}
