Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs	(revision 8491)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.Designer.cs	(revision 8492)
@@ -34,6 +34,11 @@
       this.maximumLabel = new System.Windows.Forms.Label();
       this.PictureBox = new System.Windows.Forms.PictureBox();
+      this.SplitContainer = new System.Windows.Forms.SplitContainer();
       ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).BeginInit();
       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
+      this.SplitContainer.Panel1.SuspendLayout();
+      this.SplitContainer.Panel2.SuspendLayout();
+      this.SplitContainer.SuspendLayout();
       this.SuspendLayout();
       // 
@@ -42,12 +47,10 @@
       this.DataGridView.AllowUserToAddRows = false;
       this.DataGridView.AllowUserToDeleteRows = false;
-      this.DataGridView.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.DataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-      this.DataGridView.Location = new System.Drawing.Point(3, 33);
+      this.DataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.DataGridView.Location = new System.Drawing.Point(0, 0);
       this.DataGridView.Name = "DataGridView";
       this.DataGridView.ReadOnly = true;
-      this.DataGridView.Size = new System.Drawing.Size(535, 300);
+      this.DataGridView.Size = new System.Drawing.Size(475, 301);
       this.DataGridView.TabIndex = 0;
       this.DataGridView.VirtualMode = true;
@@ -60,8 +63,8 @@
       this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                   | System.Windows.Forms.AnchorStyles.Right)));
-      this.HeatMapProgressBar.Location = new System.Drawing.Point(476, 6);
+      this.HeatMapProgressBar.Location = new System.Drawing.Point(490, 6);
       this.HeatMapProgressBar.Name = "HeatMapProgressBar";
       this.HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
-      this.HeatMapProgressBar.Size = new System.Drawing.Size(141, 21);
+      this.HeatMapProgressBar.Size = new System.Drawing.Size(76, 21);
       this.HeatMapProgressBar.TabIndex = 9;
       this.HeatMapProgressBar.Visible = false;
@@ -70,7 +73,7 @@
       // 
       this.PartitionComboBox.FormattingEnabled = true;
-      this.PartitionComboBox.Location = new System.Drawing.Point(336, 6);
+      this.PartitionComboBox.Location = new System.Drawing.Point(348, 3);
       this.PartitionComboBox.Name = "PartitionComboBox";
-      this.PartitionComboBox.Size = new System.Drawing.Size(134, 21);
+      this.PartitionComboBox.Size = new System.Drawing.Size(124, 21);
       this.PartitionComboBox.TabIndex = 8;
       this.PartitionComboBox.SelectedIndexChanged += new System.EventHandler(this.PartitionComboBox_SelectedIndexChanged);
@@ -79,5 +82,5 @@
       // 
       this.CorrelationCalcLabel.AutoSize = true;
-      this.CorrelationCalcLabel.Location = new System.Drawing.Point(3, 9);
+      this.CorrelationCalcLabel.Location = new System.Drawing.Point(0, 6);
       this.CorrelationCalcLabel.Name = "CorrelationCalcLabel";
       this.CorrelationCalcLabel.Size = new System.Drawing.Size(104, 13);
@@ -88,5 +91,5 @@
       // 
       this.CorrelationCalcComboBox.FormattingEnabled = true;
-      this.CorrelationCalcComboBox.Location = new System.Drawing.Point(113, 6);
+      this.CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);
       this.CorrelationCalcComboBox.Name = "CorrelationCalcComboBox";
       this.CorrelationCalcComboBox.Size = new System.Drawing.Size(163, 21);
@@ -97,5 +100,5 @@
       // 
       this.PartitionLabel.AutoSize = true;
-      this.PartitionLabel.Location = new System.Drawing.Point(282, 9);
+      this.PartitionLabel.Location = new System.Drawing.Point(279, 6);
       this.PartitionLabel.Name = "PartitionLabel";
       this.PartitionLabel.Size = new System.Drawing.Size(48, 13);
@@ -107,5 +110,5 @@
       this.minimumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
       this.minimumLabel.BackColor = System.Drawing.Color.Transparent;
-      this.minimumLabel.Location = new System.Drawing.Point(544, 314);
+      this.minimumLabel.Location = new System.Drawing.Point(487, 314);
       this.minimumLabel.Name = "minimumLabel";
       this.minimumLabel.Size = new System.Drawing.Size(73, 19);
