- Timestamp:
- 09/14/18 11:36:59 (6 years ago)
- Location:
- branches/2817-BinPackingSpeedup
- Files:
-
- 49 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
-
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/CheckedFilterCollectionView.cs
r15073 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/CheckedTransformationListView.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/CheckedTransformationListView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 51 51 // TODO: Avoid accessing parent view 52 52 var transformationView = (TransformationView)Parent; 53 var columnNames = transformationView.Content. Data.VariableNames;53 var columnNames = transformationView.Content.PreprocessingData.VariableNames; 54 54 55 55 return (ITransformation)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(new[] { columnNames }); -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ComparisonFilterView.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ComparisonFilterView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataCompletenessView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 52 52 53 53 private void InitData() { 54 IDictionary<int, IList<int>> missingValueIndices = Content.SearchLogic.GetMissingValueIndices(); 55 56 bool[,] valueMissing = new bool[Content.SearchLogic.Rows, Content.SearchLogic.Columns]; 57 foreach (var columnMissingValues in missingValueIndices) { 58 var column = columnMissingValues.Key; 59 foreach (var missingValueIndex in columnMissingValues.Value) 60 valueMissing[missingValueIndex, column] = true; 54 bool[,] valueMissing = new bool[Content.PreprocessingData.Rows, Content.PreprocessingData.Columns]; 55 for (int row = 0; row < Content.PreprocessingData.Rows; row++) { 56 for (int column = 0; column < Content.PreprocessingData.Columns; column++) 57 valueMissing[row, column] = Content.PreprocessingData.IsCellEmpty(column, row); 61 58 } 62 59 … … 78 75 //custom x axis label 79 76 double from = 0.5; 80 foreach (String columnName in Content. SearchLogic.VariableNames) {77 foreach (String columnName in Content.PreprocessingData.VariableNames) { 81 78 double to = from + 1; 82 79 chart.ChartAreas[0].AxisX.CustomLabels.Add(from, to, columnName); -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.Designer.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 54 54 this.mostCommonToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem(); 55 55 this.interpolationToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem(); 56 this.smoothingToolStripMenuItem_Column = new System.Windows.Forms.ToolStripMenuItem();57 56 this.replaceValueOverSelectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 57 this.averageToolStripMenuItem_Selection = new System.Windows.Forms.ToolStripMenuItem(); … … 63 62 this.btnReplace = new System.Windows.Forms.Button(); 64 63 this.toolTip = new System.Windows.Forms.ToolTip(this.components); 65 this.checkInputsTargetButton = new System.Windows.Forms.Button(); 66 this.uncheckAllButton = new System.Windows.Forms.Button(); 67 this.checkAllButton = new System.Windows.Forms.Button(); 64 this.shuffleWithinPartitionsCheckBox = new System.Windows.Forms.CheckBox(); 68 65 this.addRowButton = new System.Windows.Forms.Button(); 69 66 this.addColumnButton = new System.Windows.Forms.Button(); 70 67 this.renameColumnsButton = new System.Windows.Forms.Button(); 71 68 this.showVariablesGroupBox = new System.Windows.Forms.GroupBox(); 69 this.shuffleAllButton = new System.Windows.Forms.Button(); 70 this.checkInputsTargetButton = new System.Windows.Forms.Button(); 71 this.uncheckAllButton = new System.Windows.Forms.Button(); 72 this.checkAllButton = new System.Windows.Forms.Button(); 72 73 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 73 74 this.contextMenuCell.SuspendLayout(); … … 127 128 this.randomToolStripMenuItem_Column, 128 129 this.mostCommonToolStripMenuItem_Column, 129 this.interpolationToolStripMenuItem_Column, 130 this.smoothingToolStripMenuItem_Column}); 130 this.interpolationToolStripMenuItem_Column}); 131 131 this.replaceValueOverColumnToolStripMenuItem.Name = "replaceValueOverColumnToolStripMenuItem"; 132 132 this.replaceValueOverColumnToolStripMenuItem.Size = new System.Drawing.Size(223, 22); … … 167 167 this.interpolationToolStripMenuItem_Column.Text = "Interpolation"; 168 168 this.interpolationToolStripMenuItem_Column.Click += new System.EventHandler(this.ReplaceWithInterpolation_Column_Click); 169 //170 // smoothingToolStripMenuItem_Column171 //172 this.smoothingToolStripMenuItem_Column.Name = "smoothingToolStripMenuItem_Column";173 this.smoothingToolStripMenuItem_Column.Size = new System.Drawing.Size(155, 22);174 this.smoothingToolStripMenuItem_Column.Text = "Smoothing";175 this.smoothingToolStripMenuItem_Column.Click += new System.EventHandler(this.ReplaceWithSmoothing_Selection_Click);176 169 // 177 170 // replaceValueOverSelectionToolStripMenuItem … … 236 229 this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click); 237 230 // 231 // shuffleWithinPartitionsCheckBox 232 // 233 this.shuffleWithinPartitionsCheckBox.AutoSize = true; 234 this.shuffleWithinPartitionsCheckBox.Location = new System.Drawing.Point(444, 30); 235 this.shuffleWithinPartitionsCheckBox.Name = "shuffleWithinPartitionsCheckBox"; 236 this.shuffleWithinPartitionsCheckBox.Size = new System.Drawing.Size(102, 17); 237 this.shuffleWithinPartitionsCheckBox.TabIndex = 20; 238 this.shuffleWithinPartitionsCheckBox.Text = "Within Partitions"; 239 this.toolTip.SetToolTip(this.shuffleWithinPartitionsCheckBox, "If checked, the Training and Test partitions are shuffled separately. Otherwise a" + 240 "ll data is shuffled."); 241 this.shuffleWithinPartitionsCheckBox.UseVisualStyleBackColor = true; 242 // 243 // addRowButton 244 // 245 this.addRowButton.Location = new System.Drawing.Point(338, 26); 246 this.addRowButton.Name = "addRowButton"; 247 this.addRowButton.Size = new System.Drawing.Size(83, 23); 248 this.addRowButton.TabIndex = 10; 249 this.addRowButton.Text = "Add Datarow"; 250 this.addRowButton.UseVisualStyleBackColor = true; 251 this.addRowButton.Click += new System.EventHandler(this.addRowButton_Click); 252 // 253 // addColumnButton 254 // 255 this.addColumnButton.Location = new System.Drawing.Point(338, 0); 256 this.addColumnButton.Name = "addColumnButton"; 257 this.addColumnButton.Size = new System.Drawing.Size(83, 23); 258 this.addColumnButton.TabIndex = 10; 259 this.addColumnButton.Text = "Add Variable"; 260 this.addColumnButton.UseVisualStyleBackColor = true; 261 this.addColumnButton.Click += new System.EventHandler(this.addColumnButton_Click); 262 // 263 // renameColumnsButton 264 // 265 this.renameColumnsButton.Location = new System.Drawing.Point(228, 26); 266 this.renameColumnsButton.Name = "renameColumnsButton"; 267 this.renameColumnsButton.Size = new System.Drawing.Size(104, 23); 268 this.renameColumnsButton.TabIndex = 11; 269 this.renameColumnsButton.Text = "Rename Variables"; 270 this.renameColumnsButton.UseVisualStyleBackColor = true; 271 this.renameColumnsButton.Click += new System.EventHandler(this.renameColumnsButton_Click); 272 // 273 // showVariablesGroupBox 274 // 275 this.showVariablesGroupBox.Controls.Add(this.checkInputsTargetButton); 276 this.showVariablesGroupBox.Controls.Add(this.uncheckAllButton); 277 this.showVariablesGroupBox.Controls.Add(this.checkAllButton); 278 this.showVariablesGroupBox.Location = new System.Drawing.Point(564, 0); 279 this.showVariablesGroupBox.Name = "showVariablesGroupBox"; 280 this.showVariablesGroupBox.Size = new System.Drawing.Size(97, 49); 281 this.showVariablesGroupBox.TabIndex = 17; 282 this.showVariablesGroupBox.TabStop = false; 283 this.showVariablesGroupBox.Text = "Show Variables"; 284 // 285 // shuffleAllButton 286 // 287 this.shuffleAllButton.Location = new System.Drawing.Point(444, 0); 288 this.shuffleAllButton.Name = "shuffleAllButton"; 289 this.shuffleAllButton.Size = new System.Drawing.Size(102, 23); 290 this.shuffleAllButton.TabIndex = 19; 291 this.shuffleAllButton.Text = "Shuffle"; 292 this.shuffleAllButton.UseVisualStyleBackColor = true; 293 this.shuffleAllButton.Click += new System.EventHandler(this.shuffleAllButton_Click); 294 // 238 295 // checkInputsTargetButton 239 296 // … … 269 326 this.checkAllButton.Click += new System.EventHandler(this.checkAllButton_Click); 270 327 // 271 // addRowButton272 //273 this.addRowButton.Location = new System.Drawing.Point(338, 26);274 this.addRowButton.Name = "addRowButton";275 this.addRowButton.Size = new System.Drawing.Size(83, 23);276 this.addRowButton.TabIndex = 10;277 this.addRowButton.Text = "Add Datarow";278 this.addRowButton.UseVisualStyleBackColor = true;279 this.addRowButton.Click += new System.EventHandler(this.addRowButton_Click);280 //281 // addColumnButton282 //283 this.addColumnButton.Location = new System.Drawing.Point(338, 0);284 this.addColumnButton.Name = "addColumnButton";285 this.addColumnButton.Size = new System.Drawing.Size(83, 23);286 this.addColumnButton.TabIndex = 10;287 this.addColumnButton.Text = "Add Variable";288 this.addColumnButton.UseVisualStyleBackColor = true;289 this.addColumnButton.Click += new System.EventHandler(this.addColumnButton_Click);290 //291 // renameColumnsButton292 //293 this.renameColumnsButton.Location = new System.Drawing.Point(228, 26);294 this.renameColumnsButton.Name = "renameColumnsButton";295 this.renameColumnsButton.Size = new System.Drawing.Size(104, 23);296 this.renameColumnsButton.TabIndex = 11;297 this.renameColumnsButton.Text = "Rename Variables";298 this.renameColumnsButton.UseVisualStyleBackColor = true;299 this.renameColumnsButton.Click += new System.EventHandler(this.renameColumnsButton_Click);300 //301 // showVariablesGroupBox302 //303 this.showVariablesGroupBox.Controls.Add(this.checkInputsTargetButton);304 this.showVariablesGroupBox.Controls.Add(this.uncheckAllButton);305 this.showVariablesGroupBox.Controls.Add(this.checkAllButton);306 this.showVariablesGroupBox.Location = new System.Drawing.Point(448, 0);307 this.showVariablesGroupBox.Name = "showVariablesGroupBox";308 this.showVariablesGroupBox.Size = new System.Drawing.Size(97, 49);309 this.showVariablesGroupBox.TabIndex = 17;310 this.showVariablesGroupBox.TabStop = false;311 this.showVariablesGroupBox.Text = "Show Variables";312 //313 328 // DataGridContentView 314 329 // 315 330 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 316 331 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 332 this.Controls.Add(this.shuffleWithinPartitionsCheckBox); 333 this.Controls.Add(this.shuffleAllButton); 317 334 this.Controls.Add(this.showVariablesGroupBox); 318 335 this.Controls.Add(this.renameColumnsButton); … … 335 352 this.Controls.SetChildIndex(this.columnsTextBox, 0); 336 353 this.Controls.SetChildIndex(this.showVariablesGroupBox, 0); 354 this.Controls.SetChildIndex(this.shuffleAllButton, 0); 355 this.Controls.SetChildIndex(this.shuffleWithinPartitionsCheckBox, 0); 337 356 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 338 357 this.contextMenuCell.ResumeLayout(false); … … 361 380 private System.Windows.Forms.Button btnReplace; 362 381 private System.Windows.Forms.ToolTip toolTip; 363 private System.Windows.Forms.ToolStripMenuItem smoothingToolStripMenuItem_Column;364 382 private System.Windows.Forms.Button addRowButton; 365 383 private System.Windows.Forms.Button addColumnButton; … … 369 387 private System.Windows.Forms.Button uncheckAllButton; 370 388 private System.Windows.Forms.Button checkAllButton; 389 private System.Windows.Forms.Button shuffleAllButton; 390 private System.Windows.Forms.CheckBox shuffleWithinPartitionsCheckBox; 371 391 } 372 392 } -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 85 85 base.RegisterContentEvents(); 86 86 Content.Changed += Content_Changed; 87 Content. FilterLogic.FilterChanged += FilterLogic_FilterChanged;87 Content.PreprocessingData.FilterChanged += FilterLogic_FilterChanged; 88 88 } 89 89 … … 91 91 base.DeregisterContentEvents(); 92 92 Content.Changed -= Content_Changed; 93 Content. FilterLogic.FilterChanged -= FilterLogic_FilterChanged;93 Content.PreprocessingData.FilterChanged -= FilterLogic_FilterChanged; 94 94 } 95 95 … … 98 98 searchIterator = null; 99 99 if (findAndReplaceDialog != null && !findAndReplaceDialog.IsDisposed) { 100 if (Content. FilterLogic.IsFiltered) {100 if (Content.PreprocessingData.IsFiltered) { 101 101 findAndReplaceDialog.DisableReplace(); 102 102 } else { … … 104 104 } 105 105 } 106 btnReplace.Enabled = !Content. FilterLogic.IsFiltered;106 btnReplace.Enabled = !Content.PreprocessingData.IsFiltered; 107 107 } 108 108 … … 126 126 string errorMessage; 127 127 if (!String.IsNullOrEmpty(e.FormattedValue.ToString())) { 128 if (dataGridView.IsCurrentCellInEditMode && Content. FilterLogic.IsFiltered) {128 if (dataGridView.IsCurrentCellInEditMode && Content.PreprocessingData.IsFiltered) { 129 129 errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode."; 130 130 } else { … … 167 167 168 168 ReplaceTransaction(() => { 169 Content.Pre ProcessingData.InTransaction(() => {169 Content.PreprocessingData.InTransaction(() => { 170 170 for (int row = containsHeader ? 1 : 0; row < values.GetLength(1); row++) { 171 171 for (int col = 0; col < values.GetLength(0); col++) { … … 177 177 if (string.IsNullOrWhiteSpace(firstRow[i])) 178 178 firstRow[i] = string.Format("<{0}>", i); 179 Content.Pre ProcessingData.RenameColumns(firstRow);179 Content.PreprocessingData.RenameColumns(firstRow); 180 180 } 181 181 }); … … 224 224 if (e.Button == MouseButtons.Middle) { 225 225 int newIndex = e.ColumnIndex >= 0 ? e.ColumnIndex : 0; 226 Content.Pre ProcessingData.InsertColumn<double>(newIndex.ToString(), newIndex);226 Content.PreprocessingData.InsertColumn<double>(newIndex.ToString(), newIndex); 227 227 } else if (e.Button == MouseButtons.Right && Content.SortableView) { 228 228 SortColumn(e.ColumnIndex); … … 235 235 if (e.Button == MouseButtons.Middle) { 236 236 int newIndex = e.RowIndex >= 0 ? e.RowIndex : 0; 237 Content.Pre ProcessingData.InsertRow(newIndex);237 Content.PreprocessingData.InsertRow(newIndex); 238 238 } 239 239 } … … 248 248 } 249 249 250 private void btnApplySort_Click(object sender, System.EventArgs e) {251 Content. ManipulationLogic.ReOrderToIndices(virtualRowIndices);250 private void btnApplySort_Click(object sender, EventArgs e) { 251 Content.ReOrderToIndices(virtualRowIndices); 252 252 OnContentChanged(); 253 253 } … … 271 271 searchIterator = null; 272 272 DataGridView.SelectionChanged += DataGridView_SelectionChanged_FindAndReplace; 273 if (Content. FilterLogic.IsFiltered) {273 if (Content.PreprocessingData.IsFiltered) { 274 274 findAndReplaceDialog.DisableReplace(); 275 275 } … … 405 405 ComparisonOperation comparisonOperation = findAndReplaceDialog.GetComparisonOperation(); 406 406 var foundCells = new Dictionary<int, IList<int>>(); 407 for (int i = 0; i < Content. FilterLogic.PreprocessingData.Columns; i++) {407 for (int i = 0; i < Content.PreprocessingData.Columns; i++) { 408 408 var filters = CreateFilters(match, comparisonOperation, i); 409 409 410 bool[] filteredRows = Content.FilterLogic.GetFilterResult(filters, true);410 bool[] filteredRows = GetFilterResult(filters, true); 411 411 var foundIndices = new List<int>(); 412 412 for (int idx = 0; idx < filteredRows.Length; ++idx) { … … 427 427 } 428 428 429 private bool[] GetFilterResult(IList<IFilter> filters, bool isAndCombination) { 430 IList<IFilter> activeFilters = filters.Where(f => f.Active && f.ConstraintData != null).ToList(); 431 432 if (activeFilters.Count == 0) { 433 return Enumerable.Repeat(false, Content.PreprocessingData.Rows).ToArray(); ; 434 } 435 436 var result = Enumerable.Repeat(!isAndCombination, Content.PreprocessingData.Rows).ToArray(); 437 foreach (IFilter filter in activeFilters) { 438 bool[] filterResult = filter.Check(); 439 for (int row = 0; row < result.Length; ++row) { 440 result[row] = isAndCombination ? result[row] || filterResult[row] : result[row] && filterResult[row]; 441 } 442 } 443 return result; 444 } 445 429 446 private List<IFilter> CreateFilters(string match, ComparisonOperation comparisonOperation, int columnIndex) { 430 IPreprocessingData preprocessingData = Content. FilterLogic.PreprocessingData;447 IPreprocessingData preprocessingData = Content.PreprocessingData; 431 448 IStringConvertibleValue value; 432 449 if (preprocessingData.VariableHasType<double>(columnIndex)) { … … 473 490 switch (findAndReplaceDialog.GetReplaceAction()) { 474 491 case ReplaceAction.Value: 475 Content. ManipulationLogic.ReplaceIndicesByValue(cells, findAndReplaceDialog.GetReplaceText());492 Content.ReplaceIndicesByString(cells, findAndReplaceDialog.GetReplaceText()); 476 493 break; 477 494 case ReplaceAction.Average: 478 Content. ManipulationLogic.ReplaceIndicesByAverageValue(cells, false);495 Content.ReplaceIndicesByMean(cells, false); 479 496 break; 480 497 case ReplaceAction.Median: 481 Content. ManipulationLogic.ReplaceIndicesByMedianValue(cells, false);498 Content.ReplaceIndicesByMedianValue(cells, false); 482 499 break; 483 500 case ReplaceAction.Random: 484 Content. ManipulationLogic.ReplaceIndicesByRandomValue(cells, false);501 Content.ReplaceIndicesByRandomValue(cells, false); 485 502 break; 486 503 case ReplaceAction.MostCommon: 487 Content. ManipulationLogic.ReplaceIndicesByMostCommonValue(cells, false);504 Content.ReplaceIndicesByMode(cells, false); 488 505 break; 489 506 case ReplaceAction.Interpolation: 490 Content. ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(cells);507 Content.ReplaceIndicesByLinearInterpolationOfNeighbours(cells); 491 508 break; 492 509 } … … 506 523 507 524 #endregion FindAndReplaceDialog 508 509 525 private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 510 526 if (Content == null) return; … … 531 547 medianToolStripMenuItem_Selection.Enabled = 532 548 randomToolStripMenuItem_Column.Enabled = 533 randomToolStripMenuItem_Selection.Enabled = !Content.PreProcessingData.AreAllStringColumns(columnIndices); 534 535 smoothingToolStripMenuItem_Column.Enabled = 536 interpolationToolStripMenuItem_Column.Enabled = !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, 0]) 537 && !dataGridView.SelectedCells.Contains(dataGridView[e.ColumnIndex, Content.Rows - 1]) 538 && !Content.PreProcessingData.AreAllStringColumns(columnIndices); 549 randomToolStripMenuItem_Selection.Enabled = !Content.PreprocessingData.AreAllStringColumns(columnIndices); 539 550 540 551 replaceValueOverColumnToolStripMenuItem.Visible = true; … … 547 558 base.dataGridView_KeyDown(sender, e); 548 559 //data is in read only mode.... 549 if (Content. FilterLogic.IsFiltered) return;560 if (Content.PreprocessingData.IsFiltered) return; 550 561 551 562 if (e.KeyCode == Keys.Delete) { … … 581 592 } 582 593 583 foreach (var selectedCell in dataGridView.SelectedCells) { 584 var cell = (DataGridViewCell)selectedCell; 594 foreach (DataGridViewCell cell in dataGridView.SelectedCells) { 585 595 if (!selectedCells.ContainsKey(cell.ColumnIndex)) 586 selectedCells.Add(cell.ColumnIndex, new List<int>( 1024));596 selectedCells.Add(cell.ColumnIndex, new List<int>()); 587 597 selectedCells[cell.ColumnIndex].Add(cell.RowIndex); 588 598 } … … 591 601 } 592 602 593 private void StartReplacing() {603 private void ReplaceTransaction(Action action) { 594 604 SuspendRepaint(); 595 } 596 597 private void StopReplacing() { 605 action(); 598 606 ResumeRepaint(true); 599 }600 601 private void ReplaceTransaction(Action action) {602 StartReplacing();603 action();604 StopReplacing();605 607 } 606 608 … … 616 618 617 619 #region ContextMenu Events 618 619 620 private void ReplaceWithAverage_Column_Click(object sender, EventArgs e) { 620 621 ReplaceTransaction(() => { 621 Content. ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), false);622 Content.ReplaceIndicesByMean(GetSelectedCells(), false); 622 623 }); 623 624 } 624 625 private void ReplaceWithAverage_Selection_Click(object sender, EventArgs e) { 625 626 ReplaceTransaction(() => { 626 Content. ManipulationLogic.ReplaceIndicesByAverageValue(GetSelectedCells(), true);627 Content.ReplaceIndicesByMean(GetSelectedCells(), true); 627 628 }); 628 629 } … … 630 631 private void ReplaceWithMedian_Column_Click(object sender, EventArgs e) { 631 632 ReplaceTransaction(() => { 632 Content. ManipulationLogic.ReplaceIndicesByMedianValue(GetSelectedCells(), false);633 Content.ReplaceIndicesByMedianValue(GetSelectedCells(), false); 633 634 }); 634 635 } 635 636 private void ReplaceWithMedian_Selection_Click(object sender, EventArgs e) { 636 637 ReplaceTransaction(() => { 637 Content. ManipulationLogic.ReplaceIndicesByMedianValue(GetSelectedCells(), true);638 Content.ReplaceIndicesByMedianValue(GetSelectedCells(), true); 638 639 }); 639 640 } … … 641 642 private void ReplaceWithRandom_Column_Click(object sender, EventArgs e) { 642 643 ReplaceTransaction(() => { 643 Content. ManipulationLogic.ReplaceIndicesByRandomValue(GetSelectedCells(), false);644 Content.ReplaceIndicesByRandomValue(GetSelectedCells(), false); 644 645 }); 645 646 } 646 647 private void ReplaceWithRandom_Selection_Click(object sender, EventArgs e) { 647 648 ReplaceTransaction(() => { 648 Content. ManipulationLogic.ReplaceIndicesByRandomValue(GetSelectedCells(), true);649 Content.ReplaceIndicesByRandomValue(GetSelectedCells(), true); 649 650 }); 650 651 } … … 652 653 private void ReplaceWithMostCommon_Column_Click(object sender, EventArgs e) { 653 654 ReplaceTransaction(() => { 654 Content. ManipulationLogic.ReplaceIndicesByMostCommonValue(GetSelectedCells(), false);655 Content.ReplaceIndicesByMode(GetSelectedCells(), false); 655 656 }); 656 657 } 657 658 private void ReplaceWithMostCommon_Selection_Click(object sender, EventArgs e) { 658 659 ReplaceTransaction(() => { 659 Content. ManipulationLogic.ReplaceIndicesByMostCommonValue(GetSelectedCells(), true);660 Content.ReplaceIndicesByMode(GetSelectedCells(), true); 660 661 }); 661 662 } … … 663 664 private void ReplaceWithInterpolation_Column_Click(object sender, EventArgs e) { 664 665 ReplaceTransaction(() => { 665 Content.ManipulationLogic.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells()); 666 }); 667 } 668 669 private void ReplaceWithSmoothing_Selection_Click(object sender, EventArgs e) { 670 ReplaceTransaction(() => { 671 Content.ManipulationLogic.ReplaceIndicesBySmoothing(GetSelectedCells()); 666 Content.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells()); 672 667 }); 673 668 } … … 675 670 676 671 private void addRowButton_Click(object sender, EventArgs e) { 677 Content.Pre ProcessingData.InsertRow(Content.Rows);672 Content.PreprocessingData.InsertRow(Content.Rows); 678 673 } 679 674 680 675 private void addColumnButton_Click(object sender, EventArgs e) { 681 Content.Pre ProcessingData.InsertColumn<double>(Content.Columns.ToString(), Content.Columns);676 Content.PreprocessingData.InsertColumn<double>(Content.Columns.ToString(), Content.Columns); 682 677 } 683 678 … … 686 681 687 682 if (renameDialog.ShowDialog(this) == DialogResult.OK) { 688 Content.Pre ProcessingData.RenameColumns(renameDialog.ColumnNames);683 Content.PreprocessingData.RenameColumns(renameDialog.ColumnNames); 689 684 } 690 685 } … … 693 688 foreach (DataGridViewColumn column in DataGridView.Columns) { 694 689 var variable = column.HeaderText; 695 bool isInputTarget = Content.Pre ProcessingData.InputVariables.Contains(variable)696 || Content.Pre ProcessingData.TargetVariable == variable;690 bool isInputTarget = Content.PreprocessingData.InputVariables.Contains(variable) 691 || Content.PreprocessingData.TargetVariable == variable; 697 692 column.Visible = isInputTarget; 698 693 } … … 710 705 } 711 706 } 707 708 private void shuffleAllButton_Click(object sender, EventArgs e) { 709 Content.Shuffle(shuffleWithinPartitionsCheckBox.Checked); 710 } 712 711 } 713 712 } -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingMenuItem.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs
r15185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 49 49 if (Content != null) { 50 50 var data = Content.Data; 51 var filterLogic = new FilterLogic(data);52 var searchLogic = new SearchLogic(data, filterLogic);53 var statisticsLogic = new StatisticsLogic(data, searchLogic);54 var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic);55 51 56 52 var viewShortcuts = new ItemList<IViewShortcut> { 57 new DataGridContent(data , manipulationLogic, filterLogic),58 new StatisticsContent(data , statisticsLogic),53 new DataGridContent(data), 54 new StatisticsContent(data), 59 55 60 56 new LineChartContent(data), … … 63 59 new MultiScatterPlotContent(data), 64 60 new CorrelationMatrixContent(Content), 65 new DataCompletenessChartContent( searchLogic),66 67 new FilterContent( filterLogic),68 new ManipulationContent( manipulationLogic, searchLogic, filterLogic),69 new TransformationContent(data , filterLogic)61 new DataCompletenessChartContent(data), 62 63 new FilterContent(data), 64 new ManipulationContent(data), 65 new TransformationContent(data) 70 66 }; 71 67 … … 150 146 importProblemDataTypeContextMenuStrip.Show(Cursor.Position); 151 147 } 152 private void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) {153 Import(new RegressionCSVInstanceProvider(), new RegressionImportDialog(),154 (dialog => ((RegressionImportDialog)dialog).ImportType));155 } 156 private void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) {157 Import(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(),158 (dialog => ((ClassificationImportDialog)dialog).ImportType));159 } 160 private void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) {161 Import(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(),162 (dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType));163 } 164 private void Import<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog,148 private async void importRegressionToolStripMenuItem_Click(object sender, EventArgs e) { 149 await ImportAsync(new RegressionCSVInstanceProvider(), new RegressionImportDialog(), 150 dialog => ((RegressionImportDialog)dialog).ImportType); 151 } 152 private async void importClassificationToolStripMenuItem_Click(object sender, EventArgs e) { 153 await ImportAsync(new ClassificationCSVInstanceProvider(), new ClassificationImportDialog(), 154 dialog => ((ClassificationImportDialog)dialog).ImportType); 155 } 156 private async void importTimeSeriesToolStripMenuItem_Click(object sender, EventArgs e) { 157 await ImportAsync(new TimeSeriesPrognosisCSVInstanceProvider(), new TimeSeriesPrognosisImportDialog(), 158 dialog => ((TimeSeriesPrognosisImportDialog)dialog).ImportType); 159 } 160 private async Task ImportAsync<TProblemData, TImportType>(DataAnalysisInstanceProvider<TProblemData, TImportType> instanceProvider, DataAnalysisImportDialog importDialog, 165 161 Func<DataAnalysisImportDialog, TImportType> getImportType) 166 162 where TProblemData : class, IDataAnalysisProblemData 167 163 where TImportType : DataAnalysisImportType { 168 164 if (importDialog.ShowDialog() == DialogResult.OK) { 169 Task.Run(() => {165 await Task.Run(() => { 170 166 TProblemData instance; 171 167 var mainForm = (MainForm.WindowsForms.MainForm)MainFormManager.MainForm; -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.Designer.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 46 46 private void InitializeComponent() { 47 47 this.groupBoxFilter = new System.Windows.Forms.GroupBox(); 48 this.checkedFilterView = new HeuristicLab.DataPreprocessing.Views.CheckedFilterCollectionView();49 48 this.groupBoxFilterInfo = new System.Windows.Forms.GroupBox(); 50 49 this.lblPercentage = new System.Windows.Forms.Label(); … … 63 62 this.label3 = new System.Windows.Forms.Label(); 64 63 this.bottomPanel = new System.Windows.Forms.Panel(); 64 this.checkedFilterView = new HeuristicLab.DataPreprocessing.Views.CheckedFilterCollectionView(); 65 65 this.groupBoxFilter.SuspendLayout(); 66 66 this.groupBoxFilterInfo.SuspendLayout(); … … 80 80 this.groupBoxFilter.TabStop = false; 81 81 this.groupBoxFilter.Text = "Filter"; 82 //83 // checkedFilterView84 //85 this.checkedFilterView.Caption = "filterView";86 this.checkedFilterView.Content = null;87 this.checkedFilterView.Dock = System.Windows.Forms.DockStyle.Fill;88 this.checkedFilterView.Location = new System.Drawing.Point(3, 16);89 this.checkedFilterView.Name = "checkedFilterView";90 this.checkedFilterView.ReadOnly = false;91 this.checkedFilterView.ShowDetails = true;92 this.checkedFilterView.Size = new System.Drawing.Size(652, 308);93 this.checkedFilterView.TabIndex = 0;94 82 // 95 83 // groupBoxFilterInfo … … 185 173 this.rBtnOr.AutoSize = true; 186 174 this.rBtnOr.Cursor = System.Windows.Forms.Cursors.Default; 187 this.rBtnOr.Enabled = false;188 175 this.rBtnOr.Location = new System.Drawing.Point(53, 6); 189 176 this.rBtnOr.Name = "rBtnOr"; … … 199 186 this.rBtnAnd.Checked = true; 200 187 this.rBtnAnd.Cursor = System.Windows.Forms.Cursors.Default; 201 this.rBtnAnd.Enabled = false;202 188 this.rBtnAnd.Location = new System.Drawing.Point(3, 6); 203 189 this.rBtnAnd.Name = "rBtnAnd"; … … 273 259 this.bottomPanel.Size = new System.Drawing.Size(670, 30); 274 260 this.bottomPanel.TabIndex = 13; 261 // 262 // checkedFilterView 263 // 264 this.checkedFilterView.Caption = "filterView"; 265 this.checkedFilterView.Content = null; 266 this.checkedFilterView.Dock = System.Windows.Forms.DockStyle.Fill; 267 this.checkedFilterView.Location = new System.Drawing.Point(3, 16); 268 this.checkedFilterView.Name = "checkedFilterView"; 269 this.checkedFilterView.ReadOnly = false; 270 this.checkedFilterView.ShowDetails = true; 271 this.checkedFilterView.Size = new System.Drawing.Size(652, 308); 272 this.checkedFilterView.TabIndex = 0; 275 273 // 276 274 // FilterView -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/FilterView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Linq; 25 24 using HeuristicLab.Collections; … … 44 43 } 45 44 46 private void InitData() {47 checkedFilterView.Content = Content.Filters;48 checkedFilterView.Content.ItemsAdded += Content_ItemsAdded;49 checkedFilterView.Content.ItemsRemoved += Content_ItemsRemoved;50 checkedFilterView.Content.CheckedItemsChanged += Content_CheckedItemsChanged;51 }52 53 45 protected override void OnContentChanged() { 54 46 base.OnContentChanged(); 55 47 if (Content != null) { 56 InitData(); 57 UpdateFilterInfo(); 48 checkedFilterView.Content = Content.Filters; 49 rBtnAnd.Checked = Content.IsAndCombination; 50 rBtnOr.Checked = !Content.IsAndCombination; 51 UpdateFilter(); 52 } else { 53 checkedFilterView.Content = null; 58 54 } 59 55 } 56 protected override void RegisterContentEvents() { 57 base.RegisterContentEvents(); 58 Content.Filters.ItemsAdded += Content_ItemsAdded; 59 Content.Filters.ItemsRemoved += Content_ItemsRemoved; 60 Content.Filters.CheckedItemsChanged += Content_CheckedItemsChanged; 61 } 62 protected override void DeregisterContentEvents() { 63 Content.Filters.ItemsAdded -= Content_ItemsAdded; 64 Content.Filters.ItemsRemoved -= Content_ItemsRemoved; 65 Content.Filters.CheckedItemsChanged -= Content_CheckedItemsChanged; 66 base.DeregisterContentEvents(); 67 } 60 68 69 private void UpdateFilter() { 70 bool activeFilters = Content.ActiveFilters.Any(); 71 applyFilterButton.Enabled = activeFilters; 72 73 Content.PreprocessingData.ResetFilter(); 74 75 int numTotal = Content.PreprocessingData.Rows; 76 int numRemaining = numTotal; 77 78 if (activeFilters) { 79 var remainingRows = Content.GetRemainingRows(); 80 numRemaining = remainingRows.Count(x => x); 81 82 if (numRemaining < numTotal) { 83 Content.PreprocessingData.SetFilter(remainingRows); 84 } 85 } 86 87 tbRemaining.Text = numRemaining.ToString(); 88 double ratio = numTotal > 0 ? numRemaining / (double)numTotal : 0.0; 89 tbPercentage.Text = ratio.ToString("P4"); 90 tbTotal.Text = numTotal.ToString(); 91 } 92 93 94 #region Content Events 95 //whenever a new filter is added the preprocessing data is set to the filter 96 private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) { 97 if (Content != null) { 98 foreach (IFilter filter in e.Items) { 99 filter.ConstrainedValue = Content.PreprocessingData; 100 } 101 } 102 } 103 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) { 104 if (Content != null) { 105 UpdateFilter(); 106 } 107 } 61 108 private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) { 62 109 if (Content != null) { … … 64 111 filter.Active = checkedFilterView.Content.ItemChecked(filter); 65 112 } 66 UpdateFilter Info();113 UpdateFilter(); 67 114 } 68 115 } 116 #endregion 69 117 70 private void UpdateFilterInfo() { 71 List<IFilter> filters = Content.Filters.ToList(); 72 int activeFilters = filters.Count(c => c.Active); 73 applyFilterButton.Enabled = (activeFilters > 0); 74 rBtnAnd.Enabled = (activeFilters > 0); 75 rBtnOr.Enabled = (activeFilters > 0); 76 Content.FilterLogic.Reset(); 77 bool[] result = Content.FilterLogic.Preview(filters, rBtnAnd.Checked); 78 79 int filteredCnt = result.Count(c => !c); 80 81 tbRemaining.Text = filteredCnt.ToString(); 82 double percentage = result.Length == 0 ? 0.0 : filteredCnt * 100 / (double)result.Length; 83 tbPercentage.Text = String.Format("{0:0.0000}%", percentage); 84 tbTotal.Text = result.Length.ToString(); 118 #region Controls Events 119 private void rBtnAnd_CheckedChanged(object sender, EventArgs e) { 120 if (Content != null) { 121 Content.IsAndCombination = rBtnAnd.Checked; 122 UpdateFilter(); 123 } 85 124 } 86 87 125 private void applyFilterButton_Click(object sender, EventArgs e) { 88 126 if (Content != null) { 89 List<IFilter> filters = Content.Filters.ToList();90 127 //apply filters 91 Content.FilterLogic.Apply(filters, rBtnAnd.Checked); 128 Content.PreprocessingData.PersistFilter(); 129 Content.PreprocessingData.ResetFilter(); 92 130 //deactivate checked filters 93 filters = checkedFilterView.Content.CheckedItems.ToList(); 94 foreach (IFilter filter in filters) { 131 foreach (var filter in Content.Filters.CheckedItems.ToList()) { 95 132 checkedFilterView.Content.SetItemCheckedState(filter, false); 96 133 filter.Active = false; 97 134 } 98 UpdateFilter Info();135 UpdateFilter(); 99 136 } 100 137 } 101 102 //whenever a new filter is added the preprocessing data is set to the filter 103 private void Content_ItemsAdded(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) { 104 if (Content != null) { 105 foreach (IFilter filter in e.Items) { 106 filter.ConstrainedValue = Content.FilterLogic.PreprocessingData; 107 } 108 } 109 } 110 111 private void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IFilter> e) { 112 if (Content != null) { 113 UpdateFilterInfo(); 114 } 115 } 116 117 private void rBtnAnd_CheckedChanged(object sender, EventArgs e) { 118 if (Content != null) { 119 UpdateFilterInfo(); 120 Content.IsAndCombination = rBtnAnd.Checked; 121 } 122 } 138 #endregion 123 139 } 124 140 } -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/LineChartView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 62 62 this.txtDeleteRowsInfo = new System.Windows.Forms.TextBox(); 63 63 this.label5 = new System.Windows.Forms.Label(); 64 this.tabReplaceMissingValues = new System.Windows.Forms.TabPage();65 this.txtReplaceValue = new System.Windows.Forms.TextBox();66 this.cmbVariableNames = new System.Windows.Forms.ComboBox();67 this.cmbReplaceWith = new System.Windows.Forms.ComboBox();68 this.lblValueColon = new System.Windows.Forms.Label();69 this.label8 = new System.Windows.Forms.Label();70 this.label10 = new System.Windows.Forms.Label();71 this.tabDataShuffle = new System.Windows.Forms.TabPage();72 this.shuffleSeparatelyCheckbox = new System.Windows.Forms.CheckBox();73 this.lblShuffleProperties = new System.Windows.Forms.Label();74 64 this.grpBoxPreview = new System.Windows.Forms.GroupBox(); 75 65 this.tabsPreview = new System.Windows.Forms.TabControl(); … … 77 67 this.lblPreviewInActive = new System.Windows.Forms.Label(); 78 68 this.tabPreviewDeleteColumnsInfo = new System.Windows.Forms.TabPage(); 69 this.panel1 = new System.Windows.Forms.Panel(); 79 70 this.lblPreviewColumnsInfo = new System.Windows.Forms.Label(); 80 71 this.tabPreviewDeleteColumnsVariance = new System.Windows.Forms.TabPage(); 72 this.panel2 = new System.Windows.Forms.Panel(); 73 this.lblPreviewColumnsVariance = new System.Windows.Forms.Label(); 81 74 this.label12 = new System.Windows.Forms.Label(); 82 this.lblPreviewColumnsVariance = new System.Windows.Forms.Label();83 75 this.tabPreviewDeleteRowsInfo = new System.Windows.Forms.TabPage(); 84 76 this.lblPreviewRowsInfo = new System.Windows.Forms.Label(); 85 this.tabPreviewReplaceMissingValues = new System.Windows.Forms.TabPage();86 this.lblPreviewReplaceMissingValues = new System.Windows.Forms.Label();87 this.tabPreviewShuffle = new System.Windows.Forms.TabPage();88 this.lblPreviewShuffle = new System.Windows.Forms.Label();89 77 this.label9 = new System.Windows.Forms.Label(); 90 this.panel1 = new System.Windows.Forms.Panel();91 this.panel2 = new System.Windows.Forms.Panel();92 78 this.grpBoxData.SuspendLayout(); 93 79 this.tabsData.SuspendLayout(); … … 96 82 this.tabDataDeleteColumnsVariance.SuspendLayout(); 97 83 this.tabDataDeleteRowsInfo.SuspendLayout(); 98 this.tabReplaceMissingValues.SuspendLayout();99 this.tabDataShuffle.SuspendLayout();100 84 this.grpBoxPreview.SuspendLayout(); 101 85 this.tabsPreview.SuspendLayout(); 102 86 this.tabPreviewInactive.SuspendLayout(); 103 87 this.tabPreviewDeleteColumnsInfo.SuspendLayout(); 88 this.panel1.SuspendLayout(); 104 89 this.tabPreviewDeleteColumnsVariance.SuspendLayout(); 90 this.panel2.SuspendLayout(); 105 91 this.tabPreviewDeleteRowsInfo.SuspendLayout(); 106 this.tabPreviewReplaceMissingValues.SuspendLayout();107 this.tabPreviewShuffle.SuspendLayout();108 this.panel1.SuspendLayout();109 this.panel2.SuspendLayout();110 92 this.SuspendLayout(); 111 93 // 112 94 // lstMethods 113 95 // 114 this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 96 this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 115 97 | System.Windows.Forms.AnchorStyles.Right))); 116 98 this.lstMethods.FormattingEnabled = true; 117 this.lstMethods.ItemHeight = 16;118 99 this.lstMethods.Items.AddRange(new object[] { 119 100 "Delete Columns with insufficient Information", 120 101 "Delete Columns with insufficient Variance", 121 "Delete Rows with insufficient Information", 122 "Replace Missing Values", 123 "Shuffle Data"}); 124 this.lstMethods.Location = new System.Drawing.Point(4, 4); 125 this.lstMethods.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 102 "Delete Rows with insufficient Information"}); 103 this.lstMethods.Location = new System.Drawing.Point(3, 3); 126 104 this.lstMethods.Name = "lstMethods"; 127 this.lstMethods.Size = new System.Drawing.Size( 976, 116);105 this.lstMethods.Size = new System.Drawing.Size(733, 95); 128 106 this.lstMethods.Sorted = true; 129 107 this.lstMethods.TabIndex = 0; … … 134 112 this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 135 113 this.btnApply.Enabled = false; 136 this.btnApply.Location = new System.Drawing.Point(804, 615); 137 this.btnApply.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 114 this.btnApply.Location = new System.Drawing.Point(603, 500); 138 115 this.btnApply.Name = "btnApply"; 139 this.btnApply.Size = new System.Drawing.Size(1 72, 28);116 this.btnApply.Size = new System.Drawing.Size(129, 23); 140 117 this.btnApply.TabIndex = 2; 141 118 this.btnApply.Text = "Apply Manipulation"; … … 145 122 // grpBoxData 146 123 // 147 this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 124 this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 148 125 | System.Windows.Forms.AnchorStyles.Right))); 149 126 this.grpBoxData.Controls.Add(this.tabsData); 150 this.grpBoxData.Location = new System.Drawing.Point(5, 129); 151 this.grpBoxData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 127 this.grpBoxData.Location = new System.Drawing.Point(4, 105); 152 128 this.grpBoxData.Name = "grpBoxData"; 153 this.grpBoxData.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); 154 this.grpBoxData.Size = new System.Drawing.Size(976, 233); 129 this.grpBoxData.Size = new System.Drawing.Size(732, 189); 155 130 this.grpBoxData.TabIndex = 3; 156 131 this.grpBoxData.TabStop = false; … … 159 134 // tabsData 160 135 // 161 this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 136 this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 162 137 | System.Windows.Forms.AnchorStyles.Right))); 163 138 this.tabsData.Controls.Add(this.tabPage1); … … 165 140 this.tabsData.Controls.Add(this.tabDataDeleteColumnsVariance); 166 141 this.tabsData.Controls.Add(this.tabDataDeleteRowsInfo); 167 this.tabsData.Controls.Add(this.tabReplaceMissingValues);168 this.tabsData.Controls.Add(this.tabDataShuffle);169 142 this.tabsData.ItemSize = new System.Drawing.Size(58, 18); 170 this.tabsData.Location = new System.Drawing.Point(8, 23); 171 this.tabsData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 143 this.tabsData.Location = new System.Drawing.Point(6, 19); 172 144 this.tabsData.Name = "tabsData"; 173 145 this.tabsData.SelectedIndex = 0; 174 this.tabsData.Size = new System.Drawing.Size( 959, 202);146 this.tabsData.Size = new System.Drawing.Size(719, 164); 175 147 this.tabsData.TabIndex = 3; 176 148 // … … 179 151 this.tabPage1.Controls.Add(this.label7); 180 152 this.tabPage1.Location = new System.Drawing.Point(4, 22); 181 this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);182 153 this.tabPage1.Name = "tabPage1"; 183 this.tabPage1.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);184 this.tabPage1.Size = new System.Drawing.Size( 951, 176);154 this.tabPage1.Padding = new System.Windows.Forms.Padding(3); 155 this.tabPage1.Size = new System.Drawing.Size(711, 138); 185 156 this.tabPage1.TabIndex = 5; 186 157 this.tabPage1.Text = "tabDataInactive"; … … 191 162 this.label7.AutoSize = true; 192 163 this.label7.Enabled = false; 193 this.label7.Location = new System.Drawing.Point(4, 4); 194 this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 164 this.label7.Location = new System.Drawing.Point(3, 3); 195 165 this.label7.Name = "label7"; 196 this.label7.Size = new System.Drawing.Size( 345, 17);166 this.label7.Size = new System.Drawing.Size(259, 13); 197 167 this.label7.TabIndex = 1; 198 168 this.label7.Text = "Please select one of the manipulation methods above"; … … 204 174 this.tabDataDeleteColumnsInformation.Controls.Add(this.label1); 205 175 this.tabDataDeleteColumnsInformation.Location = new System.Drawing.Point(4, 22); 206 this.tabDataDeleteColumnsInformation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);207 176 this.tabDataDeleteColumnsInformation.Name = "tabDataDeleteColumnsInformation"; 208 this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);209 this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size( 951, 176);177 this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding(3); 178 this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size(711, 138); 210 179 this.tabDataDeleteColumnsInformation.TabIndex = 0; 211 180 this.tabDataDeleteColumnsInformation.Text = "del columns info"; … … 215 184 // 216 185 this.label2.AutoSize = true; 217 this.label2.Location = new System.Drawing.Point(272, 4); 218 this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 186 this.label2.Location = new System.Drawing.Point(204, 3); 219 187 this.label2.Name = "label2"; 220 this.label2.Size = new System.Drawing.Size( 120, 17);188 this.label2.Size = new System.Drawing.Size(89, 13); 221 189 this.label2.TabIndex = 5; 222 190 this.label2.Text = "% missing values."; … … 224 192 // txtDeleteColumnsInfo 225 193 // 226 this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(219, 0); 227 this.txtDeleteColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 194 this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(164, 0); 228 195 this.txtDeleteColumnsInfo.Name = "txtDeleteColumnsInfo"; 229 this.txtDeleteColumnsInfo.Size = new System.Drawing.Size( 44, 22);196 this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(34, 20); 230 197 this.txtDeleteColumnsInfo.TabIndex = 4; 231 198 this.txtDeleteColumnsInfo.TextChanged += new System.EventHandler(this.txtDeleteColumnsInfo_TextChanged); … … 234 201 // 235 202 this.label1.AutoSize = true; 236 this.label1.Location = new System.Drawing.Point(4, 4); 237 this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 203 this.label1.Location = new System.Drawing.Point(3, 3); 238 204 this.label1.Name = "label1"; 239 this.label1.Size = new System.Drawing.Size( 205, 17);205 this.label1.Size = new System.Drawing.Size(155, 13); 240 206 this.label1.TabIndex = 3; 241 207 this.label1.Text = "Delete columns with more than "; … … 246 212 this.tabDataDeleteColumnsVariance.Controls.Add(this.label4); 247 213 this.tabDataDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22); 248 this.tabDataDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);249 214 this.tabDataDeleteColumnsVariance.Name = "tabDataDeleteColumnsVariance"; 250 this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);251 this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size( 951, 176);215 this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3); 216 this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(711, 138); 252 217 this.tabDataDeleteColumnsVariance.TabIndex = 1; 253 218 this.tabDataDeleteColumnsVariance.Text = "del columns variance"; … … 256 221 // txtDeleteColumnsVariance 257 222 // 258 this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(305, 0); 259 this.txtDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 223 this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(229, 0); 260 224 this.txtDeleteColumnsVariance.Name = "txtDeleteColumnsVariance"; 261 this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(1 79, 22);225 this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(135, 20); 262 226 this.txtDeleteColumnsVariance.TabIndex = 4; 263 227 this.txtDeleteColumnsVariance.TextChanged += new System.EventHandler(this.txtDeleteColumnsVariance_TextChanged); … … 266 230 // 267 231 this.label4.AutoSize = true; 268 this.label4.Location = new System.Drawing.Point(4, 4); 269 this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 232 this.label4.Location = new System.Drawing.Point(3, 3); 270 233 this.label4.Name = "label4"; 271 this.label4.Size = new System.Drawing.Size(2 92, 17);234 this.label4.Size = new System.Drawing.Size(220, 13); 272 235 this.label4.TabIndex = 3; 273 236 this.label4.Text = "Delete columns with a variance smaller than "; … … 279 242 this.tabDataDeleteRowsInfo.Controls.Add(this.label5); 280 243 this.tabDataDeleteRowsInfo.Location = new System.Drawing.Point(4, 22); 281 this.tabDataDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);282 244 this.tabDataDeleteRowsInfo.Name = "tabDataDeleteRowsInfo"; 283 this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);284 this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size( 951, 176);245 this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3); 246 this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(711, 138); 285 247 this.tabDataDeleteRowsInfo.TabIndex = 2; 286 248 this.tabDataDeleteRowsInfo.Text = "del rows info"; … … 290 252 // 291 253 this.label3.AutoSize = true; 292 this.label3.Location = new System.Drawing.Point(252, 4); 293 this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 254 this.label3.Location = new System.Drawing.Point(189, 3); 294 255 this.label3.Name = "label3"; 295 this.label3.Size = new System.Drawing.Size( 120, 17);256 this.label3.Size = new System.Drawing.Size(89, 13); 296 257 this.label3.TabIndex = 8; 297 258 this.label3.Text = "% missing values."; … … 299 260 // txtDeleteRowsInfo 300 261 // 301 this.txtDeleteRowsInfo.Location = new System.Drawing.Point(196, 0); 302 this.txtDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 262 this.txtDeleteRowsInfo.Location = new System.Drawing.Point(147, 0); 303 263 this.txtDeleteRowsInfo.Name = "txtDeleteRowsInfo"; 304 this.txtDeleteRowsInfo.Size = new System.Drawing.Size( 44, 22);264 this.txtDeleteRowsInfo.Size = new System.Drawing.Size(34, 20); 305 265 this.txtDeleteRowsInfo.TabIndex = 7; 306 266 this.txtDeleteRowsInfo.TextChanged += new System.EventHandler(this.txtDeleteRowsInfo_TextChanged); … … 309 269 // 310 270 this.label5.AutoSize = true; 311 this.label5.Location = new System.Drawing.Point(4, 4); 312 this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 271 this.label5.Location = new System.Drawing.Point(3, 3); 313 272 this.label5.Name = "label5"; 314 this.label5.Size = new System.Drawing.Size(1 82, 17);273 this.label5.Size = new System.Drawing.Size(138, 13); 315 274 this.label5.TabIndex = 6; 316 275 this.label5.Text = "Delete rows with more than "; 317 276 // 318 // tabReplaceMissingValues319 //320 this.tabReplaceMissingValues.Controls.Add(this.txtReplaceValue);321 this.tabReplaceMissingValues.Controls.Add(this.cmbVariableNames);322 this.tabReplaceMissingValues.Controls.Add(this.cmbReplaceWith);323 this.tabReplaceMissingValues.Controls.Add(this.lblValueColon);324 this.tabReplaceMissingValues.Controls.Add(this.label8);325 this.tabReplaceMissingValues.Controls.Add(this.label10);326 this.tabReplaceMissingValues.Location = new System.Drawing.Point(4, 22);327 this.tabReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);328 this.tabReplaceMissingValues.Name = "tabReplaceMissingValues";329 this.tabReplaceMissingValues.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);330 this.tabReplaceMissingValues.Size = new System.Drawing.Size(951, 176);331 this.tabReplaceMissingValues.TabIndex = 6;332 this.tabReplaceMissingValues.Text = "repl missing vals";333 this.tabReplaceMissingValues.UseVisualStyleBackColor = true;334 //335 // txtReplaceValue336 //337 this.txtReplaceValue.Location = new System.Drawing.Point(231, 33);338 this.txtReplaceValue.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);339 this.txtReplaceValue.Name = "txtReplaceValue";340 this.txtReplaceValue.Size = new System.Drawing.Size(132, 22);341 this.txtReplaceValue.TabIndex = 2;342 this.txtReplaceValue.TextChanged += new System.EventHandler(this.txtReplaceValue_TextChanged);343 //344 // cmbVariableNames345 //346 this.cmbVariableNames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;347 this.cmbVariableNames.FormattingEnabled = true;348 this.cmbVariableNames.Location = new System.Drawing.Point(189, 0);349 this.cmbVariableNames.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);350 this.cmbVariableNames.Name = "cmbVariableNames";351 this.cmbVariableNames.Size = new System.Drawing.Size(160, 24);352 this.cmbVariableNames.TabIndex = 1;353 this.cmbVariableNames.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);354 //355 // cmbReplaceWith356 //357 this.cmbReplaceWith.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;358 this.cmbReplaceWith.FormattingEnabled = true;359 this.cmbReplaceWith.Items.AddRange(new object[] {360 "Value",361 "Average",362 "Median",363 "Most Common",364 "Random"});365 this.cmbReplaceWith.Location = new System.Drawing.Point(47, 33);366 this.cmbReplaceWith.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);367 this.cmbReplaceWith.Name = "cmbReplaceWith";368 this.cmbReplaceWith.Size = new System.Drawing.Size(160, 24);369 this.cmbReplaceWith.TabIndex = 1;370 this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);371 //372 // lblValueColon373 //374 this.lblValueColon.AutoSize = true;375 this.lblValueColon.Location = new System.Drawing.Point(209, 37);376 this.lblValueColon.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);377 this.lblValueColon.Name = "lblValueColon";378 this.lblValueColon.Size = new System.Drawing.Size(12, 17);379 this.lblValueColon.TabIndex = 0;380 this.lblValueColon.Text = ":";381 //382 // label8383 //384 this.label8.AutoSize = true;385 this.label8.Location = new System.Drawing.Point(4, 37);386 this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);387 this.label8.Name = "label8";388 this.label8.Size = new System.Drawing.Size(32, 17);389 this.label8.TabIndex = 0;390 this.label8.Text = "with";391 //392 // label10393 //394 this.label10.AutoSize = true;395 this.label10.Location = new System.Drawing.Point(4, 4);396 this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);397 this.label10.Name = "label10";398 this.label10.Size = new System.Drawing.Size(177, 17);399 this.label10.TabIndex = 0;400 this.label10.Text = "Replace missing values for";401 //402 // tabDataShuffle403 //404 this.tabDataShuffle.Controls.Add(this.shuffleSeparatelyCheckbox);405 this.tabDataShuffle.Controls.Add(this.lblShuffleProperties);406 this.tabDataShuffle.Location = new System.Drawing.Point(4, 22);407 this.tabDataShuffle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);408 this.tabDataShuffle.Name = "tabDataShuffle";409 this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);410 this.tabDataShuffle.Size = new System.Drawing.Size(951, 176);411 this.tabDataShuffle.TabIndex = 4;412 this.tabDataShuffle.Text = "shuffle";413 this.tabDataShuffle.UseVisualStyleBackColor = true;414 //415 // shuffleSeparatelyCheckbox416 //417 this.shuffleSeparatelyCheckbox.AutoSize = true;418 this.shuffleSeparatelyCheckbox.Location = new System.Drawing.Point(8, 2);419 this.shuffleSeparatelyCheckbox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);420 this.shuffleSeparatelyCheckbox.Name = "shuffleSeparatelyCheckbox";421 this.shuffleSeparatelyCheckbox.Size = new System.Drawing.Size(312, 21);422 this.shuffleSeparatelyCheckbox.TabIndex = 1;423 this.shuffleSeparatelyCheckbox.Text = "Shuffle training and test partitions separately";424 this.shuffleSeparatelyCheckbox.UseVisualStyleBackColor = true;425 //426 // lblShuffleProperties427 //428 this.lblShuffleProperties.AutoSize = true;429 this.lblShuffleProperties.Enabled = false;430 this.lblShuffleProperties.Location = new System.Drawing.Point(4, 4);431 this.lblShuffleProperties.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);432 this.lblShuffleProperties.Name = "lblShuffleProperties";433 this.lblShuffleProperties.Size = new System.Drawing.Size(154, 17);434 this.lblShuffleProperties.TabIndex = 0;435 this.lblShuffleProperties.Text = "No properties available";436 //437 277 // grpBoxPreview 438 278 // 439 this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 440 | System.Windows.Forms.AnchorStyles.Left) 279 this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 280 | System.Windows.Forms.AnchorStyles.Left) 441 281 | System.Windows.Forms.AnchorStyles.Right))); 442 282 this.grpBoxPreview.Controls.Add(this.tabsPreview); 443 this.grpBoxPreview.Location = new System.Drawing.Point(5, 370); 444 this.grpBoxPreview.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 283 this.grpBoxPreview.Location = new System.Drawing.Point(4, 301); 445 284 this.grpBoxPreview.Name = "grpBoxPreview"; 446 this.grpBoxPreview.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); 447 this.grpBoxPreview.Size = new System.Drawing.Size(976, 238); 285 this.grpBoxPreview.Size = new System.Drawing.Size(732, 193); 448 286 this.grpBoxPreview.TabIndex = 4; 449 287 this.grpBoxPreview.TabStop = false; … … 452 290 // tabsPreview 453 291 // 454 this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 292 this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 455 293 | System.Windows.Forms.AnchorStyles.Right))); 456 294 this.tabsPreview.Controls.Add(this.tabPreviewInactive); … … 458 296 this.tabsPreview.Controls.Add(this.tabPreviewDeleteColumnsVariance); 459 297 this.tabsPreview.Controls.Add(this.tabPreviewDeleteRowsInfo); 460 this.tabsPreview.Controls.Add(this.tabPreviewReplaceMissingValues);461 this.tabsPreview.Controls.Add(this.tabPreviewShuffle);462 298 this.tabsPreview.ItemSize = new System.Drawing.Size(58, 18); 463 this.tabsPreview.Location = new System.Drawing.Point(8, 23); 464 this.tabsPreview.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); 299 this.tabsPreview.Location = new System.Drawing.Point(6, 19); 465 300 this.tabsPreview.Name = "tabsPreview"; 466 301 this.tabsPreview.SelectedIndex = 0; 467 this.tabsPreview.Size = new System.Drawing.Size( 959, 207);302 this.tabsPreview.Size = new System.Drawing.Size(719, 168); 468 303 this.tabsPreview.TabIndex = 3; 469 304 // … … 472 307 this.tabPreviewInactive.Controls.Add(this.lblPreviewInActive); 473 308 this.tabPreviewInactive.Location = new System.Drawing.Point(4, 22); 474 this.tabPreviewInactive.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);475 309 this.tabPreviewInactive.Name = "tabPreviewInactive"; 476 this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);477 this.tabPreviewInactive.Size = new System.Drawing.Size( 951, 181);310 this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding(3); 311 this.tabPreviewInactive.Size = new System.Drawing.Size(711, 142); 478 312 this.tabPreviewInactive.TabIndex = 5; 479 313 this.tabPreviewInactive.Text = "inactive"; … … 483 317 // 484 318 this.lblPreviewInActive.AutoSize = true; 485 this.lblPreviewInActive.Location = new System.Drawing.Point(4, 4); 486 this.lblPreviewInActive.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 319 this.lblPreviewInActive.Location = new System.Drawing.Point(3, 3); 487 320 this.lblPreviewInActive.Name = "lblPreviewInActive"; 488 this.lblPreviewInActive.Size = new System.Drawing.Size( 491, 51);321 this.lblPreviewInActive.Size = new System.Drawing.Size(361, 39); 489 322 this.lblPreviewInActive.TabIndex = 2; 490 323 this.lblPreviewInActive.Text = "Filters are active and thus manipulations cannot be applied!\r\n\r\nPlease deactive t" + … … 496 329 this.tabPreviewDeleteColumnsInfo.Controls.Add(this.panel1); 497 330 this.tabPreviewDeleteColumnsInfo.Location = new System.Drawing.Point(4, 22); 498 this.tabPreviewDeleteColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);499 331 this.tabPreviewDeleteColumnsInfo.Name = "tabPreviewDeleteColumnsInfo"; 500 this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);501 this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size( 951, 181);332 this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding(3); 333 this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size(711, 142); 502 334 this.tabPreviewDeleteColumnsInfo.TabIndex = 0; 503 335 this.tabPreviewDeleteColumnsInfo.Text = "del columns info"; 504 336 this.tabPreviewDeleteColumnsInfo.UseVisualStyleBackColor = true; 505 337 // 338 // panel1 339 // 340 this.panel1.AutoScroll = true; 341 this.panel1.Controls.Add(this.lblPreviewColumnsInfo); 342 this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 343 this.panel1.Location = new System.Drawing.Point(3, 3); 344 this.panel1.Margin = new System.Windows.Forms.Padding(2); 345 this.panel1.Name = "panel1"; 346 this.panel1.Size = new System.Drawing.Size(705, 136); 347 this.panel1.TabIndex = 2; 348 // 506 349 // lblPreviewColumnsInfo 507 350 // … … 509 352 this.lblPreviewColumnsInfo.Dock = System.Windows.Forms.DockStyle.Left; 510 353 this.lblPreviewColumnsInfo.Location = new System.Drawing.Point(0, 0); 511 this.lblPreviewColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);512 354 this.lblPreviewColumnsInfo.Name = "lblPreviewColumnsInfo"; 513 this.lblPreviewColumnsInfo.Size = new System.Drawing.Size( 423, 17);355 this.lblPreviewColumnsInfo.Size = new System.Drawing.Size(318, 13); 514 356 this.lblPreviewColumnsInfo.TabIndex = 1; 515 357 this.lblPreviewColumnsInfo.Text = "{0} columns with more than {1} % missing values would be deleted"; … … 520 362 this.tabPreviewDeleteColumnsVariance.Controls.Add(this.label12); 521 363 this.tabPreviewDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22); 522 this.tabPreviewDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);523 364 this.tabPreviewDeleteColumnsVariance.Name = "tabPreviewDeleteColumnsVariance"; 524 this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);525 this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size( 951, 181);365 this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3); 366 this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size(711, 142); 526 367 this.tabPreviewDeleteColumnsVariance.TabIndex = 1; 527 368 this.tabPreviewDeleteColumnsVariance.Text = "del columns variance"; 528 369 this.tabPreviewDeleteColumnsVariance.UseVisualStyleBackColor = true; 529 370 // 530 // label12 531 // 532 this.label12.AutoSize = true; 533 this.label12.Location = new System.Drawing.Point(8, 27); 534 this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 535 this.label12.Name = "label12"; 536 this.label12.Size = new System.Drawing.Size(0, 17); 537 this.label12.TabIndex = 2; 371 // panel2 372 // 373 this.panel2.AutoScroll = true; 374 this.panel2.Controls.Add(this.lblPreviewColumnsVariance); 375 this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; 376 this.panel2.Location = new System.Drawing.Point(3, 3); 377 this.panel2.Margin = new System.Windows.Forms.Padding(2); 378 this.panel2.Name = "panel2"; 379 this.panel2.Size = new System.Drawing.Size(705, 136); 380 this.panel2.TabIndex = 3; 538 381 // 539 382 // lblPreviewColumnsVariance … … 542 385 this.lblPreviewColumnsVariance.Dock = System.Windows.Forms.DockStyle.Left; 543 386 this.lblPreviewColumnsVariance.Location = new System.Drawing.Point(0, 0); 544 this.lblPreviewColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);545 387 this.lblPreviewColumnsVariance.Name = "lblPreviewColumnsVariance"; 546 this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(3 98, 17);388 this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(301, 13); 547 389 this.lblPreviewColumnsVariance.TabIndex = 2; 548 390 this.lblPreviewColumnsVariance.Text = "{0} columns with a variance smaller than {1} would be deleted."; 549 391 // 392 // label12 393 // 394 this.label12.AutoSize = true; 395 this.label12.Location = new System.Drawing.Point(6, 22); 396 this.label12.Name = "label12"; 397 this.label12.Size = new System.Drawing.Size(0, 13); 398 this.label12.TabIndex = 2; 399 // 550 400 // tabPreviewDeleteRowsInfo 551 401 // 552 402 this.tabPreviewDeleteRowsInfo.Controls.Add(this.lblPreviewRowsInfo); 553 403 this.tabPreviewDeleteRowsInfo.Location = new System.Drawing.Point(4, 22); 554 this.tabPreviewDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);555 404 this.tabPreviewDeleteRowsInfo.Name = "tabPreviewDeleteRowsInfo"; 556 this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding( 4, 4, 4, 4);557 this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size( 951, 181);405 this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3); 406 this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size(711, 142); 558 407 this.tabPreviewDeleteRowsInfo.TabIndex = 2; 559 408 this.tabPreviewDeleteRowsInfo.Text = "del rows info"; … … 563 412 // 564 413 this.lblPreviewRowsInfo.AutoSize = true; 565 this.lblPreviewRowsInfo.Location = new System.Drawing.Point(4, 4); 566 this.lblPreviewRowsInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 414 this.lblPreviewRowsInfo.Location = new System.Drawing.Point(3, 3); 567 415 this.lblPreviewRowsInfo.Name = "lblPreviewRowsInfo"; 568 this.lblPreviewRowsInfo.Size = new System.Drawing.Size( 400, 17);416 this.lblPreviewRowsInfo.Size = new System.Drawing.Size(301, 13); 569 417 this.lblPreviewRowsInfo.TabIndex = 2; 570 418 this.lblPreviewRowsInfo.Text = "{0} rows with more than {1} % missing values would be deleted"; 571 //572 // tabPreviewReplaceMissingValues573 //574 this.tabPreviewReplaceMissingValues.Controls.Add(this.lblPreviewReplaceMissingValues);575 this.tabPreviewReplaceMissingValues.Location = new System.Drawing.Point(4, 22);576 this.tabPreviewReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);577 this.tabPreviewReplaceMissingValues.Name = "tabPreviewReplaceMissingValues";578 this.tabPreviewReplaceMissingValues.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);579 this.tabPreviewReplaceMissingValues.Size = new System.Drawing.Size(951, 181);580 this.tabPreviewReplaceMissingValues.TabIndex = 6;581 this.tabPreviewReplaceMissingValues.Text = "repl missing vals";582 this.tabPreviewReplaceMissingValues.UseVisualStyleBackColor = true;583 //584 // lblPreviewReplaceMissingValues585 //586 this.lblPreviewReplaceMissingValues.AutoSize = true;587 this.lblPreviewReplaceMissingValues.Location = new System.Drawing.Point(4, 4);588 this.lblPreviewReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);589 this.lblPreviewReplaceMissingValues.Name = "lblPreviewReplaceMissingValues";590 this.lblPreviewReplaceMissingValues.Size = new System.Drawing.Size(449, 17);591 this.lblPreviewReplaceMissingValues.TabIndex = 3;592 this.lblPreviewReplaceMissingValues.Text = "{0} cells detected with missing values which would be replaced with {1}";593 //594 // tabPreviewShuffle595 //596 this.tabPreviewShuffle.Controls.Add(this.lblPreviewShuffle);597 this.tabPreviewShuffle.Location = new System.Drawing.Point(4, 22);598 this.tabPreviewShuffle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);599 this.tabPreviewShuffle.Name = "tabPreviewShuffle";600 this.tabPreviewShuffle.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);601 this.tabPreviewShuffle.Size = new System.Drawing.Size(951, 181);602 this.tabPreviewShuffle.TabIndex = 4;603 this.tabPreviewShuffle.Text = "shuffle";604 this.tabPreviewShuffle.UseVisualStyleBackColor = true;605 //606 // lblPreviewShuffle607 //608 this.lblPreviewShuffle.AutoSize = true;609 this.lblPreviewShuffle.Location = new System.Drawing.Point(4, 4);610 this.lblPreviewShuffle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);611 this.lblPreviewShuffle.Name = "lblPreviewShuffle";612 this.lblPreviewShuffle.Size = new System.Drawing.Size(337, 17);613 this.lblPreviewShuffle.TabIndex = 0;614 this.lblPreviewShuffle.Text = "Data will be shuffled randomly - preview not possible";615 419 // 616 420 // label9 … … 621 425 this.label9.TabIndex = 0; 622 426 // 623 // panel1624 //625 this.panel1.AutoScroll = true;626 this.panel1.Controls.Add(this.lblPreviewColumnsInfo);627 this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;628 this.panel1.Location = new System.Drawing.Point(4, 4);629 this.panel1.Name = "panel1";630 this.panel1.Size = new System.Drawing.Size(943, 173);631 this.panel1.TabIndex = 2;632 //633 // panel2634 //635 this.panel2.AutoScroll = true;636 this.panel2.Controls.Add(this.lblPreviewColumnsVariance);637 this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;638 this.panel2.Location = new System.Drawing.Point(4, 4);639 this.panel2.Name = "panel2";640 this.panel2.Size = new System.Drawing.Size(943, 173);641 this.panel2.TabIndex = 3;642 //643 427 // ManipulationView 644 428 // 645 this.AutoScaleDimensions = new System.Drawing.SizeF( 8F, 16F);429 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 646 430 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 647 431 this.Controls.Add(this.btnApply); … … 649 433 this.Controls.Add(this.grpBoxData); 650 434 this.Controls.Add(this.lstMethods); 651 this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);652 435 this.Name = "ManipulationView"; 653 this.Size = new System.Drawing.Size( 985, 651);436 this.Size = new System.Drawing.Size(739, 529); 654 437 this.grpBoxData.ResumeLayout(false); 655 438 this.tabsData.ResumeLayout(false); … … 662 445 this.tabDataDeleteRowsInfo.ResumeLayout(false); 663 446 this.tabDataDeleteRowsInfo.PerformLayout(); 664 this.tabReplaceMissingValues.ResumeLayout(false);665 this.tabReplaceMissingValues.PerformLayout();666 this.tabDataShuffle.ResumeLayout(false);667 this.tabDataShuffle.PerformLayout();668 447 this.grpBoxPreview.ResumeLayout(false); 669 448 this.tabsPreview.ResumeLayout(false); … … 671 450 this.tabPreviewInactive.PerformLayout(); 672 451 this.tabPreviewDeleteColumnsInfo.ResumeLayout(false); 452 this.panel1.ResumeLayout(false); 453 this.panel1.PerformLayout(); 673 454 this.tabPreviewDeleteColumnsVariance.ResumeLayout(false); 674 455 this.tabPreviewDeleteColumnsVariance.PerformLayout(); 456 this.panel2.ResumeLayout(false); 457 this.panel2.PerformLayout(); 675 458 this.tabPreviewDeleteRowsInfo.ResumeLayout(false); 676 459 this.tabPreviewDeleteRowsInfo.PerformLayout(); 677 this.tabPreviewReplaceMissingValues.ResumeLayout(false);678 this.tabPreviewReplaceMissingValues.PerformLayout();679 this.tabPreviewShuffle.ResumeLayout(false);680 this.tabPreviewShuffle.PerformLayout();681 this.panel1.ResumeLayout(false);682 this.panel1.PerformLayout();683 this.panel2.ResumeLayout(false);684 this.panel2.PerformLayout();685 460 this.ResumeLayout(false); 686 461 … … 697 472 private System.Windows.Forms.TabPage tabPreviewDeleteColumnsVariance; 698 473 private System.Windows.Forms.TabPage tabPreviewDeleteRowsInfo; 699 private System.Windows.Forms.TabPage tabPreviewShuffle;700 private System.Windows.Forms.Label lblPreviewShuffle;701 474 private System.Windows.Forms.TabPage tabPreviewInactive; 702 475 private System.Windows.Forms.Label lblPreviewColumnsInfo; … … 704 477 private System.Windows.Forms.Label lblPreviewColumnsVariance; 705 478 private System.Windows.Forms.Label lblPreviewRowsInfo; 706 private System.Windows.Forms.TabPage tabPreviewReplaceMissingValues;707 private System.Windows.Forms.Label lblPreviewReplaceMissingValues;708 479 private System.Windows.Forms.Label label9; 709 480 private System.Windows.Forms.TabControl tabsData; … … 721 492 private System.Windows.Forms.TextBox txtDeleteRowsInfo; 722 493 private System.Windows.Forms.Label label5; 723 private System.Windows.Forms.TabPage tabReplaceMissingValues;724 private System.Windows.Forms.TextBox txtReplaceValue;725 private System.Windows.Forms.ComboBox cmbReplaceWith;726 private System.Windows.Forms.Label lblValueColon;727 private System.Windows.Forms.Label label10;728 private System.Windows.Forms.TabPage tabDataShuffle;729 private System.Windows.Forms.Label lblShuffleProperties;730 private System.Windows.Forms.ComboBox cmbVariableNames;731 private System.Windows.Forms.Label label8;732 494 private System.Windows.Forms.Label lblPreviewInActive; 733 private System.Windows.Forms.CheckBox shuffleSeparatelyCheckbox;734 495 private System.Windows.Forms.Panel panel1; 735 496 private System.Windows.Forms.Panel panel2; -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Drawing; 25 24 using System.Globalization; … … 44 43 public ManipulationView() { 45 44 InitializeComponent(); 46 cmbReplaceWith.SelectedIndex = 0;47 45 tabsData.Appearance = TabAppearance.FlatButtons; 48 46 tabsData.ItemSize = new Size(0, 1); … … 56 54 () => ValidateDeleteColumnsVariance(), 57 55 () => ValidateDeleteRowsInfo(), 58 () => ValidateReplaceWith(),59 () => ValidateShuffle()60 56 }; 61 57 62 58 manipulations = new Action[] { 63 () => Content.ManipulationLogic.DeleteColumnsWithMissingValuesGreater(GetDeleteColumnsInfo()), 64 () => Content.ManipulationLogic.DeleteColumnsWithVarianceSmaller(GetDeleteColumnsVariance()), 65 () => Content.ManipulationLogic.DeleteRowsWithMissingValuesGreater(GetRowsColumnsInfo()), 66 () => ReplaceMissingValues(), 67 () => Content.ManipulationLogic.Shuffle(shuffleSeparatelyCheckbox.Checked) 59 () => Content.DeleteColumnsWithMissingValuesGreater(GetDeleteColumnsInfo()), 60 () => Content.DeleteColumnsWithVarianceSmaller(GetDeleteColumnsVariance()), 61 () => Content.DeleteRowsWithMissingValuesGreater(GetRowsColumnsInfo()), 68 62 }; 69 63 } … … 72 66 base.OnContentChanged(); 73 67 if (Content != null) { 74 cmbVariableNames.Items.Clear();75 foreach (var name in Content.ManipulationLogic.VariableNames) {76 cmbVariableNames.Items.Add(name);77 }78 cmbVariableNames.SelectedIndex = 0;79 68 CheckFilters(); 80 69 } … … 83 72 protected override void RegisterContentEvents() { 84 73 base.RegisterContentEvents(); 85 Content. FilterLogic.FilterChanged += FilterLogic_FilterChanged;74 Content.PreprocessingData.FilterChanged += FilterLogic_FilterChanged; 86 75 } 87 76 88 77 protected override void DeregisterContentEvents() { 89 Content. FilterLogic.FilterChanged -= FilterLogic_FilterChanged;78 Content.PreprocessingData.FilterChanged -= FilterLogic_FilterChanged; 90 79 base.DeregisterContentEvents(); 91 80 } … … 98 87 99 88 private void CheckFilters() { 100 if (Content. FilterLogic.IsFiltered) {89 if (Content.PreprocessingData.IsFiltered) { 101 90 tabsPreview.SelectedIndex = 0; 102 91 lstMethods.Enabled = false; … … 126 115 } 127 116 128 private void ReplaceMissingValues() {129 var allIndices = Content.SearchLogic.GetMissingValueIndices();130 var columnIndex = cmbVariableNames.SelectedIndex;131 var columnIndices = new Dictionary<int, IList<int>>{132 {columnIndex, allIndices[columnIndex]}133 };134 135 switch (cmbReplaceWith.SelectedIndex) {136 case 0: //Value137 Content.ManipulationLogic.ReplaceIndicesByValue(columnIndices, txtReplaceValue.Text);138 break;139 case 1: //Average140 Content.ManipulationLogic.ReplaceIndicesByAverageValue(columnIndices);141 break;142 case 2: //Median143 Content.ManipulationLogic.ReplaceIndicesByMedianValue(columnIndices);144 break;145 case 3: //Most Common146 Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(columnIndices);147 break;148 case 4: //Random149 Content.ManipulationLogic.ReplaceIndicesByRandomValue(columnIndices);150 break;151 }152 }153 154 117 private void ValidateDeleteColumnsInfo() { 155 118 ValidateDoubleTextBox(txtDeleteColumnsInfo.Text); 156 119 if (btnApply.Enabled) { 157 var filteredColumns = Content. ManipulationLogic.ColumnsWithMissingValuesGreater(GetDeleteColumnsInfo());120 var filteredColumns = Content.ColumnsWithMissingValuesGreater(GetDeleteColumnsInfo()); 158 121 int count = filteredColumns.Count; 159 int columnCount = Content. FilterLogic.PreprocessingData.Columns;122 int columnCount = Content.PreprocessingData.Columns; 160 123 lblPreviewColumnsInfo.Text = string.Format("{0} column{1} of {2} ({3}) were detected with more than {4}% missing values.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsInfo.Text); 161 124 … … 165 128 sb.Append(Environment.NewLine); 166 129 sb.Append("Columns: "); 167 sb.Append(Content. SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));130 sb.Append(Content.PreprocessingData.VariableNames.ElementAt(filteredColumns.ElementAt(0))); 168 131 for (int i = 1; i < filteredColumns.Count; i++) { 169 string columnName = Content. SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));132 string columnName = Content.PreprocessingData.VariableNames.ElementAt(filteredColumns.ElementAt(i)); 170 133 sb.Append(", "); 171 134 sb.Append(columnName); … … 186 149 ValidateDoubleTextBox(txtDeleteColumnsVariance.Text); 187 150 if (btnApply.Enabled) { 188 var filteredColumns = Content. ManipulationLogic.ColumnsWithVarianceSmaller(GetDeleteColumnsVariance());151 var filteredColumns = Content.ColumnsWithVarianceSmaller(GetDeleteColumnsVariance()); 189 152 int count = filteredColumns.Count; 190 int columnCount = Content. FilterLogic.PreprocessingData.Columns;153 int columnCount = Content.PreprocessingData.Columns; 191 154 lblPreviewColumnsVariance.Text = string.Format("{0} column{1} of {2} ({3}) were detected with a variance smaller than {4}.", count, (count > 1 || count == 0 ? "s" : ""), columnCount, string.Format("{0:F2}%", 100d / columnCount * count), txtDeleteColumnsVariance.Text); 192 155 … … 196 159 sb.Append(Environment.NewLine); 197 160 sb.Append("Columns: "); 198 sb.Append(Content. SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));161 sb.Append(Content.PreprocessingData.VariableNames.ElementAt(filteredColumns.ElementAt(0))); 199 162 for (int i = 1; i < filteredColumns.Count; i++) { 200 string columnName = Content. SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));163 string columnName = Content.PreprocessingData.VariableNames.ElementAt(filteredColumns.ElementAt(i)); 201 164 sb.Append(", "); 202 165 sb.Append(columnName); … … 217 180 ValidateDoubleTextBox(txtDeleteRowsInfo.Text); 218 181 if (btnApply.Enabled) { 219 int count = Content. ManipulationLogic.RowsWithMissingValuesGreater(GetRowsColumnsInfo()).Count;220 int rowCount = Content. FilterLogic.PreprocessingData.Rows;182 int count = Content.RowsWithMissingValuesGreater(GetRowsColumnsInfo()).Count; 183 int rowCount = Content.PreprocessingData.Rows; 221 184 lblPreviewRowsInfo.Text = count + " row" + (count > 1 || count == 0 ? "s" : "") + " of " + rowCount + " (" + string.Format("{0:F2}%", 100d / rowCount * count) + ") were detected with more than " + txtDeleteRowsInfo.Text + "% missing values."; 222 185 if (count > 0) { … … 228 191 lblPreviewRowsInfo.Text = "Preview not possible yet - please input the limit above."; 229 192 } 230 }231 232 private void ValidateReplaceWith() {233 btnApply.Enabled = false;234 string replaceWith = (string)cmbReplaceWith.SelectedItem;235 int columnIndex = cmbVariableNames.SelectedIndex;236 237 if (cmbReplaceWith.SelectedIndex == 0) {238 string errorMessage;239 string replaceValue = txtReplaceValue.Text;240 if (string.IsNullOrEmpty(replaceValue)) {241 lblPreviewReplaceMissingValues.Text = "Preview not possible yet - please input the text which will be used as replacement.";242 } else if (!Content.ManipulationLogic.PreProcessingData.Validate(txtReplaceValue.Text, out errorMessage, columnIndex)) {243 lblPreviewReplaceMissingValues.Text = "Preview not possible yet - " + errorMessage;244 } else {245 btnApply.Enabled = true;246 }247 replaceWith = "\"" + replaceValue + "\"";248 } else {249 btnApply.Enabled = true;250 }251 if (btnApply.Enabled) {252 var allIndices = Content.SearchLogic.GetMissingValueIndices();253 int count = allIndices[columnIndex].Count;254 int cellCount = Content.FilterLogic.PreprocessingData.Rows * Content.FilterLogic.PreprocessingData.Columns;255 lblPreviewReplaceMissingValues.Text = count + " cell" + (count > 1 || count == 0 ? "s" : "")256 + " of " + cellCount + " (" + string.Format("{0:F2}%", 100d / cellCount * count) + ") were detected with missing values which would be replaced with " + replaceWith;257 if (count > 0) {258 lblPreviewReplaceMissingValues.Text += Environment.NewLine + Environment.NewLine + "Please press the button \"Apply Manipulation\" if you wish to perform the replacement.";259 } else {260 btnApply.Enabled = false;261 }262 }263 }264 265 private void ValidateShuffle() {266 btnApply.Enabled = true;267 lblShuffleProperties.Enabled = false;268 lblShuffleProperties.Visible = false;269 shuffleSeparatelyCheckbox.Enabled = true;270 shuffleSeparatelyCheckbox.Visible = true;271 193 } 272 194 … … 295 217 lblPreviewRowsInfo.Text = "rows successfully deleted."; 296 218 break; 297 case 3:298 lblPreviewReplaceMissingValues.Text = "missing values successfully replaced.";299 btnApply.Enabled = false;300 break;301 case 4:302 lblPreviewShuffle.Text = "dataset shuffled successfully.";303 btnApply.Enabled = false;304 break;305 219 } 306 220 } … … 327 241 ValidateDeleteRowsInfo(); 328 242 } 329 330 private void cmbReplaceWith_SelectedIndexChanged(object sender, EventArgs e) {331 bool isReplaceWithValueSelected = cmbReplaceWith.SelectedIndex == 0;332 lblValueColon.Visible = isReplaceWithValueSelected;333 txtReplaceValue.Visible = isReplaceWithValueSelected;334 ValidateReplaceWith();335 }336 337 private void txtReplaceValue_TextChanged(object sender, EventArgs e) {338 ValidateReplaceWith();339 }340 243 } 341 244 } -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/Plugin.cs.frame
r14195 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 /// Plugin class for HeuristicLab.Data plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.DataPreprocessing.Views", "3.4. 4.$WCREV$")]28 [Plugin("HeuristicLab.DataPreprocessing.Views", "3.4.5.$WCREV$")] 29 29 [PluginFile("HeuristicLab.DataPreprocessing.Views-3.4.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Analysis", "3.3")] -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.Designer.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingCheckedVariablesView.cs
r15119 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.Designer.cs
r15110 r16140 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingFeatureCorrelationView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/Properties/AssemblyInfo.cs.frame
r14195 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 6HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2018 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.4.0.0")] 57 [assembly: AssemblyFileVersion("3.4. 4.$WCREV$")]57 [assembly: AssemblyFileVersion("3.4.5.$WCREV$")] -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/RenameColumnsDialog.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotMultiView.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.Designer.cs
r15119 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ScatterPlotSingleView.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/SearchAndReplaceDialog.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.Designer.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs
r15210 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 87 87 88 88 private void UpdateData(Dictionary<string, bool> oldVisibility = null) { 89 var logic = Content.StatisticsLogic;90 rowsTextBox.Text = logic.GetRowCount().ToString();91 columnsTextBox.Text = logic.GetColumnCount().ToString();92 numericColumnsTextBox.Text = logic.GetNumericColumnCount().ToString();93 nominalColumnsTextBox5.Text = logic.GetNominalColumnCount().ToString();94 missingValuesTextBox.Text = logic.GetMissingValueCount().ToString();95 totalValuesTextBox.Text = ( logic.GetColumnCount() * logic.GetRowCount() - logic.GetMissingValueCount()).ToString();89 var data = Content.PreprocessingData; 90 rowsTextBox.Text = data.Rows.ToString(); 91 columnsTextBox.Text = data.Columns.ToString(); 92 numericColumnsTextBox.Text = GetColumnCount<double>().ToString(); 93 nominalColumnsTextBox5.Text = GetColumnCount<string>().ToString(); 94 missingValuesTextBox.Text = data.GetMissingValueCount().ToString(); 95 totalValuesTextBox.Text = (data.Rows * data.Rows - data.GetMissingValueCount()).ToString(); 96 96 97 97 var variableNames = Content.PreprocessingData.VariableNames.ToList(); … … 107 107 }; 108 108 109 for (int i = 0; i < logic.GetColumnCount(); i++) {110 var data= GetStatistics(i);111 for (int j = 0; j < data.Count; j++) {109 for (int i = 0; i < data.Columns; i++) { 110 var statistics = GetStatistics(i); 111 for (int j = 0; j < statistics.Count; j++) { 112 112 if (horizontal) 113 statisticsMatrix[j, i] = data[j];113 statisticsMatrix[j, i] = statistics[j]; 114 114 else 115 statisticsMatrix[i, j] = data[j];115 statisticsMatrix[i, j] = statistics[j]; 116 116 } 117 117 } … … 138 138 } 139 139 140 public int GetColumnCount<T>() { 141 int count = 0; 142 for (int i = 0; i < Content.PreprocessingData.Columns; ++i) { 143 if (Content.PreprocessingData.VariableHasType<T>(i)) { 144 ++count; 145 } 146 } 147 return count; 148 } 149 140 150 private List<string> GetStatistics(int varIdx) { 141 151 List<string> list; 142 var logic = Content.StatisticsLogic;143 if ( logic.VariableHasType<double>(varIdx)) {152 var data = Content.PreprocessingData; 153 if (data.VariableHasType<double>(varIdx)) { 144 154 list = GetDoubleColumns(varIdx); 145 } else if ( logic.VariableHasType<string>(varIdx)) {155 } else if (data.VariableHasType<string>(varIdx)) { 146 156 list = GetStringColumns(varIdx); 147 } else if ( logic.VariableHasType<DateTime>(varIdx)) {157 } else if (data.VariableHasType<DateTime>(varIdx)) { 148 158 list = GetDateTimeColumns(varIdx); 149 159 } else { … … 157 167 158 168 private List<string> GetDoubleColumns(int statIdx) { 159 var logic = Content.StatisticsLogic;169 var data = Content.PreprocessingData; 160 170 return new List<string> { 161 logic.GetColumnTypeAsString(statIdx),162 logic.GetMissingValueCount(statIdx).ToString(),163 logic.GetMin<double>(statIdx,double.NaN).ToString(),164 logic.GetMax<double>(statIdx,double.NaN).ToString(),165 logic.GetMedian(statIdx).ToString(),166 logic.GetAverage(statIdx).ToString(),167 logic.GetStandardDeviation(statIdx).ToString(),168 logic.GetVariance(statIdx).ToString(),169 logic.GetOneQuarterPercentile(statIdx).ToString(),170 logic.GetThreeQuarterPercentile(statIdx).ToString(),171 logic.GetMostCommonValue<double>(statIdx,double.NaN).ToString(),172 logic.GetDifferentValuesCount<double>(statIdx).ToString()171 data.GetVariableType(statIdx).Name, 172 data.GetMissingValueCount(statIdx).ToString(), 173 data.GetMin<double>(statIdx, emptyValue: double.NaN).ToString(), 174 data.GetMax<double>(statIdx, emptyValue: double.NaN).ToString(), 175 data.GetMedian<double>(statIdx, emptyValue: double.NaN).ToString(), 176 data.GetMean<double>(statIdx, emptyValue: double.NaN).ToString(), 177 data.GetStandardDeviation<double>(statIdx, emptyValue: double.NaN).ToString(), 178 data.GetVariance<double>(statIdx, emptyValue: double.NaN).ToString(), 179 data.GetQuantile<double>(0.25, statIdx, emptyValue: double.NaN).ToString(), 180 data.GetQuantile<double>(0.75, statIdx, emptyValue: double.NaN).ToString(), 181 data.GetMode<double>(statIdx, emptyValue: double.NaN).ToString(), 182 data.GetDistinctValues<double>(statIdx).ToString() 173 183 }; 174 184 } 175 185 176 186 private List<string> GetStringColumns(int statIdx) { 177 var logic = Content.StatisticsLogic;187 var data = Content.PreprocessingData; 178 188 return new List<string> { 179 logic.GetColumnTypeAsString(statIdx),180 logic.GetMissingValueCount(statIdx).ToString(),181 "", // min182 "", // max183 "", // median189 data.GetVariableType(statIdx).Name, 190 data.GetMissingValueCount(statIdx).ToString(), 191 "", // data.GetMin<string>(statIdx, emptyValue: string.Empty), //min 192 "", // data.GetMax<string>(statIdx, emptyValue: string.Empty), //max 193 "", // data.GetMedian<string>(statIdx, emptyValue: string.Empty), //median 184 194 "", //average 185 195 "", //standard deviation 186 196 "", //variance 187 "", // quarter percentile188 "", // three quarter percentile189 logic.GetMostCommonValue<string>(statIdx,string.Empty) ?? "",190 logic.GetDifferentValuesCount<string>(statIdx).ToString()197 "", // data.GetQuantile<string>(0.25, statIdx, emptyValue: string.Empty), //quarter percentile 198 "", // data.GetQuantile<string>(0.75, statIdx, emptyValue: string.Empty), //three quarter percentile 199 data.GetMode<string>(statIdx, emptyValue: string.Empty), 200 data.GetDistinctValues<string>(statIdx).ToString() 191 201 }; 192 202 } 193 203 194 204 private List<string> GetDateTimeColumns(int statIdx) { 195 var logic = Content.StatisticsLogic;205 var data = Content.PreprocessingData; 196 206 return new List<string> { 197 logic.GetColumnTypeAsString(statIdx),198 logic.GetMissingValueCount(statIdx).ToString(),199 logic.GetMin<DateTime>(statIdx, DateTime.MinValue).ToString(),200 logic.GetMax<DateTime>(statIdx, DateTime.MinValue).ToString(),201 logic.GetMedianDateTime(statIdx).ToString(),202 logic.GetAverageDateTime(statIdx).ToString(),203 logic.GetStandardDeviation(statIdx).ToString(),204 logic.GetVariance(statIdx).ToString(),205 logic.GetOneQuarterPercentile(statIdx).ToString(),206 logic.GetThreeQuarterPercentile(statIdx).ToString(),207 logic.GetMostCommonValue<DateTime>(statIdx, DateTime.MinValue).ToString(),208 logic.GetDifferentValuesCount<DateTime>(statIdx).ToString()207 data.GetVariableType(statIdx).Name, 208 data.GetMissingValueCount(statIdx).ToString(), 209 data.GetMin<DateTime>(statIdx).ToString(), 210 data.GetMax<DateTime>(statIdx).ToString(), 211 data.GetMedian<DateTime>(statIdx).ToString(), 212 data.GetMean<DateTime>(statIdx).ToString(), 213 "", // should be of type TimeSpan //data.GetStandardDeviation<DateTime>(statIdx).ToString(), 214 "", // should be of type TimeSpan //data.GetVariance<DateTime>(statIdx).ToString(), 215 data.GetQuantile<DateTime>(0.25, statIdx).ToString(), 216 data.GetQuantile<DateTime>(0.75, statIdx).ToString(), 217 data.GetMode<DateTime>(statIdx).ToString(), 218 data.GetDistinctValues<DateTime>(statIdx).ToString() 209 219 }; 210 220 } -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.Designer.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/TransformationView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 51 51 52 52 protected override void RegisterContentEvents() { 53 Content. FilterLogic.FilterChanged += FilterLogic_FilterChanged;53 Content.PreprocessingData.FilterChanged += FilterLogic_FilterChanged; 54 54 } 55 55 56 56 protected override void DeregisterContentEvents() { 57 Content. FilterLogic.FilterChanged -= FilterLogic_FilterChanged;57 Content.PreprocessingData.FilterChanged -= FilterLogic_FilterChanged; 58 58 } 59 59 … … 65 65 66 66 private void CheckFilters() { 67 if (Content. FilterLogic.IsFiltered) {67 if (Content.PreprocessingData.IsFiltered) { 68 68 applyButton.Enabled = false; 69 69 lblFilterNotice.Visible = true; … … 82 82 } 83 83 84 var transformator = new PreprocessingTransformator(Content. Data);84 var transformator = new PreprocessingTransformator(Content.PreprocessingData); 85 85 bool preserve = preserveColumnsCheckbox.CheckState == CheckState.Checked; 86 86 string errorMsg; -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/Utils/FindPreprocessingItemsIterator.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/Utils/IFindPreprocessingItemsIterator.cs
r14185 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/Utils/VerticalLabel.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.Designer.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/2817-BinPackingSpeedup/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs
r15110 r16140 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 6Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 42 42 //Clone chart items 43 43 protected override void itemsListView_DoubleClick(object sender, EventArgs e) { 44 if (itemsListView.SelectedItems.Count == 1) { 45 IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut; 46 if (item != null) { 47 try { 48 item = (IViewShortcut)item.Clone(); 49 var view = MainFormManager.MainForm.ShowContent(item); 50 if (view != null) { 51 view.ReadOnly = ReadOnly; 52 view.Locked = Locked; 53 } 54 } catch (NullReferenceException) { 55 // cloning for preprocessing not done properly yet 56 } 44 if (itemsListView.SelectedItems.Count != 1) return; 45 IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut; 46 if (item == null) return; 47 try { 48 item = (IViewShortcut)item.Clone(); 49 var view = MainFormManager.MainForm.ShowContent(item); 50 if (view != null) { 51 view.ReadOnly = ReadOnly; 52 view.Locked = Locked; 57 53 } 54 } catch (NullReferenceException) { 55 // cloning for preprocessing not done properly yet 58 56 } 59 57 }
Note: See TracChangeset
for help on using the changeset viewer.