Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs	(revision 8689)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class ClassificationFeatureCorrelationView {
+    /// <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() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.cs	(revision 8689)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Classification Feature Correlation View")]
+  [Content(typeof(ClassificationProblemData), false)]
+  public partial class ClassificationFeatureCorrelationView : FeatureCorrelationView {
+
+    public new ClassificationProblemData Content {
+      get { return (ClassificationProblemData)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public ClassificationFeatureCorrelationView() {
+      InitializeComponent();
+    }
+
+    protected override bool[] SetInitialVisibilityOfColumns() {
+      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
+      var initialVisibility = base.SetInitialVisibilityOfColumns();
+      initialVisibility[i] = true;
+      return initialVisibility;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs	(revision 8689)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class ClassificationTimeframeFeatureCorrelationView {
+    /// <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() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs	(revision 8689)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Classification Timeframe Feature Correlation View")]
+  [Content(typeof(ClassificationProblemData), false)]
+  public partial class ClassificationTimeframeFeatureCorrelationView : TimeframeFeatureCorrelationView {
+
+    public new ClassificationProblemData Content {
+      get { return (ClassificationProblemData)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public ClassificationTimeframeFeatureCorrelationView() {
+      InitializeComponent();
+    }
+
+    protected override bool[] SetInitialVisibilityOfColumns() {
+      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
+      var initialVisibility = base.SetInitialVisibilityOfColumns();
+      initialVisibility[i] = true;
+      return initialVisibility;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs	(revision 8689)
@@ -46,4 +46,5 @@
     /// </summary>
     private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AbstractFeatureCorrelationView));
       this.DataGridView = new System.Windows.Forms.DataGridView();
@@ -59,4 +60,6 @@
       this.CalculatingPanel = new System.Windows.Forms.Panel();
       this.CalculatingLabel = new System.Windows.Forms.Label();
+      this.contextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+      this.ShowHideColumns = new System.Windows.Forms.ToolStripMenuItem();
       ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
@@ -66,4 +69,5 @@
       this.SplitContainer.SuspendLayout();
       this.CalculatingPanel.SuspendLayout();
+      this.contextMenu.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -84,4 +88,5 @@
       this.DataGridView.ColumnHeaderMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.DataGridView_ColumnHeaderMouseClick);
       this.DataGridView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.DataGridView_KeyDown);
+      this.DataGridView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.DataGridView_MouseClick);
       // 
       // HeatMapProgressBar
@@ -211,4 +216,18 @@
       this.CalculatingLabel.TabIndex = 10;
       this.CalculatingLabel.Text = "Calculating correlation...";
+      // 
+      // contextMenu
+      // 
+      this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.ShowHideColumns});
+      this.contextMenu.Name = "contextMenu";
+      this.contextMenu.Size = new System.Drawing.Size(191, 26);
+      // 
+      // ShowHideColumns
+      // 
+      this.ShowHideColumns.Name = "ShowHideColumns";
+      this.ShowHideColumns.Size = new System.Drawing.Size(190, 22);
+      this.ShowHideColumns.Text = "Show / Hide Columns";
+      this.ShowHideColumns.Click += new System.EventHandler(this.ShowHideColumns_Click);
       // 
       // AbstractFeatureCorrelationView
@@ -231,4 +250,5 @@
       this.CalculatingPanel.ResumeLayout(false);
       this.CalculatingPanel.PerformLayout();
+      this.contextMenu.ResumeLayout(false);
       this.ResumeLayout(false);
 
@@ -249,4 +269,6 @@
     protected System.Windows.Forms.Panel CalculatingPanel;
     protected System.Windows.Forms.Label CalculatingLabel;
+    protected System.Windows.Forms.ContextMenuStrip contextMenu;
+    protected System.Windows.Forms.ToolStripMenuItem ShowHideColumns;
 
   }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs	(revision 8689)
@@ -30,4 +30,5 @@
 using HeuristicLab.Common;
 using HeuristicLab.Data.Views;
+using HeuristicLab.DataAnalysis.Views;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
@@ -40,4 +41,5 @@
 
     private int[] virtualRowIndices;
+    private VariableVisibilityDialog variableVisibility;
     private List<KeyValuePair<int, SortOrder>> sortedColumnIndices;
     private StringConvertibleMatrixView.RowComparer rowComparer;
@@ -82,4 +84,8 @@
       if (Content != null) {
         fcc.ProblemData = Content;
+        bool[] initialVisibility = SetInitialVisibilityOfColumns();
+
+        variableVisibility = new VariableVisibilityDialog(Content.Dataset.DoubleVariables, initialVisibility);
+        variableVisibility.VariableVisibilityChanged += new ItemCheckEventHandler(variableVisibility_VariableVisibilityChanged);
         CalculateCorrelation();
       } else {
@@ -88,4 +94,16 @@
       }
     }
+
+    protected virtual bool[] SetInitialVisibilityOfColumns() {
+      bool[] initialVisibility = new bool[Content.Dataset.DoubleVariables.Count()];
+      int i = 0;
+      foreach (var variable in Content.Dataset.DoubleVariables) {
+        initialVisibility[i] = Content.AllowedInputVariables.Contains(variable);
+        i++;
+      }
+      return initialVisibility;
+    }
+
+    protected abstract void variableVisibility_VariableVisibilityChanged(object sender, ItemCheckEventArgs e);
 
     protected void CorrelationMeasureComboBox_SelectedChangeCommitted(object sender, System.EventArgs e) {
@@ -127,4 +145,5 @@
       for (int i = 0; i < DataGridView.ColumnCount; i++) {
         DataGridView.Columns[i].HeaderText = currentCorrelation.ColumnNames.ElementAt(i);
+        DataGridView.Columns[i].Visible = variableVisibility.Visibility[i];
       }
     }
@@ -132,4 +151,5 @@
       for (int i = 0; i < DataGridView.RowCount; i++) {
         DataGridView.Rows[i].HeaderCell.Value = currentCorrelation.RowNames.ElementAt(virtualRowIndices[i]);
+        DataGridView.Rows[i].Visible = variableVisibility.Visibility[virtualRowIndices[i]];
       }
     }