@@ -118,5 +121,5 @@
       this.maximumLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
       this.maximumLabel.BackColor = System.Drawing.Color.Transparent;
-      this.maximumLabel.Location = new System.Drawing.Point(544, 30);
+      this.maximumLabel.Location = new System.Drawing.Point(487, 30);
       this.maximumLabel.Name = "maximumLabel";
       this.maximumLabel.Size = new System.Drawing.Size(73, 25);
@@ -131,5 +134,5 @@
       this.PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
       this.PictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));
-      this.PictureBox.Location = new System.Drawing.Point(564, 58);
+      this.PictureBox.Location = new System.Drawing.Point(507, 58);
       this.PictureBox.Name = "PictureBox";
       this.PictureBox.Size = new System.Drawing.Size(35, 253);
@@ -138,23 +141,48 @@
       this.PictureBox.TabStop = false;
       // 
-      // DataGridExtendedHeatMapView
+      // SplitContainer
+      // 
+      this.SplitContainer.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.SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+      this.SplitContainer.IsSplitterFixed = true;
+      this.SplitContainer.Location = new System.Drawing.Point(3, 3);
+      this.SplitContainer.Name = "SplitContainer";
+      this.SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // SplitContainer.Panel1
+      // 
+      this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcLabel);
+      this.SplitContainer.Panel1.Controls.Add(this.CorrelationCalcComboBox);
+      this.SplitContainer.Panel1.Controls.Add(this.PartitionComboBox);
+      this.SplitContainer.Panel1.Controls.Add(this.PartitionLabel);
+      // 
+      // SplitContainer.Panel2
+      // 
+      this.SplitContainer.Panel2.Controls.Add(this.DataGridView);
+      this.SplitContainer.Size = new System.Drawing.Size(475, 330);
+      this.SplitContainer.SplitterDistance = 25;
+      this.SplitContainer.TabIndex = 16;
+      // 
+      // FeatureCorrelationView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.SplitContainer);
       this.Controls.Add(this.minimumLabel);
+      this.Controls.Add(this.HeatMapProgressBar);
+      this.Controls.Add(this.PictureBox);
       this.Controls.Add(this.maximumLabel);
-      this.Controls.Add(this.PictureBox);
-      this.Controls.Add(this.PartitionLabel);
-      this.Controls.Add(this.HeatMapProgressBar);
-      this.Controls.Add(this.PartitionComboBox);
-      this.Controls.Add(this.CorrelationCalcLabel);
-      this.Controls.Add(this.CorrelationCalcComboBox);
-      this.Controls.Add(this.DataGridView);
-      this.Name = "DataGridExtendedHeatMapView";
-      this.Size = new System.Drawing.Size(620, 336);
+      this.Name = "FeatureCorrelationView";
+      this.Size = new System.Drawing.Size(569, 336);
       ((System.ComponentModel.ISupportInitialize)(this.DataGridView)).EndInit();
       ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
+      this.SplitContainer.Panel1.ResumeLayout(false);
+      this.SplitContainer.Panel1.PerformLayout();
+      this.SplitContainer.Panel2.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
+      this.SplitContainer.ResumeLayout(false);
       this.ResumeLayout(false);
-      this.PerformLayout();
 
     }
@@ -162,6 +190,6 @@
     #endregion
 
-    private System.Windows.Forms.DataGridView DataGridView;
-    private System.Windows.Forms.ProgressBar HeatMapProgressBar;
+    protected System.Windows.Forms.DataGridView DataGridView;
+    protected System.Windows.Forms.ProgressBar HeatMapProgressBar;
     protected System.Windows.Forms.ComboBox PartitionComboBox;
     protected System.Windows.Forms.Label CorrelationCalcLabel;
@@ -171,4 +199,5 @@
     protected System.Windows.Forms.Label maximumLabel;
     protected System.Windows.Forms.PictureBox PictureBox;
+    protected System.Windows.Forms.SplitContainer SplitContainer;
 
   }
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs	(revision 8491)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelationView.cs	(revision 8492)
@@ -55,9 +55,9 @@
       base.RegisterContentEvents();
       Content.ProgressCalculation += new DataAnalysis.FeatureCorrelation.ProgressCalculationHandler(Content_ProgressCalculation);
