Changeset 10812 for branches/DataPreprocessing
- Timestamp:
- 05/07/14 13:20:12 (10 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.Designer.cs
r10809 r10812 54 54 this.mostCommonToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem(); 55 55 this.interpolationToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem(); 56 this.smoothingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();56 this.smoothingToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem(); 57 57 this.replaceValueOverSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 58 this.averageToolStripMenuItem_Selection = new System.Windows.Forms.ToolStripMenuItem(); … … 114 114 this.mostCommonToolStripMenuItem_Column, 115 115 this.interpolationToolStripMenuItem_Column, 116 this.smoothingToolStripMenuItem });116 this.smoothingToolStripMenuItem_Column}); 117 117 this.replaceValueOverColumnToolStripMenuItem.Name = "replaceValueOverColumnToolStripMenuItem"; 118 118 this.replaceValueOverColumnToolStripMenuItem.Size = new System.Drawing.Size(224, 22); … … 156 156 // smoothingToolStripMenuItem 157 157 // 158 this.smoothingToolStripMenuItem .Name = "smoothingToolStripMenuItem";159 this.smoothingToolStripMenuItem .Size = new System.Drawing.Size(155, 22);160 this.smoothingToolStripMenuItem .Text = "Smoothing";161 this.smoothingToolStripMenuItem .Click += new System.EventHandler(this.ReplaceWithSmoothing_Selection_Click);158 this.smoothingToolStripMenuItem_Column.Name = "smoothingToolStripMenuItem"; 159 this.smoothingToolStripMenuItem_Column.Size = new System.Drawing.Size(155, 22); 160 this.smoothingToolStripMenuItem_Column.Text = "Smoothing"; 161 this.smoothingToolStripMenuItem_Column.Click += new System.EventHandler(this.ReplaceWithSmoothing_Selection_Click); 162 162 // 163 163 // replaceValueOverSelectionToolStripMenuItem … … 264 264 private System.Windows.Forms.Button btnReplace; 265 265 private System.Windows.Forms.ToolTip toolTip; 266 private System.Windows.Forms.ToolStripMenuItem smoothingToolStripMenuItem ;266 private System.Windows.Forms.ToolStripMenuItem smoothingToolStripMenuItem_Column; 267 267 } 268 268 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10809 r10812 294 294 dataGridView[e.ColumnIndex, e.RowIndex].Selected = true; 295 295 } 296 interpolationToolStripMenuItem_Column.Enabled = !(e.RowIndex == 0 || e.RowIndex == Content.Rows); 296 297 297 var columnIndices = new HashSet<int>(); 298 298 for (int i = 0; i < dataGridView.SelectedCells.Count; i++) { 299 299 columnIndices.Add(dataGridView.SelectedCells[i].ColumnIndex); 300 300 } 301 averageToolStripMenuItem_Column.Enabled = medianToolStripMenuItem_Column.Enabled = randomToolStripMenuItem_Column.Enabled = !Content.DataGridLogic.AreAllStringColumns(columnIndices); 302 interpolationToolStripMenuItem_Column.Enabled = interpolationToolStripMenuItem_Column.Enabled && !Content.DataGridLogic.AreAllStringColumns(columnIndices); 301 averageToolStripMenuItem_Column.Enabled = 302 averageToolStripMenuItem_Selection.Enabled = 303 medianToolStripMenuItem_Column.Enabled = 304 medianToolStripMenuItem_Selection.Enabled = 305 randomToolStripMenuItem_Column.Enabled = 306 randomToolStripMenuItem_Selection.Enabled = !Content.DataGridLogic.AreAllStringColumns(columnIndices); 307 308 smoothingToolStripMenuItem_Column.Enabled = 309 interpolationToolStripMenuItem_Column.Enabled = !(e.RowIndex == 0 || e.RowIndex == Content.Rows) 310 && !Content.DataGridLogic.AreAllStringColumns(columnIndices); 311 303 312 replaceValueOverColumnToolStripMenuItem.Visible = true; 304 313 contextMenuCell.Show(MousePosition); … … 388 397 389 398 private void ReplaceWithAverage_Column_Click(object sender, EventArgs e) { 390 Content.ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), false);399 Content.ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), false); 391 400 } 392 401 private void ReplaceWithAverage_Selection_Click(object sender, EventArgs e) { -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticsLogic.cs
r10811 r10812 24 24 using System.Linq; 25 25 using HeuristicLab.Common; 26 using System.Collections;27 26 28 27 namespace HeuristicLab.DataPreprocessing { … … 139 138 double variance = double.NaN; 140 139 if (preprocessingData.IsType<double>(columnIndex)) { 141 variance = preprocessingData.GetValues<double>(columnIndex).Variance();140 variance = GetValuesWithoutNaN<double>(columnIndex).Variance(); 142 141 } else if (preprocessingData.IsType<DateTime>(columnIndex)) { 143 142 variance = GetDateTimeAsSeconds(columnIndex).Variance();
Note: See TracChangeset
for help on using the changeset viewer.