@@ -169,4 +189,7 @@
 
     protected virtual Color GetDataPointColor(double value, double min, double max) {
+      if (double.IsNaN(value)) {
+        return Color.DarkGray;
+      }
       IList<Color> colors = ColorGradient.Colors;
       int index = (int)((colors.Count - 1) * (value - min) / (max - min));
@@ -301,4 +324,27 @@
     }
     #endregion
+
+    protected void ShowHideColumns_Click(object sender, EventArgs e) {
+      variableVisibility.ShowDialog();
+    }
+
+    protected void DataGridView_MouseClick(object sender, MouseEventArgs e) {
+      if (Content == null) return;
+      if (e.Button == MouseButtons.Right && DataGridView.Columns.Count != 0)
+        contextMenu.Show(MousePosition);
+    }
+
+    protected int GetRowIndexOfVirtualindex(int virtualIndex) {
+      if (virtualIndex < 0 || virtualIndex >= virtualRowIndices.Length) {
+        throw new ArgumentException("Virtual index is out of bounds");
+      }
+
+      for (int i = 0; i < virtualRowIndices.Length; i++) {
+        if (virtualRowIndices[i] == virtualIndex) {
+          return i;
+        }
+      }
+      throw new ArgumentException("Virtual index was not found!");
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.resx
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.resx	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.resx	(revision 8689)
@@ -1020,3 +1020,6 @@
 </value>
   </data>
+  <metadata name="contextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
 </root>
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs	(revision 8689)
@@ -78,4 +78,9 @@
       }
     }