-      Content.Reset += new System.EventHandler(Content_Reset);
+      Content.CorrelationCalculationFinished += new System.EventHandler(Content_CorrelationCalculationFinished);
     }
 
     protected override void DeregisterContentEvents() {
-      Content.Reset -= new System.EventHandler(Content_Reset);
+      Content.CorrelationCalculationFinished -= new System.EventHandler(Content_CorrelationCalculationFinished);
       Content.ProgressCalculation -= new DataAnalysis.FeatureCorrelation.ProgressCalculationHandler(Content_ProgressCalculation);
       base.DeregisterContentEvents();
@@ -69,5 +69,4 @@
       } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {
         HeatMapProgressBar.Hide();
-        DataGridView.Enabled = true;
       }
       HeatMapProgressBar.Value = e.ProgressPercentage;
@@ -80,16 +79,16 @@
         CorrelationCalcComboBox.DataSource = Content.CorrelationCalculators;
         PartitionComboBox.DataSource = Content.Partitions;
-        CalculateHeatMap();
+        CalculateCorrelation();
       }
     }
 
     protected void CorrelationMeasureComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
-      CalculateHeatMap();
+      CalculateCorrelation();
     }
     protected void PartitionComboBox_SelectedIndexChanged(object sender, System.EventArgs e) {
-      CalculateHeatMap();
-    }
-
-    protected void CalculateHeatMap() {
+      CalculateCorrelation();
+    }
+
+    protected virtual void CalculateCorrelation() {
       string calc = (string)CorrelationCalcComboBox.SelectedItem;
       string partition = (string)PartitionComboBox.SelectedItem;
@@ -97,5 +96,4 @@
         DataGridView.Enabled = false;
         Content.Recalculate(calc, partition);
-        base.OnContentChanged();
       }
     }
@@ -115,4 +113,5 @@
       DataGridView.RowCount = Content.Rows;
 
+      ClearSorting();
       UpdateColumnHeaders();
       UpdateRowHeaders();
@@ -137,8 +136,8 @@
     }
 
-    protected void Content_Reset(object sender, System.EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Reset), sender, e);
-      else {
+    protected void Content_CorrelationCalculationFinished(object sender, System.EventArgs e) {
+      if (InvokeRequired) {
+        Invoke(new EventHandler(Content_CorrelationCalculationFinished), sender, e);
+      } else {
         UpdateDataGrid();
       }
@@ -159,4 +158,9 @@
       if (index < 0) index = 0;
       return colors[index];
+    }
+
+    protected override void OnShown(ViewShownEventArgs e) {
+      base.OnShown(e);
+      CalculateCorrelation();
     }
 
@@ -190,4 +194,10 @@
     }
 
+    protected virtual void ClearSorting() {
+      virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray();
+      sortedColumnIndices.Clear();
+      UpdateSortGlyph();
+    }
+
     private void Sort() {
       virtualRowIndices = Sort(sortedColumnIndices);
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8491)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 8492)
@@ -172,4 +172,10 @@
       <DependentUpon>ClassificationEnsembleSolutionModelView.cs</DependentUpon>
     </Compile>
+    <Compile Include="TimeframeFeatureCorrelationView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="TimeframeFeatureCorrelationView.Designer.cs">
+      <DependentUpon>TimeframeFeatureCorrelationView.cs</DependentUpon>
+    </Compile>
     <Compile Include="FeatureCorrelationView.cs">
       <SubType>UserControl</SubType>
@@ -348,4 +354,7 @@
     <EmbeddedResource Include="FeatureCorrelationView.resx">
       <DependentUpon>FeatureCorrelationView.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="TimeframeFeatureCorrelationView.resx">
