Index: /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixColumnVisibilityDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixColumnVisibilityDialog.Designer.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixColumnVisibilityDialog.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Data.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Data.Views {
partial class StringConvertibleMatrixColumnVisibilityDialog {
///
Index: /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixRowVisibilityDialog.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixRowVisibilityDialog.Designer.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixRowVisibilityDialog.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Data.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Data.Views {
partial class StringConvertibleMatrixRowVisibilityDialog {
///
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Problems.DataAnalysis.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class ClassificationFeatureCorrelationView {
///
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Problems.DataAnalysis.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class ClassificationTimeframeFeatureCorrelationView {
///
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs (revision 8880)
@@ -37,4 +37,9 @@
}
+ protected override void SetVariableSelectionComboBox() {
+ base.SetVariableSelectionComboBox();
+ variableSelectionComboBox.SelectedItem = Content.TargetVariable;
+ }
+
protected override bool[] SetInitialVariableVisibility() {
int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs (revision 8880)
@@ -49,70 +49,70 @@
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AbstractFeatureCorrelationView));
- this.HeatMapProgressBar = new System.Windows.Forms.ProgressBar();
- this.PartitionComboBox = new System.Windows.Forms.ComboBox();
- this.CorrelationCalcLabel = new System.Windows.Forms.Label();
- this.CorrelationCalcComboBox = new System.Windows.Forms.ComboBox();
- this.PartitionLabel = new System.Windows.Forms.Label();
+ this.heatMapProgressBar = new System.Windows.Forms.ProgressBar();
+ this.partitionComboBox = new System.Windows.Forms.ComboBox();
+ this.correlationCalcLabel = new System.Windows.Forms.Label();
+ this.correlationCalcComboBox = new System.Windows.Forms.ComboBox();
+ this.partitionLabel = new System.Windows.Forms.Label();
this.minimumLabel = new System.Windows.Forms.Label();
this.maximumLabel = new System.Windows.Forms.Label();
- this.PictureBox = new System.Windows.Forms.PictureBox();
- this.SplitContainer = new System.Windows.Forms.SplitContainer();
- this.CalculatingPanel = new System.Windows.Forms.Panel();
- this.CalculatingLabel = new System.Windows.Forms.Label();
+ this.pictureBox = new System.Windows.Forms.PictureBox();
+ this.splitContainer = new System.Windows.Forms.SplitContainer();
+ this.calculatingPanel = new System.Windows.Forms.Panel();
+ this.calculatingLabel = new System.Windows.Forms.Label();
this.dataView = new HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView();
- ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
- this.SplitContainer.Panel1.SuspendLayout();
- this.SplitContainer.Panel2.SuspendLayout();
- this.SplitContainer.SuspendLayout();
- this.CalculatingPanel.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+ this.splitContainer.Panel1.SuspendLayout();
+ this.splitContainer.Panel2.SuspendLayout();
+ this.splitContainer.SuspendLayout();
+ this.calculatingPanel.SuspendLayout();
this.SuspendLayout();
//
// HeatMapProgressBar
//
- this.HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
- this.HeatMapProgressBar.Location = new System.Drawing.Point(25, 46);
- this.HeatMapProgressBar.Name = "HeatMapProgressBar";
- this.HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.HeatMapProgressBar.Size = new System.Drawing.Size(154, 21);
- this.HeatMapProgressBar.TabIndex = 9;
+ this.heatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
+ this.heatMapProgressBar.Location = new System.Drawing.Point(25, 46);
+ this.heatMapProgressBar.Name = "HeatMapProgressBar";
+ this.heatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.heatMapProgressBar.Size = new System.Drawing.Size(154, 21);
+ this.heatMapProgressBar.TabIndex = 9;
//
// PartitionComboBox
//
- this.PartitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.PartitionComboBox.FormattingEnabled = true;
- this.PartitionComboBox.Location = new System.Drawing.Point(333, 3);
- this.PartitionComboBox.Name = "PartitionComboBox";
- this.PartitionComboBox.Size = new System.Drawing.Size(142, 21);
- this.PartitionComboBox.TabIndex = 8;
- this.PartitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted);
+ this.partitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.partitionComboBox.FormattingEnabled = true;
+ this.partitionComboBox.Location = new System.Drawing.Point(333, 3);
+ this.partitionComboBox.Name = "PartitionComboBox";
+ this.partitionComboBox.Size = new System.Drawing.Size(142, 21);
+ this.partitionComboBox.TabIndex = 8;
+ this.partitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted);
//
// CorrelationCalcLabel
//
- this.CorrelationCalcLabel.AutoSize = true;
- this.CorrelationCalcLabel.Location = new System.Drawing.Point(0, 6);
- this.CorrelationCalcLabel.Name = "CorrelationCalcLabel";
- this.CorrelationCalcLabel.Size = new System.Drawing.Size(104, 13);
- this.CorrelationCalcLabel.TabIndex = 7;
- this.CorrelationCalcLabel.Text = "Correlation Measure:";
+ this.correlationCalcLabel.AutoSize = true;
+ this.correlationCalcLabel.Location = new System.Drawing.Point(0, 6);
+ this.correlationCalcLabel.Name = "CorrelationCalcLabel";
+ this.correlationCalcLabel.Size = new System.Drawing.Size(104, 13);
+ this.correlationCalcLabel.TabIndex = 7;
+ this.correlationCalcLabel.Text = "Correlation Measure:";
//
// CorrelationCalcComboBox
//
- this.CorrelationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.CorrelationCalcComboBox.FormattingEnabled = true;
- this.CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);
- this.CorrelationCalcComboBox.Name = "CorrelationCalcComboBox";
- this.CorrelationCalcComboBox.Size = new System.Drawing.Size(163, 21);
- this.CorrelationCalcComboBox.TabIndex = 6;
- this.CorrelationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted);
+ this.correlationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.correlationCalcComboBox.FormattingEnabled = true;
+ this.correlationCalcComboBox.Location = new System.Drawing.Point(110, 3);
+ this.correlationCalcComboBox.Name = "CorrelationCalcComboBox";
+ this.correlationCalcComboBox.Size = new System.Drawing.Size(163, 21);
+ this.correlationCalcComboBox.TabIndex = 6;
+ this.correlationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted);
//
// PartitionLabel
//
- this.PartitionLabel.AutoSize = true;
- this.PartitionLabel.Location = new System.Drawing.Point(279, 6);
- this.PartitionLabel.Name = "PartitionLabel";
- this.PartitionLabel.Size = new System.Drawing.Size(48, 13);
- this.PartitionLabel.TabIndex = 10;
- this.PartitionLabel.Text = "Partition:";
+ this.partitionLabel.AutoSize = true;
+ this.partitionLabel.Location = new System.Drawing.Point(279, 6);
+ this.partitionLabel.Name = "PartitionLabel";
+ this.partitionLabel.Size = new System.Drawing.Size(48, 13);
+ this.partitionLabel.TabIndex = 10;
+ this.partitionLabel.Text = "Partition:";
//
// minimumLabel
@@ -140,59 +140,59 @@
// PictureBox
//
- this.PictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
- 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(507, 30);
- this.PictureBox.Name = "PictureBox";
- this.PictureBox.Size = new System.Drawing.Size(35, 281);
- this.PictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
- this.PictureBox.TabIndex = 15;
- this.PictureBox.TabStop = false;
+ 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(507, 30);
+ this.pictureBox.Name = "PictureBox";
+ this.pictureBox.Size = new System.Drawing.Size(35, 281);
+ this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+ this.pictureBox.TabIndex = 15;
+ this.pictureBox.TabStop = false;
//
// SplitContainer
//
- this.SplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ 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;
+ 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);
+ 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.CalculatingPanel);
- this.SplitContainer.Panel2.Controls.Add(this.dataView);
- this.SplitContainer.Size = new System.Drawing.Size(475, 330);
- this.SplitContainer.SplitterDistance = 25;
- this.SplitContainer.TabIndex = 16;
+ this.splitContainer.Panel2.Controls.Add(this.calculatingPanel);
+ this.splitContainer.Panel2.Controls.Add(this.dataView);
+ this.splitContainer.Size = new System.Drawing.Size(475, 330);
+ this.splitContainer.SplitterDistance = 25;
+ this.splitContainer.TabIndex = 16;
//
// CalculatingPanel
//
- this.CalculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
- this.CalculatingPanel.Controls.Add(this.CalculatingLabel);
- this.CalculatingPanel.Controls.Add(this.HeatMapProgressBar);
- this.CalculatingPanel.Location = new System.Drawing.Point(138, 95);
- this.CalculatingPanel.Name = "CalculatingPanel";
- this.CalculatingPanel.Size = new System.Drawing.Size(200, 81);
- this.CalculatingPanel.TabIndex = 10;
+ this.calculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;
+ this.calculatingPanel.Controls.Add(this.calculatingLabel);
+ this.calculatingPanel.Controls.Add(this.heatMapProgressBar);
+ this.calculatingPanel.Location = new System.Drawing.Point(138, 95);
+ this.calculatingPanel.Name = "CalculatingPanel";
+ this.calculatingPanel.Size = new System.Drawing.Size(200, 81);
+ this.calculatingPanel.TabIndex = 10;
//
// CalculatingLabel
//
- this.CalculatingLabel.AutoSize = true;
- this.CalculatingLabel.Location = new System.Drawing.Point(42, 19);
- this.CalculatingLabel.Name = "CalculatingLabel";
- this.CalculatingLabel.Size = new System.Drawing.Size(120, 13);
- this.CalculatingLabel.TabIndex = 10;
- this.CalculatingLabel.Text = "Calculating correlation...";
+ this.calculatingLabel.AutoSize = true;
+ this.calculatingLabel.Location = new System.Drawing.Point(42, 19);
+ this.calculatingLabel.Name = "CalculatingLabel";
+ this.calculatingLabel.Size = new System.Drawing.Size(120, 13);
+ this.calculatingLabel.TabIndex = 10;
+ this.calculatingLabel.Text = "Calculating correlation...";
//
// DataGridView
@@ -209,18 +209,18 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.SplitContainer);
+ this.Controls.Add(this.splitContainer);
this.Controls.Add(this.minimumLabel);
- this.Controls.Add(this.PictureBox);
+ this.Controls.Add(this.pictureBox);
this.Controls.Add(this.maximumLabel);
this.Name = "AbstractFeatureCorrelationView";
this.Size = new System.Drawing.Size(569, 336);
- ((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.CalculatingPanel.ResumeLayout(false);
- this.CalculatingPanel.PerformLayout();
+ ((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.calculatingPanel.ResumeLayout(false);
+ this.calculatingPanel.PerformLayout();
this.ResumeLayout(false);
@@ -229,15 +229,15 @@
#endregion
- protected System.Windows.Forms.ProgressBar HeatMapProgressBar;
- protected System.Windows.Forms.ComboBox PartitionComboBox;
- protected System.Windows.Forms.Label CorrelationCalcLabel;
- protected System.Windows.Forms.ComboBox CorrelationCalcComboBox;
- protected System.Windows.Forms.Label PartitionLabel;
+ protected System.Windows.Forms.ProgressBar heatMapProgressBar;
+ protected System.Windows.Forms.ComboBox partitionComboBox;
+ protected System.Windows.Forms.Label correlationCalcLabel;
+ protected System.Windows.Forms.ComboBox correlationCalcComboBox;
+ protected System.Windows.Forms.Label partitionLabel;
protected System.Windows.Forms.Label minimumLabel;
protected System.Windows.Forms.Label maximumLabel;
- protected System.Windows.Forms.PictureBox PictureBox;
- protected System.Windows.Forms.SplitContainer SplitContainer;
- protected System.Windows.Forms.Panel CalculatingPanel;
- protected System.Windows.Forms.Label CalculatingLabel;
+ protected System.Windows.Forms.PictureBox pictureBox;
+ protected System.Windows.Forms.SplitContainer splitContainer;
+ protected System.Windows.Forms.Panel calculatingPanel;
+ protected System.Windows.Forms.Label calculatingLabel;
protected HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView dataView;
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs (revision 8880)
@@ -20,4 +20,5 @@
#endregion
+using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
@@ -32,4 +33,10 @@
[Content(typeof(DataAnalysisProblemData), false)]
public abstract partial class AbstractFeatureCorrelationView : AsynchronousContentView {
+ public const string ALLSAMPLES = "All Samples";
+ public const string TRAININGSAMPLES = "Training Samples";
+ public const string TESTSAMPLES = "Test Samples";
+
+ public static readonly IList Partitions = new List() { ALLSAMPLES, TRAININGSAMPLES, TESTSAMPLES };
+
protected FeatureCorrelationCalculator fcc;
@@ -44,10 +51,10 @@
var calculators = ApplicationManager.Manager.GetInstances();
var calcList = calculators.OrderBy(c => c.Name).Select(c => new { Name = c.Name, Calculator = c }).ToList();
- CorrelationCalcComboBox.ValueMember = "Calculator";
- CorrelationCalcComboBox.DisplayMember = "Name";
- CorrelationCalcComboBox.DataSource = calcList;
- CorrelationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator)));
- PartitionComboBox.DataSource = FeatureCorrelationPartitions.Partitions;
- PartitionComboBox.SelectedItem = FeatureCorrelationPartitions.TRAININGSAMPLES;
+ correlationCalcComboBox.ValueMember = "Calculator";
+ correlationCalcComboBox.DisplayMember = "Name";
+ correlationCalcComboBox.DataSource = calcList;
+ correlationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator)));
+ partitionComboBox.DataSource = Partitions;
+ partitionComboBox.SelectedItem = TRAININGSAMPLES;
}
@@ -59,6 +66,6 @@
protected override void DeregisterContentEvents() {
- fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
- fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
+ fcc.CorrelationCalculationFinished -= new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);
+ fcc.ProgressCalculation -= new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);
base.DeregisterContentEvents();
}
@@ -99,5 +106,5 @@
protected void UpdateDataView(DoubleMatrix correlation) {
- IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
+ IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
maximumLabel.Text = calc.Maximum.ToString();
minimumLabel.Text = calc.Minimum.ToString();
@@ -111,10 +118,10 @@
protected void Content_ProgressCalculation(object sender, ProgressChangedEventArgs e) {
- if (!CalculatingPanel.Visible && e.ProgressPercentage != HeatMapProgressBar.Maximum) {
- CalculatingPanel.Show();
- } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {
- CalculatingPanel.Hide();
+ if (!calculatingPanel.Visible && e.ProgressPercentage != heatMapProgressBar.Maximum) {
+ calculatingPanel.Show();
+ } else if (e.ProgressPercentage == heatMapProgressBar.Maximum) {
+ calculatingPanel.Hide();
}
- HeatMapProgressBar.Value = e.ProgressPercentage;
+ heatMapProgressBar.Value = e.ProgressPercentage;
}
}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.Designer.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Problems.DataAnalysis.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class EnhancedStringConvertibleMatrixView {
///
@@ -24,5 +45,5 @@
///
private void InitializeComponent() {
- this.ShowHideRows = new System.Windows.Forms.ToolStripMenuItem();
+ this.showHideRows = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
this.SuspendLayout();
@@ -40,12 +61,12 @@
//
this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.ShowHideRows});
+ this.showHideRows});
//
// ShowHideRows
//
- this.ShowHideRows.Name = "ShowHideRows";
- this.ShowHideRows.Size = new System.Drawing.Size(190, 22);
- this.ShowHideRows.Text = "Show / Hide Rows";
- this.ShowHideRows.Click += new System.EventHandler(this.ShowHideRows_Click);
+ this.showHideRows.Name = "ShowHideRows";
+ this.showHideRows.Size = new System.Drawing.Size(190, 22);
+ this.showHideRows.Text = "Show / Hide Rows";
+ this.showHideRows.Click += new System.EventHandler(this.ShowHideRows_Click);
//
// ColoredStringConvertibleMatrixView
@@ -68,5 +89,5 @@
#endregion
- protected System.Windows.Forms.ToolStripMenuItem ShowHideRows;
+ protected System.Windows.Forms.ToolStripMenuItem showHideRows;
}
}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs (revision 8880)
@@ -72,14 +72,12 @@
}
protected override void UpdateRowHeaders() {
- if (rowVisibility != null && Content != null && rowVisibility.Count() == dataGridView.RowCount) {
- int[] realRowIndex = Enumerable.Range(0, Content.Rows).ToArray();
- int[] helper = new int[virtualRowIndices.Length];
- Array.Copy(virtualRowIndices, helper, virtualRowIndices.Length);
- Array.Sort(helper, realRowIndex);
- for (int i = 0; i < dataGridView.RowCount; i++) {
- dataGridView.Rows[realRowIndex[i]].Visible = rowVisibility.ElementAt(i);
- }
+ if (rowVisibility == null) return;
+ if (Content == null) return;
+ if (rowVisibility.Count() != dataGridView.RowCount) return;
+
+ for (int index = 0; index < dataGridView.RowCount; index++) {
+ dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]);
+ dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]);
}
- base.UpdateRowHeaders();
}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs (revision 8880)
@@ -73,5 +73,9 @@
private void CalculateElements(Dataset dataset, IDependencyCalculator calc, string partition, string variable = null, int frames = 0, double[,] alreadyCalculated = null) {
- bwInfo = new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated };
+ var indices = GetRelevantIndices(problemData, partition);
+ bwInfo = new BackgroundWorkerInfo {
+ Dataset = dataset, Calculator = calc, Partition = partition, Indices = indices,
+ Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated
+ };
if (bw == null) {
bw = new BackgroundWorker();
@@ -89,4 +93,14 @@
}
+ private IEnumerable GetRelevantIndices(IDataAnalysisProblemData problemData, string partition) {
+ IEnumerable var;
+ if (partition.Equals(AbstractFeatureCorrelationView.TRAININGSAMPLES))
+ var = problemData.TrainingIndices;
+ else if (partition.Equals(AbstractFeatureCorrelationView.TESTSAMPLES))
+ var = problemData.TestIndices;
+ else var = Enumerable.Range(0, problemData.Dataset.Rows);
+ return var;
+ }
+
#region backgroundworker
private void BwDoWork(object sender, DoWorkEventArgs e) {
@@ -104,5 +118,5 @@
BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
Dataset dataset = bwInfo.Dataset;
- string partition = bwInfo.Partition;
+ IEnumerable indices = bwInfo.Indices;
IDependencyCalculator calc = bwInfo.Calculator;
@@ -122,6 +136,6 @@
return;
}
- IEnumerable var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
- IEnumerable var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);
+ IEnumerable var1 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices);
+ IEnumerable var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[j], indices);
elements[i, j] = calc.Calculate(var1, var2, out error);
@@ -143,5 +157,5 @@
BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument;
Dataset dataset = bwInfo.Dataset;
- string partition = bwInfo.Partition;
+ IEnumerable indices = bwInfo.Indices;
IDependencyCalculator calc = bwInfo.Calculator;
string variable = bwInfo.Variable;
@@ -173,6 +187,6 @@
}
- IEnumerable var1 = GetRelevantValues(problemData, partition, variable);
- IEnumerable var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);
+ IEnumerable var1 = problemData.Dataset.GetDoubleValues(variable, indices);
+ IEnumerable var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices);
var valuesInFrame = var1.Take(j);
@@ -191,14 +205,4 @@
e.Result = elements;
worker.ReportProgress(100);
- }
-
- private IEnumerable GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) {
- IEnumerable var;
- if (partition.Equals(FeatureCorrelationPartitions.TRAININGSAMPLES))
- var = problemData.Dataset.GetDoubleValues(variable, problemData.TrainingIndices);
- else if (partition.Equals(FeatureCorrelationPartitions.TESTSAMPLES))
- var = problemData.Dataset.GetDoubleValues(variable, problemData.TestIndices);
- else var = problemData.Dataset.GetDoubleValues(variable);
- return var;
}
@@ -254,4 +258,5 @@
public IDependencyCalculator Calculator { get; set; }
public string Partition { get; set; }
+ public IEnumerable Indices { get; set; }
public string Variable { get; set; }
public int Frames { get; set; }
Index: unk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationHelpers.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationHelpers.cs (revision 8879)
+++ (revision )
@@ -1,34 +1,0 @@
-#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 .
- */
-#endregion
-
-using System.Collections.Generic;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Problems.DataAnalysis.Views {
- [NonDiscoverableType]
- public class FeatureCorrelationPartitions {
- public const string ALLSAMPLES = "All Samples";
- public const string TRAININGSAMPLES = "Training Samples";
- public const string TESTSAMPLES = "Test Samples";
-
- public static readonly IList Partitions = new List() { ALLSAMPLES, TRAININGSAMPLES, TESTSAMPLES };
- }
-}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.Designer.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.Designer.cs (revision 8880)
@@ -21,4 +21,5 @@
#endregion
+
namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class FeatureCorrelationView {
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs (revision 8880)
@@ -50,9 +50,9 @@
protected override void CalculateCorrelation() {
- if (CorrelationCalcComboBox.SelectedItem == null) return;
- if (PartitionComboBox.SelectedItem == null) return;
+ if (correlationCalcComboBox.SelectedItem == null) return;
+ if (partitionComboBox.SelectedItem == null) return;
- IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
- string partition = (string)PartitionComboBox.SelectedValue;
+ IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
+ string partition = (string)partitionComboBox.SelectedValue;
dataView.Enabled = false;
double[,] corr = correlationCache.GetCorrelation(calc, partition);
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.Designer.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.Designer.cs (revision 8880)
@@ -21,4 +21,5 @@
#endregion
+
namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class TimeframeFeatureCorrelationView {
@@ -46,20 +47,28 @@
///
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.TimeframeTextbox = new System.Windows.Forms.TextBox();
- ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
- this.SplitContainer.Panel1.SuspendLayout();
- this.SplitContainer.Panel2.SuspendLayout();
- this.SplitContainer.SuspendLayout();
- this.CalculatingPanel.SuspendLayout();
+ this.components = new System.ComponentModel.Container();
+ this.variableSelectionLabel = new System.Windows.Forms.Label();
+ this.variableSelectionComboBox = new System.Windows.Forms.ComboBox();
+ this.timeFrameLabel = new System.Windows.Forms.Label();
+ this.timeframeTextbox = new System.Windows.Forms.TextBox();
+ this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).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.calculatingPanel.SuspendLayout();
this.SuspendLayout();
+ //
+ // errorProvider
+ //
+ this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
+ this.errorProvider.ContainerControl = this;
//
// PartitionComboBox
//
- this.PartitionComboBox.Location = new System.Drawing.Point(344, 3);
- this.PartitionComboBox.Size = new System.Drawing.Size(131, 21);
+ this.partitionComboBox.Location = new System.Drawing.Point(344, 3);
+ this.partitionComboBox.Size = new System.Drawing.Size(131, 21);
//
// maximumLabel
@@ -69,6 +78,6 @@
// PictureBox
//
- this.PictureBox.Location = new System.Drawing.Point(506, 31);
- this.PictureBox.Size = new System.Drawing.Size(35, 280);
+ this.pictureBox.Location = new System.Drawing.Point(506, 31);
+ this.pictureBox.Size = new System.Drawing.Size(35, 280);
//
// SplitContainer
@@ -77,50 +86,52 @@
// SplitContainer.Panel1
//
- this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionComboBox);
- this.SplitContainer.Panel1.Controls.Add(this.TimeframeTextbox);
- this.SplitContainer.Panel1.Controls.Add(this.TimeFrameLabel);
- this.SplitContainer.Panel1.Controls.Add(this.VariableSelectionLabel);
- this.SplitContainer.SplitterDistance = 52;
+ this.splitContainer.Panel1.Controls.Add(this.variableSelectionComboBox);
+ this.splitContainer.Panel1.Controls.Add(this.timeframeTextbox);
+ this.splitContainer.Panel1.Controls.Add(this.timeFrameLabel);
+ this.splitContainer.Panel1.Controls.Add(this.variableSelectionLabel);
+ this.splitContainer.SplitterDistance = 52;
//
// CalculatingPanel
//
- this.CalculatingPanel.Location = new System.Drawing.Point(138, 82);
+ this.calculatingPanel.Location = new System.Drawing.Point(138, 82);
//
// 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:";
+ 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.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- 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.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted);
+ this.variableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ 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.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted);
//
// 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:";
+ 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.TimeframeTextbox.Location = new System.Drawing.Point(344, 30);
- this.TimeframeTextbox.Name = "TimeframeTextbox";
- this.TimeframeTextbox.Size = new System.Drawing.Size(131, 21);
- this.TimeframeTextbox.TabIndex = 19;
- this.TimeframeTextbox.Text = "5";
- this.TimeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown);
+ this.timeframeTextbox.Location = new System.Drawing.Point(344, 30);
+ this.timeframeTextbox.Name = "TimeframeTextbox";
+ this.timeframeTextbox.Size = new System.Drawing.Size(131, 21);
+ this.timeframeTextbox.TabIndex = 19;
+ this.timeframeTextbox.Text = "5";
+ this.timeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown);
+ this.timeframeTextbox.Validating += new System.ComponentModel.CancelEventHandler(TimeframeTextbox_Validating);
+ this.timeframeTextbox.Validated += new System.EventHandler(TimeframeTextbox_Validated);
//
// TimeframeFeatureCorrelationView
@@ -129,12 +140,13 @@
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();
- this.SplitContainer.Panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
- this.SplitContainer.ResumeLayout(false);
- this.CalculatingPanel.ResumeLayout(false);
- this.CalculatingPanel.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).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.calculatingPanel.ResumeLayout(false);
+ this.calculatingPanel.PerformLayout();
this.ResumeLayout(false);
@@ -142,8 +154,9 @@
#endregion
- protected System.Windows.Forms.Label VariableSelectionLabel;
- protected System.Windows.Forms.ComboBox VariableSelectionComboBox;
- protected System.Windows.Forms.Label TimeFrameLabel;
- protected System.Windows.Forms.TextBox TimeframeTextbox;
+ protected System.Windows.Forms.Label variableSelectionLabel;
+ protected System.Windows.Forms.ComboBox variableSelectionComboBox;
+ protected System.Windows.Forms.Label timeFrameLabel;
+ protected System.Windows.Forms.TextBox timeframeTextbox;
+ protected System.Windows.Forms.ErrorProvider errorProvider;
}
}
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs (revision 8880)
@@ -34,8 +34,12 @@
private FeatureCorrelationTimeframeCache correlationTimeframCache;
+ private string lastFramesValue;
public TimeframeFeatureCorrelationView() {
InitializeComponent();
correlationTimeframCache = new FeatureCorrelationTimeframeCache();
+ errorProvider.SetIconAlignment(timeframeTextbox, ErrorIconAlignment.MiddleRight);
+ errorProvider.SetIconPadding(timeframeTextbox, 2);
+ lastFramesValue = timeframeTextbox.Text;
}
@@ -44,7 +48,11 @@
if (Content != null) {
dataView.RowVisibility = SetInitialVariableVisibility();
- VariableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList();
+ SetVariableSelectionComboBox();
}
base.OnContentChanged();
+ }
+
+ protected virtual void SetVariableSelectionComboBox() {
+ variableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList();
}
@@ -52,19 +60,44 @@
CalculateCorrelation();
}
+ private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
+ if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) {
+ timeFrameLabel.Select(); // select label to validate data
+ }
- private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
- if (e.KeyCode == Keys.Enter) {
- CalculateCorrelation();
+ if (e.KeyCode == Keys.Escape) {
+ timeframeTextbox.Text = lastFramesValue;
+ timeFrameLabel.Select(); // select label to validate data
+ }
+ }
+ private void TimeframeTextbox_Validated(object sender, System.EventArgs e) {
+ lastFramesValue = timeframeTextbox.Text;
+ errorProvider.SetError(timeframeTextbox, string.Empty);
+ CalculateCorrelation();
+ }
+ private void TimeframeTextbox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
+ int help;
+ if (!int.TryParse(timeframeTextbox.Text, out help)) {
+ errorProvider.SetError(timeframeTextbox, "Timeframe couldn't be parsed. Enter a valid integer value.");
+ e.Cancel = true;
+ } else {
+ if (help > 50) {
+ DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " +
+ "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo);
+ e.Cancel = !dr.Equals(DialogResult.Yes);
+ } else if (help < 0) {
+ errorProvider.SetError(timeframeTextbox, "The entered value can't be negative!");
+ e.Cancel = true;
+ }
}
}
protected override void CalculateCorrelation() {
- if (CorrelationCalcComboBox.SelectedItem != null && PartitionComboBox.SelectedItem != null
- && VariableSelectionComboBox.SelectedItem != null && ValidateTimeframeTextbox()) {
- string variable = (string)VariableSelectionComboBox.SelectedItem;
- IDependencyCalculator calc = (IDependencyCalculator)CorrelationCalcComboBox.SelectedValue;
- string partition = (string)PartitionComboBox.SelectedValue;
+ if (correlationCalcComboBox.SelectedItem != null && partitionComboBox.SelectedItem != null
+ && variableSelectionComboBox.SelectedItem != null) {
+ string variable = (string)variableSelectionComboBox.SelectedItem;
+ IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue;
+ string partition = (string)partitionComboBox.SelectedValue;
int frames;
- int.TryParse(TimeframeTextbox.Text, out frames);
+ int.TryParse(timeframeTextbox.Text, out frames);
dataView.Enabled = false;
double[,] corr = correlationTimeframCache.GetTimeframeCorrelation(calc, partition, variable);
@@ -82,20 +115,4 @@
}
}
-
- private bool ValidateTimeframeTextbox() {
- int help;
- if (!int.TryParse(TimeframeTextbox.Text, out help)) {
- MessageBox.Show("Timeframe couldn't be parsed. Enter a valid integer value.", "Parse Error", MessageBoxButtons.OK);
- return false;
- } else {
- if (help > 50) {
- DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " +
- "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo);
- return dr.Equals(DialogResult.Yes);
- }
- }
- return true;
- }
-
protected override void Content_CorrelationCalculationFinished(object sender, FeatureCorrelationCalculator.CorrelationCalculationFinishedArgs e) {
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj (revision 8880)
@@ -169,5 +169,4 @@
-
UserControl
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Problems.DataAnalysis.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class RegressionFeatureCorrelationView {
///
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 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs (revision 8880)
@@ -1,3 +1,24 @@
-namespace HeuristicLab.Problems.DataAnalysis.Views {
+#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 .
+ */
+#endregion
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
partial class RegressionTimeframeFeatureCorrelationView {
///
Index: /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs (revision 8879)
+++ /trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs (revision 8880)
@@ -37,4 +37,9 @@
}
+ protected override void SetVariableSelectionComboBox() {
+ base.SetVariableSelectionComboBox();
+ variableSelectionComboBox.SelectedItem = Content.TargetVariable;
+ }
+
protected override bool[] SetInitialVariableVisibility() {
int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);