+
+    protected override void variableVisibility_VariableVisibilityChanged(object sender, ItemCheckEventArgs e) {
+      DataGridView.Columns[e.Index].Visible = e.NewValue == CheckState.Checked;
+      DataGridView.Rows[GetRowIndexOfVirtualindex(e.Index)].Visible = e.NewValue == CheckState.Checked;
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs	(revision 8689)
@@ -107,4 +107,8 @@
       }
     }
+
+    protected override void variableVisibility_VariableVisibilityChanged(object sender, ItemCheckEventArgs e) {
+      DataGridView.Rows[GetRowIndexOfVirtualindex(e.Index)].Visible = e.NewValue == CheckState.Checked;
+    }
   }
 }
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.Designer.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.Designer.cs	(revision 8689)
@@ -0,0 +1,112 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.DataAnalysis.Views {
+  partial class VariableVisibilityDialog {
+    /// <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 Windows Form 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.checkedListBox = new System.Windows.Forms.CheckedListBox();
+      this.btnShowAll = new System.Windows.Forms.Button();
+      this.btnHideAll = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // checkedListBox
+      // 
+      this.checkedListBox.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.checkedListBox.CheckOnClick = true;
+      this.checkedListBox.FormattingEnabled = true;
+      this.checkedListBox.Location = new System.Drawing.Point(12, 12);
+      this.checkedListBox.Name = "checkedListBox";
+      this.checkedListBox.Size = new System.Drawing.Size(309, 289);
+      this.checkedListBox.TabIndex = 0;
+      this.checkedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox_ItemCheck);
+      // 
+      // btnShowAll
+      // 
+      this.btnShowAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.btnShowAll.Location = new System.Drawing.Point(12, 315);
+      this.btnShowAll.Name = "btnShowAll";
+      this.btnShowAll.Size = new System.Drawing.Size(75, 23);
+      this.btnShowAll.TabIndex = 1;
+      this.btnShowAll.Text = "Show all";
+      this.btnShowAll.UseVisualStyleBackColor = true;
+      this.btnShowAll.Click += new System.EventHandler(this.btnShowAll_Click);
+      // 
+      // btnHideAll
+      // 
+      this.btnHideAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.btnHideAll.Location = new System.Drawing.Point(101, 315);
+      this.btnHideAll.Name = "btnHideAll";
+      this.btnHideAll.Size = new System.Drawing.Size(75, 23);
+      this.btnHideAll.TabIndex = 2;
+      this.btnHideAll.Text = "Hide all";
+      this.btnHideAll.UseVisualStyleBackColor = true;
+      this.btnHideAll.Click += new System.EventHandler(this.btnHideAll_Click);
+      // 
+      // ColumnsVisibilityDialog
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.ClientSize = new System.Drawing.Size(332, 350);
+      this.Controls.Add(this.btnHideAll);
+      this.Controls.Add(this.btnShowAll);
+      this.Controls.Add(this.checkedListBox);
+      this.MaximizeBox = false;
+      this.MinimizeBox = false;
+      this.Name = "ColumnsVisibilityDialog";
+      this.ShowIcon = false;
+      this.ShowInTaskbar = false;
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+      this.Text = "Show/Hide Columns";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.CheckedListBox checkedListBox;
+    private System.Windows.Forms.Button btnShowAll;
+    private System.Windows.Forms.Button btnHideAll;
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/VariableVisibilityDialog.cs	(revision 8689)
@@ -0,0 +1,76 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using System.Windows.Forms;
+
+namespace HeuristicLab.DataAnalysis.Views {
+  public partial class VariableVisibilityDialog : Form {
+    public VariableVisibilityDialog() {
+      InitializeComponent();
+    }
+
+    public VariableVisibilityDialog(IEnumerable<string> columns, IEnumerable<bool> visibility)
+      : this() {
+      if (columns.Count() != visibility.Count()) {
+        throw new ArgumentException("There have to be as many variables as values for visibility!");
+      }
+      this.columns = columns.ToList();
+      this.visibility = visibility.ToList();
+      UpdateCheckBoxes();
+    }
+
+    private List<string> columns;
+    public IList<string> Columns {
+      get { return this.columns; }
+    }
+    private List<bool> visibility;
+    public IList<bool> Visibility {
+      get { return this.visibility; }
+    }
+
+    private void UpdateCheckBoxes() {
+      for (int i = 0; i < columns.Count; i++) {
+        checkedListBox.Items.Add(columns[i], visibility[i]);
+      }
+    }
+
+    public event ItemCheckEventHandler VariableVisibilityChanged;
+
+    private void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+      this.visibility[e.Index] = e.NewValue == CheckState.Checked;
+      if (VariableVisibilityChanged != null) {
+        VariableVisibilityChanged(this, e);
+      }
+    }
+
+    private void btnShowAll_Click(object sender, System.EventArgs e) {
+      for (int i = 0; i < checkedListBox.Items.Count; i++)
+        checkedListBox.SetItemChecked(i, true);
+    }
+    private void btnHideAll_Click(object sender, System.EventArgs e) {
+      for (int i = 0; i < checkedListBox.Items.Count; i++)
+        checkedListBox.SetItemChecked(i, false);
+    }
+  }
+}
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 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8689)
@@ -126,4 +126,16 @@
       <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon>
     </Compile>