+      <DependentUpon>TimeframeFeatureCorrelationView.cs</DependentUpon>
     </EmbeddedResource>
   </ItemGroup>
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs	(revision 8492)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.Designer.cs	(revision 8492)
@@ -0,0 +1,112 @@
+﻿namespace HeuristicLab.Problems.DataAnalysis.Views {
+  partial class TimeframeFeatureCorrelationView {
+    /// <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.VariableSelectionLabel = new System.Windows.Forms.Label();
+      this.VariableSelectionComboBox = new System.Windows.Forms.ComboBox();
+      this.TimeFrameLabel = new System.Windows.Forms.Label();
+      this.TimeframeComboBox = new System.Windows.Forms.ComboBox();
+      ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
+      this.SplitContainer.Panel1.SuspendLayout();
+      this.SplitContainer.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // maximumLabel
+      // 
+      this.maximumLabel.Location = new System.Drawing.Point(487, 62);
+      // 
+      // PictureBox
+      // 
+      this.PictureBox.Location = new System.Drawing.Point(506, 91);
+      this.PictureBox.Size = new System.Drawing.Size(35, 220);
+      // 
+      // SplitContainer
+      // 
+      // 
+      // SplitContainer.Panel1
+      // 
+      this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionComboBox);
+      this.SplitContainer.Panel1.Controls.Add(this.TimeframeComboBox);
+      this.SplitContainer.Panel1.Controls.Add(this.TimeFrameLabel);
+      this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionLabel);
+      this.SplitContainer.SplitterDistance = 52;
+      // 
+      // VariableSelectionLabel
+      // 
+      this.VariableSelectionLabel.AutoSize = true;
+      this.VariableSelectionLabel.Location = new System.Drawing.Point(0, 33);
+      this.VariableSelectionLabel.Name = "VariableSelectionLabel";
+      this.VariableSelectionLabel.Size = new System.Drawing.Size(81, 13);
+      this.VariableSelectionLabel.TabIndex = 16;
+      this.VariableSelectionLabel.Text = "Select Variable:";
+      // 
+      // VariableSelectionComboBox
+      // 
+      this.VariableSelectionComboBox.FormattingEnabled = true;
+      this.VariableSelectionComboBox.Location = new System.Drawing.Point(110, 30);
+      this.VariableSelectionComboBox.Name = "VariableSelectionComboBox";
+      this.VariableSelectionComboBox.Size = new System.Drawing.Size(163, 21);
+      this.VariableSelectionComboBox.TabIndex = 17;
+      this.VariableSelectionComboBox.SelectedIndexChanged += new System.EventHandler(this.VariableSelectionComboBox_SelectedIndexChanged);
+      // 
+      // TimeFrameLabel
+      // 
+      this.TimeFrameLabel.AutoSize = true;
+      this.TimeFrameLabel.Location = new System.Drawing.Point(279, 33);
+      this.TimeFrameLabel.Name = "TimeFrameLabel";
+      this.TimeFrameLabel.Size = new System.Drawing.Size(59, 13);
+      this.TimeFrameLabel.TabIndex = 18;
+      this.TimeFrameLabel.Text = "Timeframe:";
+      // 
+      // TimeframeComboBox
+      // 
+      this.TimeframeComboBox.FormattingEnabled = true;
+      this.TimeframeComboBox.Location = new System.Drawing.Point(348, 30);
+      this.TimeframeComboBox.Name = "TimeframeComboBox";
+      this.TimeframeComboBox.Size = new System.Drawing.Size(124, 21);
+      this.TimeframeComboBox.TabIndex = 19;
+      this.TimeframeComboBox.SelectedIndexChanged += new System.EventHandler(this.TimeframeComboBox_SelectedIndexChanged);
+      // 
+      // TimeframeFeatureCorrelationView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Name = "TimeframeFeatureCorrelationView";
+      ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
+      this.SplitContainer.Panel1.ResumeLayout(false);
+      this.SplitContainer.Panel1.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
+      this.SplitContainer.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+    #endregion
+
+    protected System.Windows.Forms.Label VariableSelectionLabel;
+    protected System.Windows.Forms.ComboBox VariableSelectionComboBox;
+    protected System.Windows.Forms.Label TimeFrameLabel;
+    protected System.Windows.Forms.ComboBox TimeframeComboBox;
+  }
+}
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs	(revision 8492)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.cs	(revision 8492)
@@ -0,0 +1,73 @@
+﻿#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.Linq;
+using System.Windows.Forms;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Timeframe Feature Correlation View")]
+  [Content(typeof(FeatureCorrelation), false)]
+  public partial class TimeframeFeatureCorrelationView : FeatureCorrelationView {
+
+    public new FeatureCorrelation Content {
+      get { return (FeatureCorrelation)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public TimeframeFeatureCorrelationView() {
+      InitializeComponent();
+      TimeframeComboBox.DataSource = Enumerable.Range(0, 16).ToList<int>();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null) {
+        VariableSelectionComboBox.DataSource = Content.RowNames.ToList();
+      }
+    }
+
+    protected void VariableSelectionComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      CalculateCorrelation();
+    }
+    protected void TimeframeComboBox_SelectedIndexChanged(object sender, EventArgs e) {
+      CalculateCorrelation();
+    }
+
+    protected override void CalculateCorrelation() {
+      string calc = (string)CorrelationCalcComboBox.SelectedItem;
+      string partition = (string)PartitionComboBox.SelectedItem;
+      string variable = (string)VariableSelectionComboBox.SelectedItem;
+      if (calc != null && partition != null && variable != null) {
+        DataGridView.Enabled = false;
+        int frames = (int)TimeframeComboBox.SelectedItem;
+        Content.CalculateTimeframeElements(calc, partition, variable, frames);
+      }
+    }
+
+    protected override void UpdateColumnHeaders() {
+      for (int i = 0; i < DataGridView.ColumnCount; i++) {
+        DataGridView.Columns[i].HeaderText = i.ToString();
+      }
+    }
+  }
+}
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.resx
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.resx	(revision 8492)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeframeFeatureCorrelationView.resx	(revision 8492)
@@ -0,0 +1,120 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
Index: /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs
===================================================================
--- /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs	(revision 8491)
+++ /branches/DatasetFeatureCorrelation/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/FeatureCorrelation.cs	(revision 8492)
@@ -98,9 +98,13 @@
     }
 
