Changeset 8880
- Timestamp:
- 11/08/12 12:10:38 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixColumnVisibilityDialog.Designer.cs
r8870 r8880 1 namespace HeuristicLab.Data.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Data.Views { 2 23 partial class StringConvertibleMatrixColumnVisibilityDialog { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixRowVisibilityDialog.Designer.cs
r8870 r8880 1 namespace HeuristicLab.Data.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Data.Views { 2 23 partial class StringConvertibleMatrixRowVisibilityDialog { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationFeatureCorrelationView.Designer.cs
r8689 r8880 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 23 partial class ClassificationFeatureCorrelationView { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.Designer.cs
r8689 r8880 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 23 partial class ClassificationTimeframeFeatureCorrelationView { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/ClassificationTimeframeFeatureCorrelationView.cs
r8833 r8880 37 37 } 38 38 39 protected override void SetVariableSelectionComboBox() { 40 base.SetVariableSelectionComboBox(); 41 variableSelectionComboBox.SelectedItem = Content.TargetVariable; 42 } 43 39 44 protected override bool[] SetInitialVariableVisibility() { 40 45 int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.Designer.cs
r8833 r8880 49 49 this.components = new System.ComponentModel.Container(); 50 50 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AbstractFeatureCorrelationView)); 51 this. HeatMapProgressBar = new System.Windows.Forms.ProgressBar();52 this. PartitionComboBox = new System.Windows.Forms.ComboBox();53 this. CorrelationCalcLabel = new System.Windows.Forms.Label();54 this. CorrelationCalcComboBox = new System.Windows.Forms.ComboBox();55 this. PartitionLabel = new System.Windows.Forms.Label();51 this.heatMapProgressBar = new System.Windows.Forms.ProgressBar(); 52 this.partitionComboBox = new System.Windows.Forms.ComboBox(); 53 this.correlationCalcLabel = new System.Windows.Forms.Label(); 54 this.correlationCalcComboBox = new System.Windows.Forms.ComboBox(); 55 this.partitionLabel = new System.Windows.Forms.Label(); 56 56 this.minimumLabel = new System.Windows.Forms.Label(); 57 57 this.maximumLabel = new System.Windows.Forms.Label(); 58 this. PictureBox = new System.Windows.Forms.PictureBox();59 this. SplitContainer = new System.Windows.Forms.SplitContainer();60 this. CalculatingPanel = new System.Windows.Forms.Panel();61 this. CalculatingLabel = new System.Windows.Forms.Label();58 this.pictureBox = new System.Windows.Forms.PictureBox(); 59 this.splitContainer = new System.Windows.Forms.SplitContainer(); 60 this.calculatingPanel = new System.Windows.Forms.Panel(); 61 this.calculatingLabel = new System.Windows.Forms.Label(); 62 62 this.dataView = new HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView(); 63 ((System.ComponentModel.ISupportInitialize)(this. PictureBox)).BeginInit();64 ((System.ComponentModel.ISupportInitialize)(this. SplitContainer)).BeginInit();65 this. SplitContainer.Panel1.SuspendLayout();66 this. SplitContainer.Panel2.SuspendLayout();67 this. SplitContainer.SuspendLayout();68 this. CalculatingPanel.SuspendLayout();63 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 64 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 65 this.splitContainer.Panel1.SuspendLayout(); 66 this.splitContainer.Panel2.SuspendLayout(); 67 this.splitContainer.SuspendLayout(); 68 this.calculatingPanel.SuspendLayout(); 69 69 this.SuspendLayout(); 70 70 // 71 71 // HeatMapProgressBar 72 72 // 73 this. HeatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));74 this. HeatMapProgressBar.Location = new System.Drawing.Point(25, 46);75 this. HeatMapProgressBar.Name = "HeatMapProgressBar";76 this. HeatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No;77 this. HeatMapProgressBar.Size = new System.Drawing.Size(154, 21);78 this. HeatMapProgressBar.TabIndex = 9;73 this.heatMapProgressBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); 74 this.heatMapProgressBar.Location = new System.Drawing.Point(25, 46); 75 this.heatMapProgressBar.Name = "HeatMapProgressBar"; 76 this.heatMapProgressBar.RightToLeft = System.Windows.Forms.RightToLeft.No; 77 this.heatMapProgressBar.Size = new System.Drawing.Size(154, 21); 78 this.heatMapProgressBar.TabIndex = 9; 79 79 // 80 80 // PartitionComboBox 81 81 // 82 this. PartitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;83 this. PartitionComboBox.FormattingEnabled = true;84 this. PartitionComboBox.Location = new System.Drawing.Point(333, 3);85 this. PartitionComboBox.Name = "PartitionComboBox";86 this. PartitionComboBox.Size = new System.Drawing.Size(142, 21);87 this. PartitionComboBox.TabIndex = 8;88 this. PartitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted);82 this.partitionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 83 this.partitionComboBox.FormattingEnabled = true; 84 this.partitionComboBox.Location = new System.Drawing.Point(333, 3); 85 this.partitionComboBox.Name = "PartitionComboBox"; 86 this.partitionComboBox.Size = new System.Drawing.Size(142, 21); 87 this.partitionComboBox.TabIndex = 8; 88 this.partitionComboBox.SelectionChangeCommitted += new System.EventHandler(this.PartitionComboBox_SelectedChangeCommitted); 89 89 // 90 90 // CorrelationCalcLabel 91 91 // 92 this. CorrelationCalcLabel.AutoSize = true;93 this. CorrelationCalcLabel.Location = new System.Drawing.Point(0, 6);94 this. CorrelationCalcLabel.Name = "CorrelationCalcLabel";95 this. CorrelationCalcLabel.Size = new System.Drawing.Size(104, 13);96 this. CorrelationCalcLabel.TabIndex = 7;97 this. CorrelationCalcLabel.Text = "Correlation Measure:";92 this.correlationCalcLabel.AutoSize = true; 93 this.correlationCalcLabel.Location = new System.Drawing.Point(0, 6); 94 this.correlationCalcLabel.Name = "CorrelationCalcLabel"; 95 this.correlationCalcLabel.Size = new System.Drawing.Size(104, 13); 96 this.correlationCalcLabel.TabIndex = 7; 97 this.correlationCalcLabel.Text = "Correlation Measure:"; 98 98 // 99 99 // CorrelationCalcComboBox 100 100 // 101 this. CorrelationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;102 this. CorrelationCalcComboBox.FormattingEnabled = true;103 this. CorrelationCalcComboBox.Location = new System.Drawing.Point(110, 3);104 this. CorrelationCalcComboBox.Name = "CorrelationCalcComboBox";105 this. CorrelationCalcComboBox.Size = new System.Drawing.Size(163, 21);106 this. CorrelationCalcComboBox.TabIndex = 6;107 this. CorrelationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted);101 this.correlationCalcComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 102 this.correlationCalcComboBox.FormattingEnabled = true; 103 this.correlationCalcComboBox.Location = new System.Drawing.Point(110, 3); 104 this.correlationCalcComboBox.Name = "CorrelationCalcComboBox"; 105 this.correlationCalcComboBox.Size = new System.Drawing.Size(163, 21); 106 this.correlationCalcComboBox.TabIndex = 6; 107 this.correlationCalcComboBox.SelectionChangeCommitted += new System.EventHandler(this.CorrelationMeasureComboBox_SelectedChangeCommitted); 108 108 // 109 109 // PartitionLabel 110 110 // 111 this. PartitionLabel.AutoSize = true;112 this. PartitionLabel.Location = new System.Drawing.Point(279, 6);113 this. PartitionLabel.Name = "PartitionLabel";114 this. PartitionLabel.Size = new System.Drawing.Size(48, 13);115 this. PartitionLabel.TabIndex = 10;116 this. PartitionLabel.Text = "Partition:";111 this.partitionLabel.AutoSize = true; 112 this.partitionLabel.Location = new System.Drawing.Point(279, 6); 113 this.partitionLabel.Name = "PartitionLabel"; 114 this.partitionLabel.Size = new System.Drawing.Size(48, 13); 115 this.partitionLabel.TabIndex = 10; 116 this.partitionLabel.Text = "Partition:"; 117 117 // 118 118 // minimumLabel … … 140 140 // PictureBox 141 141 // 142 this. PictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)142 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 143 143 | System.Windows.Forms.AnchorStyles.Right))); 144 this. PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;145 this. PictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image")));146 this. PictureBox.Location = new System.Drawing.Point(507, 30);147 this. PictureBox.Name = "PictureBox";148 this. PictureBox.Size = new System.Drawing.Size(35, 281);149 this. PictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;150 this. PictureBox.TabIndex = 15;151 this. PictureBox.TabStop = false;144 this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 145 this.pictureBox.Image = ((System.Drawing.Image)(resources.GetObject("PictureBox.Image"))); 146 this.pictureBox.Location = new System.Drawing.Point(507, 30); 147 this.pictureBox.Name = "PictureBox"; 148 this.pictureBox.Size = new System.Drawing.Size(35, 281); 149 this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 150 this.pictureBox.TabIndex = 15; 151 this.pictureBox.TabStop = false; 152 152 // 153 153 // SplitContainer 154 154 // 155 this. SplitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)155 this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 156 156 | System.Windows.Forms.AnchorStyles.Left) 157 157 | System.Windows.Forms.AnchorStyles.Right))); 158 this. SplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;159 this. SplitContainer.IsSplitterFixed = true;160 this. SplitContainer.Location = new System.Drawing.Point(3, 3);161 this. SplitContainer.Name = "SplitContainer";162 this. SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;158 this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; 159 this.splitContainer.IsSplitterFixed = true; 160 this.splitContainer.Location = new System.Drawing.Point(3, 3); 161 this.splitContainer.Name = "SplitContainer"; 162 this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; 163 163 // 164 164 // SplitContainer.Panel1 165 165 // 166 this. SplitContainer.Panel1.Controls.Add(this.CorrelationCalcLabel);167 this. SplitContainer.Panel1.Controls.Add(this.CorrelationCalcComboBox);168 this. SplitContainer.Panel1.Controls.Add(this.PartitionComboBox);169 this. SplitContainer.Panel1.Controls.Add(this.PartitionLabel);166 this.splitContainer.Panel1.Controls.Add(this.correlationCalcLabel); 167 this.splitContainer.Panel1.Controls.Add(this.correlationCalcComboBox); 168 this.splitContainer.Panel1.Controls.Add(this.partitionComboBox); 169 this.splitContainer.Panel1.Controls.Add(this.partitionLabel); 170 170 // 171 171 // SplitContainer.Panel2 172 172 // 173 this. SplitContainer.Panel2.Controls.Add(this.CalculatingPanel);174 this. SplitContainer.Panel2.Controls.Add(this.dataView);175 this. SplitContainer.Size = new System.Drawing.Size(475, 330);176 this. SplitContainer.SplitterDistance = 25;177 this. SplitContainer.TabIndex = 16;173 this.splitContainer.Panel2.Controls.Add(this.calculatingPanel); 174 this.splitContainer.Panel2.Controls.Add(this.dataView); 175 this.splitContainer.Size = new System.Drawing.Size(475, 330); 176 this.splitContainer.SplitterDistance = 25; 177 this.splitContainer.TabIndex = 16; 178 178 // 179 179 // CalculatingPanel 180 180 // 181 this. CalculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None;182 this. CalculatingPanel.Controls.Add(this.CalculatingLabel);183 this. CalculatingPanel.Controls.Add(this.HeatMapProgressBar);184 this. CalculatingPanel.Location = new System.Drawing.Point(138, 95);185 this. CalculatingPanel.Name = "CalculatingPanel";186 this. CalculatingPanel.Size = new System.Drawing.Size(200, 81);187 this. CalculatingPanel.TabIndex = 10;181 this.calculatingPanel.Anchor = System.Windows.Forms.AnchorStyles.None; 182 this.calculatingPanel.Controls.Add(this.calculatingLabel); 183 this.calculatingPanel.Controls.Add(this.heatMapProgressBar); 184 this.calculatingPanel.Location = new System.Drawing.Point(138, 95); 185 this.calculatingPanel.Name = "CalculatingPanel"; 186 this.calculatingPanel.Size = new System.Drawing.Size(200, 81); 187 this.calculatingPanel.TabIndex = 10; 188 188 // 189 189 // CalculatingLabel 190 190 // 191 this. CalculatingLabel.AutoSize = true;192 this. CalculatingLabel.Location = new System.Drawing.Point(42, 19);193 this. CalculatingLabel.Name = "CalculatingLabel";194 this. CalculatingLabel.Size = new System.Drawing.Size(120, 13);195 this. CalculatingLabel.TabIndex = 10;196 this. CalculatingLabel.Text = "Calculating correlation...";191 this.calculatingLabel.AutoSize = true; 192 this.calculatingLabel.Location = new System.Drawing.Point(42, 19); 193 this.calculatingLabel.Name = "CalculatingLabel"; 194 this.calculatingLabel.Size = new System.Drawing.Size(120, 13); 195 this.calculatingLabel.TabIndex = 10; 196 this.calculatingLabel.Text = "Calculating correlation..."; 197 197 // 198 198 // DataGridView … … 209 209 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 210 210 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 211 this.Controls.Add(this. SplitContainer);211 this.Controls.Add(this.splitContainer); 212 212 this.Controls.Add(this.minimumLabel); 213 this.Controls.Add(this. PictureBox);213 this.Controls.Add(this.pictureBox); 214 214 this.Controls.Add(this.maximumLabel); 215 215 this.Name = "AbstractFeatureCorrelationView"; 216 216 this.Size = new System.Drawing.Size(569, 336); 217 ((System.ComponentModel.ISupportInitialize)(this. PictureBox)).EndInit();218 this. SplitContainer.Panel1.ResumeLayout(false);219 this. SplitContainer.Panel1.PerformLayout();220 this. SplitContainer.Panel2.ResumeLayout(false);221 ((System.ComponentModel.ISupportInitialize)(this. SplitContainer)).EndInit();222 this. SplitContainer.ResumeLayout(false);223 this. CalculatingPanel.ResumeLayout(false);224 this. CalculatingPanel.PerformLayout();217 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 218 this.splitContainer.Panel1.ResumeLayout(false); 219 this.splitContainer.Panel1.PerformLayout(); 220 this.splitContainer.Panel2.ResumeLayout(false); 221 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 222 this.splitContainer.ResumeLayout(false); 223 this.calculatingPanel.ResumeLayout(false); 224 this.calculatingPanel.PerformLayout(); 225 225 this.ResumeLayout(false); 226 226 … … 229 229 #endregion 230 230 231 protected System.Windows.Forms.ProgressBar HeatMapProgressBar;232 protected System.Windows.Forms.ComboBox PartitionComboBox;233 protected System.Windows.Forms.Label CorrelationCalcLabel;234 protected System.Windows.Forms.ComboBox CorrelationCalcComboBox;235 protected System.Windows.Forms.Label PartitionLabel;231 protected System.Windows.Forms.ProgressBar heatMapProgressBar; 232 protected System.Windows.Forms.ComboBox partitionComboBox; 233 protected System.Windows.Forms.Label correlationCalcLabel; 234 protected System.Windows.Forms.ComboBox correlationCalcComboBox; 235 protected System.Windows.Forms.Label partitionLabel; 236 236 protected System.Windows.Forms.Label minimumLabel; 237 237 protected System.Windows.Forms.Label maximumLabel; 238 protected System.Windows.Forms.PictureBox PictureBox;239 protected System.Windows.Forms.SplitContainer SplitContainer;240 protected System.Windows.Forms.Panel CalculatingPanel;241 protected System.Windows.Forms.Label CalculatingLabel;238 protected System.Windows.Forms.PictureBox pictureBox; 239 protected System.Windows.Forms.SplitContainer splitContainer; 240 protected System.Windows.Forms.Panel calculatingPanel; 241 protected System.Windows.Forms.Label calculatingLabel; 242 242 protected HeuristicLab.Problems.DataAnalysis.Views.EnhancedStringConvertibleMatrixView dataView; 243 243 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/AbstractFeatureCorrelationView.cs
r8874 r8880 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.ComponentModel; 23 24 using System.Linq; … … 32 33 [Content(typeof(DataAnalysisProblemData), false)] 33 34 public abstract partial class AbstractFeatureCorrelationView : AsynchronousContentView { 35 public const string ALLSAMPLES = "All Samples"; 36 public const string TRAININGSAMPLES = "Training Samples"; 37 public const string TESTSAMPLES = "Test Samples"; 38 39 public static readonly IList<string> Partitions = new List<string>() { ALLSAMPLES, TRAININGSAMPLES, TESTSAMPLES }; 40 34 41 protected FeatureCorrelationCalculator fcc; 35 42 … … 44 51 var calculators = ApplicationManager.Manager.GetInstances<IDependencyCalculator>(); 45 52 var calcList = calculators.OrderBy(c => c.Name).Select(c => new { Name = c.Name, Calculator = c }).ToList(); 46 CorrelationCalcComboBox.ValueMember = "Calculator";47 CorrelationCalcComboBox.DisplayMember = "Name";48 CorrelationCalcComboBox.DataSource = calcList;49 CorrelationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator)));50 PartitionComboBox.DataSource = FeatureCorrelationPartitions.Partitions;51 PartitionComboBox.SelectedItem = FeatureCorrelationPartitions.TRAININGSAMPLES;53 correlationCalcComboBox.ValueMember = "Calculator"; 54 correlationCalcComboBox.DisplayMember = "Name"; 55 correlationCalcComboBox.DataSource = calcList; 56 correlationCalcComboBox.SelectedItem = calcList.First(c => c.Calculator.GetType().Equals(typeof(PearsonsRDependenceCalculator))); 57 partitionComboBox.DataSource = Partitions; 58 partitionComboBox.SelectedItem = TRAININGSAMPLES; 52 59 } 53 60 … … 59 66 60 67 protected override void DeregisterContentEvents() { 61 fcc.CorrelationCalculationFinished += new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished);62 fcc.ProgressCalculation += new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation);68 fcc.CorrelationCalculationFinished -= new FeatureCorrelationCalculator.CorrelationCalculationFinishedHandler(Content_CorrelationCalculationFinished); 69 fcc.ProgressCalculation -= new FeatureCorrelationCalculator.ProgressCalculationHandler(Content_ProgressCalculation); 63 70 base.DeregisterContentEvents(); 64 71 } … … 99 106 100 107 protected void UpdateDataView(DoubleMatrix correlation) { 101 IDependencyCalculator calc = (IDependencyCalculator) CorrelationCalcComboBox.SelectedValue;108 IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue; 102 109 maximumLabel.Text = calc.Maximum.ToString(); 103 110 minimumLabel.Text = calc.Minimum.ToString(); … … 111 118 112 119 protected void Content_ProgressCalculation(object sender, ProgressChangedEventArgs e) { 113 if (! CalculatingPanel.Visible && e.ProgressPercentage != HeatMapProgressBar.Maximum) {114 CalculatingPanel.Show();115 } else if (e.ProgressPercentage == HeatMapProgressBar.Maximum) {116 CalculatingPanel.Hide();120 if (!calculatingPanel.Visible && e.ProgressPercentage != heatMapProgressBar.Maximum) { 121 calculatingPanel.Show(); 122 } else if (e.ProgressPercentage == heatMapProgressBar.Maximum) { 123 calculatingPanel.Hide(); 117 124 } 118 HeatMapProgressBar.Value = e.ProgressPercentage;125 heatMapProgressBar.Value = e.ProgressPercentage; 119 126 } 120 127 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.Designer.cs
r8833 r8880 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 23 partial class EnhancedStringConvertibleMatrixView { 3 24 /// <summary> … … 24 45 /// </summary> 25 46 private void InitializeComponent() { 26 this. ShowHideRows = new System.Windows.Forms.ToolStripMenuItem();47 this.showHideRows = new System.Windows.Forms.ToolStripMenuItem(); 27 48 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 28 49 this.SuspendLayout(); … … 40 61 // 41 62 this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 42 this. ShowHideRows});63 this.showHideRows}); 43 64 // 44 65 // ShowHideRows 45 66 // 46 this. ShowHideRows.Name = "ShowHideRows";47 this. ShowHideRows.Size = new System.Drawing.Size(190, 22);48 this. ShowHideRows.Text = "Show / Hide Rows";49 this. ShowHideRows.Click += new System.EventHandler(this.ShowHideRows_Click);67 this.showHideRows.Name = "ShowHideRows"; 68 this.showHideRows.Size = new System.Drawing.Size(190, 22); 69 this.showHideRows.Text = "Show / Hide Rows"; 70 this.showHideRows.Click += new System.EventHandler(this.ShowHideRows_Click); 50 71 // 51 72 // ColoredStringConvertibleMatrixView … … 68 89 #endregion 69 90 70 protected System.Windows.Forms.ToolStripMenuItem ShowHideRows;91 protected System.Windows.Forms.ToolStripMenuItem showHideRows; 71 92 } 72 93 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/EnhancedStringConvertibleMatrixView.cs
r8874 r8880 72 72 } 73 73 protected override void UpdateRowHeaders() { 74 if (rowVisibility != null && Content != null && rowVisibility.Count() == dataGridView.RowCount) { 75 int[] realRowIndex = Enumerable.Range(0, Content.Rows).ToArray(); 76 int[] helper = new int[virtualRowIndices.Length]; 77 Array.Copy(virtualRowIndices, helper, virtualRowIndices.Length); 78 Array.Sort(helper, realRowIndex); 79 for (int i = 0; i < dataGridView.RowCount; i++) { 80 dataGridView.Rows[realRowIndex[i]].Visible = rowVisibility.ElementAt(i); 81 } 74 if (rowVisibility == null) return; 75 if (Content == null) return; 76 if (rowVisibility.Count() != dataGridView.RowCount) return; 77 78 for (int index = 0; index < dataGridView.RowCount; index++) { 79 dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndices[index]); 80 dataGridView.Rows[index].Visible = rowVisibility.ElementAt(virtualRowIndices[index]); 82 81 } 83 base.UpdateRowHeaders();84 82 } 85 83 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationCalculator.cs
r8874 r8880 73 73 74 74 private void CalculateElements(Dataset dataset, IDependencyCalculator calc, string partition, string variable = null, int frames = 0, double[,] alreadyCalculated = null) { 75 bwInfo = new BackgroundWorkerInfo { Dataset = dataset, Calculator = calc, Partition = partition, Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated }; 75 var indices = GetRelevantIndices(problemData, partition); 76 bwInfo = new BackgroundWorkerInfo { 77 Dataset = dataset, Calculator = calc, Partition = partition, Indices = indices, 78 Variable = variable, Frames = frames, AlreadyCalculated = alreadyCalculated 79 }; 76 80 if (bw == null) { 77 81 bw = new BackgroundWorker(); … … 89 93 } 90 94 95 private IEnumerable<int> GetRelevantIndices(IDataAnalysisProblemData problemData, string partition) { 96 IEnumerable<int> var; 97 if (partition.Equals(AbstractFeatureCorrelationView.TRAININGSAMPLES)) 98 var = problemData.TrainingIndices; 99 else if (partition.Equals(AbstractFeatureCorrelationView.TESTSAMPLES)) 100 var = problemData.TestIndices; 101 else var = Enumerable.Range(0, problemData.Dataset.Rows); 102 return var; 103 } 104 91 105 #region backgroundworker 92 106 private void BwDoWork(object sender, DoWorkEventArgs e) { … … 104 118 BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument; 105 119 Dataset dataset = bwInfo.Dataset; 106 string partition = bwInfo.Partition;120 IEnumerable<int> indices = bwInfo.Indices; 107 121 IDependencyCalculator calc = bwInfo.Calculator; 108 122 … … 122 136 return; 123 137 } 124 IEnumerable<double> var1 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);125 IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[j]);138 IEnumerable<double> var1 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices); 139 IEnumerable<double> var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[j], indices); 126 140 127 141 elements[i, j] = calc.Calculate(var1, var2, out error); … … 143 157 BackgroundWorkerInfo bwInfo = (BackgroundWorkerInfo)e.Argument; 144 158 Dataset dataset = bwInfo.Dataset; 145 string partition = bwInfo.Partition;159 IEnumerable<int> indices = bwInfo.Indices; 146 160 IDependencyCalculator calc = bwInfo.Calculator; 147 161 string variable = bwInfo.Variable; … … 173 187 } 174 188 175 IEnumerable<double> var1 = GetRelevantValues(problemData, partition, variable);176 IEnumerable<double> var2 = GetRelevantValues(problemData, partition, doubleVariableNames[i]);189 IEnumerable<double> var1 = problemData.Dataset.GetDoubleValues(variable, indices); 190 IEnumerable<double> var2 = problemData.Dataset.GetDoubleValues(doubleVariableNames[i], indices); 177 191 178 192 var valuesInFrame = var1.Take(j); … … 191 205 e.Result = elements; 192 206 worker.ReportProgress(100); 193 }194 195 private IEnumerable<double> GetRelevantValues(IDataAnalysisProblemData problemData, string partition, string variable) {196 IEnumerable<double> var;197 if (partition.Equals(FeatureCorrelationPartitions.TRAININGSAMPLES))198 var = problemData.Dataset.GetDoubleValues(variable, problemData.TrainingIndices);199 else if (partition.Equals(FeatureCorrelationPartitions.TESTSAMPLES))200 var = problemData.Dataset.GetDoubleValues(variable, problemData.TestIndices);201 else var = problemData.Dataset.GetDoubleValues(variable);202 return var;203 207 } 204 208 … … 254 258 public IDependencyCalculator Calculator { get; set; } 255 259 public string Partition { get; set; } 260 public IEnumerable<int> Indices { get; set; } 256 261 public string Variable { get; set; } 257 262 public int Frames { get; set; } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.Designer.cs
r8578 r8880 21 21 22 22 #endregion 23 23 24 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 25 partial class FeatureCorrelationView { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/FeatureCorrelationView.cs
r8874 r8880 50 50 51 51 protected override void CalculateCorrelation() { 52 if ( CorrelationCalcComboBox.SelectedItem == null) return;53 if ( PartitionComboBox.SelectedItem == null) return;52 if (correlationCalcComboBox.SelectedItem == null) return; 53 if (partitionComboBox.SelectedItem == null) return; 54 54 55 IDependencyCalculator calc = (IDependencyCalculator) CorrelationCalcComboBox.SelectedValue;56 string partition = (string) PartitionComboBox.SelectedValue;55 IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue; 56 string partition = (string)partitionComboBox.SelectedValue; 57 57 dataView.Enabled = false; 58 58 double[,] corr = correlationCache.GetCorrelation(calc, partition); -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.Designer.cs
r8833 r8880 21 21 22 22 #endregion 23 23 24 namespace HeuristicLab.Problems.DataAnalysis.Views { 24 25 partial class TimeframeFeatureCorrelationView { … … 46 47 /// </summary> 47 48 private void InitializeComponent() { 48 this.VariableSelectionLabel = new System.Windows.Forms.Label(); 49 this.VariableSelectionComboBox = new System.Windows.Forms.ComboBox(); 50 this.TimeFrameLabel = new System.Windows.Forms.Label(); 51 this.TimeframeTextbox = new System.Windows.Forms.TextBox(); 52 ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit(); 53 ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit(); 54 this.SplitContainer.Panel1.SuspendLayout(); 55 this.SplitContainer.Panel2.SuspendLayout(); 56 this.SplitContainer.SuspendLayout(); 57 this.CalculatingPanel.SuspendLayout(); 49 this.components = new System.ComponentModel.Container(); 50 this.variableSelectionLabel = new System.Windows.Forms.Label(); 51 this.variableSelectionComboBox = new System.Windows.Forms.ComboBox(); 52 this.timeFrameLabel = new System.Windows.Forms.Label(); 53 this.timeframeTextbox = new System.Windows.Forms.TextBox(); 54 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 55 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 56 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); 57 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); 58 this.splitContainer.Panel1.SuspendLayout(); 59 this.splitContainer.Panel2.SuspendLayout(); 60 this.splitContainer.SuspendLayout(); 61 this.calculatingPanel.SuspendLayout(); 58 62 this.SuspendLayout(); 63 // 64 // errorProvider 65 // 66 this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; 67 this.errorProvider.ContainerControl = this; 59 68 // 60 69 // PartitionComboBox 61 70 // 62 this. PartitionComboBox.Location = new System.Drawing.Point(344, 3);63 this. PartitionComboBox.Size = new System.Drawing.Size(131, 21);71 this.partitionComboBox.Location = new System.Drawing.Point(344, 3); 72 this.partitionComboBox.Size = new System.Drawing.Size(131, 21); 64 73 // 65 74 // maximumLabel … … 69 78 // PictureBox 70 79 // 71 this. PictureBox.Location = new System.Drawing.Point(506, 31);72 this. PictureBox.Size = new System.Drawing.Size(35, 280);80 this.pictureBox.Location = new System.Drawing.Point(506, 31); 81 this.pictureBox.Size = new System.Drawing.Size(35, 280); 73 82 // 74 83 // SplitContainer … … 77 86 // SplitContainer.Panel1 78 87 // 79 this. SplitContainer.Panel1.Controls.Add(this.VariableSelectionComboBox);80 this. SplitContainer.Panel1.Controls.Add(this.TimeframeTextbox);81 this. SplitContainer.Panel1.Controls.Add(this.TimeFrameLabel);82 this. SplitContainer.Panel1.Controls.Add(this.VariableSelectionLabel);83 this. SplitContainer.SplitterDistance = 52;88 this.splitContainer.Panel1.Controls.Add(this.variableSelectionComboBox); 89 this.splitContainer.Panel1.Controls.Add(this.timeframeTextbox); 90 this.splitContainer.Panel1.Controls.Add(this.timeFrameLabel); 91 this.splitContainer.Panel1.Controls.Add(this.variableSelectionLabel); 92 this.splitContainer.SplitterDistance = 52; 84 93 // 85 94 // CalculatingPanel 86 95 // 87 this. CalculatingPanel.Location = new System.Drawing.Point(138, 82);96 this.calculatingPanel.Location = new System.Drawing.Point(138, 82); 88 97 // 89 98 // VariableSelectionLabel 90 99 // 91 this. VariableSelectionLabel.AutoSize = true;92 this. VariableSelectionLabel.Location = new System.Drawing.Point(0, 33);93 this. VariableSelectionLabel.Name = "VariableSelectionLabel";94 this. VariableSelectionLabel.Size = new System.Drawing.Size(81, 13);95 this. VariableSelectionLabel.TabIndex = 16;96 this. VariableSelectionLabel.Text = "Select Variable:";100 this.variableSelectionLabel.AutoSize = true; 101 this.variableSelectionLabel.Location = new System.Drawing.Point(0, 33); 102 this.variableSelectionLabel.Name = "VariableSelectionLabel"; 103 this.variableSelectionLabel.Size = new System.Drawing.Size(81, 13); 104 this.variableSelectionLabel.TabIndex = 16; 105 this.variableSelectionLabel.Text = "Select Variable:"; 97 106 // 98 107 // VariableSelectionComboBox 99 108 // 100 this. VariableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;101 this. VariableSelectionComboBox.FormattingEnabled = true;102 this. VariableSelectionComboBox.Location = new System.Drawing.Point(110, 30);103 this. VariableSelectionComboBox.Name = "VariableSelectionComboBox";104 this. VariableSelectionComboBox.Size = new System.Drawing.Size(163, 21);105 this. VariableSelectionComboBox.TabIndex = 17;106 this. VariableSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted);109 this.variableSelectionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 110 this.variableSelectionComboBox.FormattingEnabled = true; 111 this.variableSelectionComboBox.Location = new System.Drawing.Point(110, 30); 112 this.variableSelectionComboBox.Name = "VariableSelectionComboBox"; 113 this.variableSelectionComboBox.Size = new System.Drawing.Size(163, 21); 114 this.variableSelectionComboBox.TabIndex = 17; 115 this.variableSelectionComboBox.SelectionChangeCommitted += new System.EventHandler(this.VariableSelectionComboBox_SelectedChangeCommitted); 107 116 // 108 117 // TimeFrameLabel 109 118 // 110 this. TimeFrameLabel.AutoSize = true;111 this. TimeFrameLabel.Location = new System.Drawing.Point(279, 33);112 this. TimeFrameLabel.Name = "TimeFrameLabel";113 this. TimeFrameLabel.Size = new System.Drawing.Size(59, 13);114 this. TimeFrameLabel.TabIndex = 18;115 this. TimeFrameLabel.Text = "Timeframe:";119 this.timeFrameLabel.AutoSize = true; 120 this.timeFrameLabel.Location = new System.Drawing.Point(279, 33); 121 this.timeFrameLabel.Name = "TimeFrameLabel"; 122 this.timeFrameLabel.Size = new System.Drawing.Size(59, 13); 123 this.timeFrameLabel.TabIndex = 18; 124 this.timeFrameLabel.Text = "Timeframe:"; 116 125 // 117 126 // TimeframeComboBox 118 127 // 119 this.TimeframeTextbox.Location = new System.Drawing.Point(344, 30); 120 this.TimeframeTextbox.Name = "TimeframeTextbox"; 121 this.TimeframeTextbox.Size = new System.Drawing.Size(131, 21); 122 this.TimeframeTextbox.TabIndex = 19; 123 this.TimeframeTextbox.Text = "5"; 124 this.TimeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown); 128 this.timeframeTextbox.Location = new System.Drawing.Point(344, 30); 129 this.timeframeTextbox.Name = "TimeframeTextbox"; 130 this.timeframeTextbox.Size = new System.Drawing.Size(131, 21); 131 this.timeframeTextbox.TabIndex = 19; 132 this.timeframeTextbox.Text = "5"; 133 this.timeframeTextbox.KeyDown += new System.Windows.Forms.KeyEventHandler(TimeframeTextbox_KeyDown); 134 this.timeframeTextbox.Validating += new System.ComponentModel.CancelEventHandler(TimeframeTextbox_Validating); 135 this.timeframeTextbox.Validated += new System.EventHandler(TimeframeTextbox_Validated); 125 136 // 126 137 // TimeframeFeatureCorrelationView … … 129 140 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 130 141 this.Name = "TimeframeFeatureCorrelationView"; 131 ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit(); 132 this.SplitContainer.Panel1.ResumeLayout(false); 133 this.SplitContainer.Panel1.PerformLayout(); 134 this.SplitContainer.Panel2.ResumeLayout(false); 135 ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit(); 136 this.SplitContainer.ResumeLayout(false); 137 this.CalculatingPanel.ResumeLayout(false); 138 this.CalculatingPanel.PerformLayout(); 142 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 143 ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); 144 this.splitContainer.Panel1.ResumeLayout(false); 145 this.splitContainer.Panel1.PerformLayout(); 146 this.splitContainer.Panel2.ResumeLayout(false); 147 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 148 this.splitContainer.ResumeLayout(false); 149 this.calculatingPanel.ResumeLayout(false); 150 this.calculatingPanel.PerformLayout(); 139 151 this.ResumeLayout(false); 140 152 … … 142 154 #endregion 143 155 144 protected System.Windows.Forms.Label VariableSelectionLabel; 145 protected System.Windows.Forms.ComboBox VariableSelectionComboBox; 146 protected System.Windows.Forms.Label TimeFrameLabel; 147 protected System.Windows.Forms.TextBox TimeframeTextbox; 156 protected System.Windows.Forms.Label variableSelectionLabel; 157 protected System.Windows.Forms.ComboBox variableSelectionComboBox; 158 protected System.Windows.Forms.Label timeFrameLabel; 159 protected System.Windows.Forms.TextBox timeframeTextbox; 160 protected System.Windows.Forms.ErrorProvider errorProvider; 148 161 } 149 162 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/FeatureCorrelation/TimeframeFeatureCorrelationView.cs
r8874 r8880 34 34 35 35 private FeatureCorrelationTimeframeCache correlationTimeframCache; 36 private string lastFramesValue; 36 37 37 38 public TimeframeFeatureCorrelationView() { 38 39 InitializeComponent(); 39 40 correlationTimeframCache = new FeatureCorrelationTimeframeCache(); 41 errorProvider.SetIconAlignment(timeframeTextbox, ErrorIconAlignment.MiddleRight); 42 errorProvider.SetIconPadding(timeframeTextbox, 2); 43 lastFramesValue = timeframeTextbox.Text; 40 44 } 41 45 … … 44 48 if (Content != null) { 45 49 dataView.RowVisibility = SetInitialVariableVisibility(); 46 VariableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList();50 SetVariableSelectionComboBox(); 47 51 } 48 52 base.OnContentChanged(); 53 } 54 55 protected virtual void SetVariableSelectionComboBox() { 56 variableSelectionComboBox.DataSource = Content.Dataset.DoubleVariables.ToList(); 49 57 } 50 58 … … 52 60 CalculateCorrelation(); 53 61 } 62 private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { 63 if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Return) { 64 timeFrameLabel.Select(); // select label to validate data 65 } 54 66 55 private void TimeframeTextbox_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { 56 if (e.KeyCode == Keys.Enter) { 57 CalculateCorrelation(); 67 if (e.KeyCode == Keys.Escape) { 68 timeframeTextbox.Text = lastFramesValue; 69 timeFrameLabel.Select(); // select label to validate data 70 } 71 } 72 private void TimeframeTextbox_Validated(object sender, System.EventArgs e) { 73 lastFramesValue = timeframeTextbox.Text; 74 errorProvider.SetError(timeframeTextbox, string.Empty); 75 CalculateCorrelation(); 76 } 77 private void TimeframeTextbox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { 78 int help; 79 if (!int.TryParse(timeframeTextbox.Text, out help)) { 80 errorProvider.SetError(timeframeTextbox, "Timeframe couldn't be parsed. Enter a valid integer value."); 81 e.Cancel = true; 82 } else { 83 if (help > 50) { 84 DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " + 85 "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo); 86 e.Cancel = !dr.Equals(DialogResult.Yes); 87 } else if (help < 0) { 88 errorProvider.SetError(timeframeTextbox, "The entered value can't be negative!"); 89 e.Cancel = true; 90 } 58 91 } 59 92 } 60 93 61 94 protected override void CalculateCorrelation() { 62 if ( CorrelationCalcComboBox.SelectedItem != null && PartitionComboBox.SelectedItem != null63 && VariableSelectionComboBox.SelectedItem != null && ValidateTimeframeTextbox()) {64 string variable = (string) VariableSelectionComboBox.SelectedItem;65 IDependencyCalculator calc = (IDependencyCalculator) CorrelationCalcComboBox.SelectedValue;66 string partition = (string) PartitionComboBox.SelectedValue;95 if (correlationCalcComboBox.SelectedItem != null && partitionComboBox.SelectedItem != null 96 && variableSelectionComboBox.SelectedItem != null) { 97 string variable = (string)variableSelectionComboBox.SelectedItem; 98 IDependencyCalculator calc = (IDependencyCalculator)correlationCalcComboBox.SelectedValue; 99 string partition = (string)partitionComboBox.SelectedValue; 67 100 int frames; 68 int.TryParse( TimeframeTextbox.Text, out frames);101 int.TryParse(timeframeTextbox.Text, out frames); 69 102 dataView.Enabled = false; 70 103 double[,] corr = correlationTimeframCache.GetTimeframeCorrelation(calc, partition, variable); … … 82 115 } 83 116 } 84 85 private bool ValidateTimeframeTextbox() {86 int help;87 if (!int.TryParse(TimeframeTextbox.Text, out help)) {88 MessageBox.Show("Timeframe couldn't be parsed. Enter a valid integer value.", "Parse Error", MessageBoxButtons.OK);89 return false;90 } else {91 if (help > 50) {92 DialogResult dr = MessageBox.Show("The entered value is bigger than 50. Are you sure you want to calculate? " +93 "The calculation could take some time.", "Huge Value Warning", MessageBoxButtons.YesNo);94 return dr.Equals(DialogResult.Yes);95 }96 }97 return true;98 }99 100 117 101 118 protected override void Content_CorrelationCalculationFinished(object sender, FeatureCorrelationCalculator.CorrelationCalculationFinishedArgs e) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
r8833 r8880 169 169 </Compile> 170 170 <Compile Include="FeatureCorrelation\FeatureCorrelationCalculator.cs" /> 171 <Compile Include="FeatureCorrelation\FeatureCorrelationHelpers.cs" />172 171 <Compile Include="FeatureCorrelation\FeatureCorrelationView.cs"> 173 172 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionFeatureCorrelationView.Designer.cs
r8689 r8880 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 23 partial class RegressionFeatureCorrelationView { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.Designer.cs
r8689 r8880 1 namespace HeuristicLab.Problems.DataAnalysis.Views { 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 namespace HeuristicLab.Problems.DataAnalysis.Views { 2 23 partial class RegressionTimeframeFeatureCorrelationView { 3 24 /// <summary> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionTimeframeFeatureCorrelationView.cs
r8833 r8880 37 37 } 38 38 39 protected override void SetVariableSelectionComboBox() { 40 base.SetVariableSelectionComboBox(); 41 variableSelectionComboBox.SelectedItem = Content.TargetVariable; 42 } 43 39 44 protected override bool[] SetInitialVariableVisibility() { 40 45 int i = Content.Dataset.DoubleVariables.ToList().FindIndex(x => x == Content.TargetVariable);
Note: See TracChangeset
for help on using the changeset viewer.