+    <Compile Include="Classification\ClassificationFeatureCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\ClassificationFeatureCorrelationView.Designer.cs">
+      <DependentUpon>ClassificationFeatureCorrelationView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Classification\ClassificationTimeframeFeatureCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Classification\ClassificationTimeframeFeatureCorrelationView.Designer.cs">
+      <DependentUpon>ClassificationTimeframeFeatureCorrelationView.cs</DependentUpon>
+    </Compile>
     <Compile Include="Classification\DiscriminantFunctionClassificationModelView.cs">
       <SubType>UserControl</SubType>
@@ -149,4 +161,10 @@
     <Compile Include="DataAnalysisSolutionEvaluationView.Designer.cs">
       <DependentUpon>DataAnalysisSolutionEvaluationView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="FeatureCorrelation\VariableVisibilityDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FeatureCorrelation\VariableVisibilityDialog.Designer.cs">
+      <DependentUpon>VariableVisibilityDialog.cs</DependentUpon>
     </Compile>
     <Compile Include="FeatureCorrelation\FeatureCorrelationView.cs">
@@ -164,4 +182,16 @@
     <Compile Include="ProblemDataView.Designer.cs">
       <DependentUpon>ProblemDataView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Regression\RegressionFeatureCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Regression\RegressionFeatureCorrelationView.Designer.cs">