+    public void CalculateTimeframeElements(string calc, string partition, string variable, int frames) {
+      CalculateElements(problemData.Dataset, calc, partition, variable, frames);
+    }
+
     private void CalculateElements(Dataset dataset) {
       CalculateElements(dataset, CorrelationCalculators.First(), Partitions.First());
     }
 
-    private void CalculateElements(Dataset dataset, string calc, string partition) {
+    private void CalculateElements(Dataset dataset, string calc, string partition, string variable = null, int frames = 0) {
       if (bw == null || bw.IsBusy) {
         if (bw != null) {
@@ -110,9 +114,9 @@
         bw.WorkerReportsProgress = true;
         bw.WorkerSupportsCancellation = true;
-        bw.DoWork += new DoWorkEventHandler(bw_DoWork);
-        bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged);
-        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);
-      }
-      bw.RunWorkerAsync(new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition });
+        bw.DoWork += new DoWorkEventHandler(BwDoWork);
+        bw.ProgressChanged += new ProgressChangedEventHandler(BwProgressChanged);
+        bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(BwRunWorkerCompleted);
+      }
+      bw.RunWorkerAsync(new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames });
       if (calc.Equals(PearsonsR) || calc.Equals(SpearmansRank)) {
         Maximum = 1.0;
@@ -127,5 +131,15 @@
     }
 
-    private void bw_DoWork(object sender, DoWorkEventArgs e) {
+    #region backgroundworker
+    private void BwDoWork(object sender, DoWorkEventArgs e) {
+      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
+      if (bwInfo.Variable == null) {
+        BwCalculateCorrelation(sender, e);
+      } else {
+        BwCalculateTimeframeCorrelation(sender, e);
+      }
+    }
+
+    private void BwCalculateCorrelation(object sender, DoWorkEventArgs e) {
       BackgroundWorker worker = sender as BackgroundWorker;
 
@@ -139,5 +153,4 @@
       int length = doubleVariableNames.Count;
       double[,] elements = new double[length, length];
-
       double calculations = (Math.Pow(length, 2) + length) / 2;
 
@@ -151,23 +164,9 @@
           }
 
-          IEnumerable<double> var1 = dataset.GetDoubleValues(doubleVariableNames[i]);
-          IEnumerable<double> var2 = dataset.GetDoubleValues(doubleVariableNames[j]);
-          if (partition.Equals(TrainingSamples)) {
-            var1 = var1.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
-            var2 = var2.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
-          } else if (partition.Equals(TestSamples)) {
-            var1 = var1.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
-            var2 = var2.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
-          }
-
-          if (calc.Equals(HoeffdingsDependence)) {
-            elements[i, j] = HoeffdingsDependenceCalculator.Calculate(var1, var2, out error);
-          } else if (calc.Equals(SpearmansRank)) {
-            elements[i, j] = SpearmansRankCorrelationCoefficientCalculator.Calculate(var1, var2, out error);
-          } else if (calc.Equals(PearsonsRSquared)) {
-            elements[i, j] = OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error);
-          } else {
-            elements[i, j] = OnlinePearsonsRSquaredCalculator.CalculateR(var1, var2, out error);
-          }
+          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
+          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
+
+          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
+
           elements[j, i] = elements[i, j];
           if (!error.Equals(OnlineCalculatorError.None)) {
@@ -181,5 +180,72 @@
     }
 