+      <DependentUpon>RegressionFeatureCorrelationView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Regression\RegressionTimeframeFeatureCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Regression\RegressionTimeframeFeatureCorrelationView.Designer.cs">
+      <DependentUpon>RegressionTimeframeFeatureCorrelationView.cs</DependentUpon>
     </Compile>
     <Compile Include="Regression\RegressionEnsembleSolutionModelView.cs">
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs	(revision 8689)
@@ -45,8 +45,6 @@
 
     protected void FeatureCorrelationButton_Click(object sender, System.EventArgs e) {
-      ViewHost viewHost = new ViewHost();
-      viewHost.Content = (DataAnalysisProblemData)this.Content.Clone();
-      viewHost.ViewType = typeof(FeatureCorrelationView);
-      viewHost.Show();
+      Type viewType = MainFormManager.GetViewTypes(this.Content.GetType(), true).FirstOrDefault(t => typeof(AbstractFeatureCorrelationView).IsAssignableFrom(t));
+      MainFormManager.MainForm.ShowContent(Content, viewType);
     }
 
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs	(revision 8689)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class RegressionFeatureCorrelationView {
+    /// <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() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.cs	(revision 8689)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Regression Feature Correlation View")]
+  [Content(typeof(RegressionProblemData), false)]
+  public partial class RegressionFeatureCorrelationView : FeatureCorrelationView {
+
+    public new RegressionProblemData Content {
+      get { return (RegressionProblemData)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public RegressionFeatureCorrelationView() {
+      InitializeComponent();
+    }
+
+    protected override bool[] SetInitialVisibilityOfColumns() {
+      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
+      var initialVisibility = base.SetInitialVisibilityOfColumns();
+      initialVisibility[i] = true;
+      return initialVisibility;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs	(revision 8689)
@@ -0,0 +1,32 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class RegressionTimeframeFeatureCorrelationView {
+    /// <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() {
+      components = new System.ComponentModel.Container();
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs	(revision 8689)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs	(revision 8689)
@@ -0,0 +1,46 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Regression Timeframe Feature Correlation View")]
+  [Content(typeof(RegressionProblemData), false)]
+  public partial class RegressionTimeframeFeatureCorrelationView : TimeframeFeatureCorrelationView {
+
+    public new RegressionProblemData Content {
+      get { return (RegressionProblemData)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public RegressionTimeframeFeatureCorrelationView() {
+      InitializeComponent();
+    }
+
+    protected override bool[] SetInitialVisibilityOfColumns() {
+      int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
+      var initialVisibility = base.SetInitialVisibilityOfColumns();
+      initialVisibility[i] = true;
+      return initialVisibility;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation/FeatureCorrelationCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation/FeatureCorrelationCalculator.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation/FeatureCorrelationCalculator.cs	(revision 8689)
@@ -111,5 +111,5 @@
 
       IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
-      OnlineCalculatorError error;
+      OnlineCalculatorError error = OnlineCalculatorError.None;
       int length = doubleVariableNames.Count;
       double[,] elements = new double[length, length];
@@ -124,5 +124,4 @@
             return;
           }
-
           IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
           IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
@@ -130,9 +129,8 @@
           elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
 
+          if (!error.Equals(OnlineCalculatorError.None)) {
+            elements[i, j] = double.NaN;
+          }
           elements[j, i] = elements[i, j];
-          if (!error.Equals(OnlineCalculatorError.None)) {
-            worker.ReportProgress(100);
-            throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator.");
-          }
           worker.ReportProgress((int)Math.Round((((Math.Pow(i, 2) + i) / 2 + j + 1.0) / calculations) * 100));
         }
@@ -153,5 +151,5 @@
 
       IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
-      OnlineCalculatorError error;
+      OnlineCalculatorError error = OnlineCalculatorError.None;
       int length = doubleVariableNames.Count;
       double[,] elements = new double[length, frames + 1];
@@ -186,6 +184,5 @@
 
           if (!error.Equals(OnlineCalculatorError.None)) {
-            worker.ReportProgress(100);
-            throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator.");
+            elements[i, j] = double.NaN;
           }
           worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/SpearmansRankCorrelationCoefficientCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/SpearmansRankCorrelationCoefficientCalculator.cs	(revision 8688)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/SpearmansRankCorrelationCoefficientCalculator.cs	(revision 8689)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -27,6 +28,13 @@
 
     public static double Calculate(IEnumerable<double> originalValues, IEnumerable<double> estimatedValues, out OnlineCalculatorError errorState) {
-      double rs = alglib.basestat.spearmancorr2(originalValues.ToArray(), estimatedValues.ToArray(), originalValues.Count());
-      errorState = OnlineCalculatorError.None;
+      double rs = double.NaN;
+      try {
+        rs = alglib.basestat.spearmancorr2(originalValues.ToArray(), estimatedValues.ToArray(), originalValues.Count());
+        errorState = OnlineCalculatorError.None;
+      }
+      catch (Exception ex) {
+        errorState = OnlineCalculatorError.InvalidValueAdded;
+      }
+
       return rs;
     }