-    private void bw_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
+    private void BwCalculateTimeframeCorrelation(object sender, DoWorkEventArgs e) {
+      BackgroundWorker worker = sender as BackgroundWorker;
+
+      BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
+      Dataset dataset = bwInfo.Dataset;
+      string partition = bwInfo.Partition;
+      string calc = bwInfo.Calculator;
+      string variable = bwInfo.Variable;
+      int frames = bwInfo.Frames;
+
+      IList<string> doubleVariableNames = dataset.DoubleVariables.ToList();
+      OnlineCalculatorError error;
+      int length = doubleVariableNames.Count;
+      double[,] elements = new double[length, frames + 1];
+      double calculations = (frames + 1) * length;
+
+      worker.ReportProgress(0);
+
+      for (int i = 0; i < length; i++) {
+        for (int j = 0; j <= frames; j++) {
+          if (worker.CancellationPending) {
+            e.Cancel = true;
+            return;
+          }
+
+          IEnumerable<double> var1 = GetRelevantValues(problemData, partition, variable);
+          IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
+
+          var valuesInFrame = var1.Take(j);
+          var help = var1.Skip(j).ToList();
+          help.AddRange(valuesInFrame);
+          var1 = help;
+
+          elements[i, j] = CalculateElementWithCalculator(calc, var1, var2, out error);
+
+          if (!error.Equals(OnlineCalculatorError.None)) {
+            worker.ReportProgress(100);
+            throw new ArgumentException("Calculator returned " + error + Environment.NewLine + "Maybe try another calculator.");
+          }
+          worker.ReportProgress((int)((100.0 / calculations) * (i * (frames + 1) + j + 1)));
+        }
+      }
+      e.Result = elements;
+    }
+
+    private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) {
+      IEnumerable<double> var = problemData.Dataset.GetDoubleValues(variable);
+      if (partition.Equals(TrainingSamples)) {
+        var = var.Skip(problemData.TrainingPartition.Start).Take(problemData.TrainingPartition.End - problemData.TrainingPartition.Start);
+      } else if (partition.Equals(TestSamples)) {
+        var = var.Skip(problemData.TestPartition.Start).Take(problemData.TestPartition.End - problemData.TestPartition.Start);
+      }
+      return var;
+    }
+
+    private double CalculateElementWithCalculator(string calc, IEnumerable<double> var1, IEnumerable<double> var2, out OnlineCalculatorError error) {
+      if (calc.Equals(HoeffdingsDependence)) {
+        return HoeffdingsDependenceCalculator.Calculate(var1, var2, out error);
+      } else if (calc.Equals(SpearmansRank)) {
+        return SpearmansRankCorrelationCoefficientCalculator.Calculate(var1, var2, out error);
+      } else if (calc.Equals(PearsonsRSquared)) {
+        return OnlinePearsonsRSquaredCalculator.Calculate(var1, var2, out error);
+      } else {
+        return OnlinePearsonsRSquaredCalculator.CalculateR(var1, var2, out error);
+      }
+    }
+
+    private void BwRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
       BackgroundWorker worker = sender as BackgroundWorker;
       if (!e.Cancelled && !worker.CancellationPending) {
@@ -188,13 +254,21 @@
         } else {
           matrix = (double[,])e.Result;
-          OnReset();
-        }
-      }
-    }
+          OnCorrelationCalculationFinished();
+        }
+      }
+    }
+    #endregion
 
     #region events
+    public event EventHandler CorrelationCalculationFinished;
+    protected virtual void OnCorrelationCalculationFinished() {
+      EventHandler handler = CorrelationCalculationFinished;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
     public delegate void ProgressCalculationHandler(object sender, ProgressChangedEventArgs e);
     public event ProgressCalculationHandler ProgressCalculation;
-    protected void bw_ProgressChanged(object sender, ProgressChangedEventArgs e) {
+    protected void BwProgressChanged(object sender, ProgressChangedEventArgs e) {
       BackgroundWorker worker = sender as BackgroundWorker;
       if (!worker.CancellationPending && ProgressCalculation != null) {
@@ -215,4 +289,6 @@
       public string Calculator { get; set; }
       public string Partition { get; set; }
+      public string Variable { get; set; }
+      public int Frames { get; set; }
     }
   }
