Changeset 12718


Ignore:
Timestamp:
07/10/15 14:16:51 (6 years ago)
Author:
mkommend
Message:

#2335: Merged all changes into stable.

Location:
stable
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Data.Views

    • Property svn:mergeinfo set to (toggle deleted branches)
      /branches/HLScript/HeuristicLab.Data.Viewsmergedeligible
      /trunk/sources/HeuristicLab.Data.Viewsmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.Data.Views10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.Data.Views5516-5520
      /branches/Benchmarking/sources/HeuristicLab.Data.Views6917-7005
      /branches/CloningRefactoring/HeuristicLab.Data.Views4656-4721
      /branches/CodeEditor/HeuristicLab.Data.Views11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.Data.Views5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Data.Views5815-6180
      /branches/DataAnalysis/HeuristicLab.Data.Views4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.Data.Views10085-11101
      /branches/DataPreprocessingImprovements/HeuristicLab.Data.Views12160-12675
      /branches/GP.Grammar.Editor/HeuristicLab.Data.Views6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Data.Views5060
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Data.Views11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Data.Views6123-9799
      /branches/LogResidualEvaluator/HeuristicLab.Data.Views10202-10483
      /branches/NET40/sources/HeuristicLab.Data.Views5138-5162
      /branches/NSGA-II Changes/HeuristicLab.Data.Views12033-12122
      /branches/ParallelEngine/HeuristicLab.Data.Views5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Data.Views7568-7810
      /branches/QAPAlgorithms/HeuristicLab.Data.Views6350-6627
      /branches/Restructure trunk solution/HeuristicLab.Data.Views6828
      /branches/RuntimeOptimizer/HeuristicLab.Data.Views8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.Data.Views7787-8333
      /branches/SlaveShutdown/HeuristicLab.Data.Views8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Data.Views10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.Data.Views5370-5682
      /branches/Trunk/HeuristicLab.Data.Views6829-6865
      /branches/UnloadJobs/HeuristicLab.Data.Views9168-9215
      /branches/VNS/HeuristicLab.Data.Views5594-5752
      /branches/histogram/HeuristicLab.Data.Views5959-6341
  • stable/HeuristicLab.Data.Views/3.3

  • stable/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r12199 r12718  
    109109        dataGridView.Columns.Clear();
    110110        virtualRowIndices = new int[0];
    111       } else
     111      } else if (!dataGridView.IsCurrentCellInEditMode) {
    112112        UpdateData();
     113      }
    113114    }
    114115
     
    295296    }
    296297
    297     private void dataGridView_KeyDown(object sender, KeyEventArgs e) {
     298    protected virtual void dataGridView_KeyDown(object sender, KeyEventArgs e) {
    298299      if (!ReadOnly && e.Control && e.KeyCode == Keys.V)
    299300        PasteValuesToDataGridView();
     
    398399    }
    399400
    400     private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
     401    protected virtual void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
    401402      if (Content != null) {
    402403        if (e.Button == MouseButtons.Left && Content.SortableView) {
    403           bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control;
    404           SortOrder newSortOrder = SortOrder.Ascending;
    405           if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
    406             SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == e.ColumnIndex).First().Value;
    407             int enumLength = Enum.GetValues(typeof(SortOrder)).Length;
    408             newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString());
    409           }
    410 
    411           if (!addToSortedIndices)
    412             sortedColumnIndices.Clear();
    413 
    414           if (sortedColumnIndices.Any(x => x.Key == e.ColumnIndex)) {
    415             int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == e.ColumnIndex);
    416             if (newSortOrder != SortOrder.None)
    417               sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder);
    418             else
    419               sortedColumnIndices.RemoveAt(sortedIndex);
    420           } else
    421             if (newSortOrder != SortOrder.None)
    422               sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(e.ColumnIndex, newSortOrder));
    423           Sort();
     404          SortColumn(e.ColumnIndex);
    424405        }
    425406      }
     
    438419      dataGridView.Invalidate();
    439420    }
     421
     422    protected virtual void SortColumn(int columnIndex) {
     423      bool addToSortedIndices = (Control.ModifierKeys & Keys.Control) == Keys.Control;
     424      SortOrder newSortOrder = SortOrder.Ascending;
     425      if (sortedColumnIndices.Any(x => x.Key == columnIndex)) {
     426        SortOrder oldSortOrder = sortedColumnIndices.Where(x => x.Key == columnIndex).First().Value;
     427        int enumLength = Enum.GetValues(typeof(SortOrder)).Length;
     428        newSortOrder = oldSortOrder = (SortOrder)Enum.Parse(typeof(SortOrder), ((((int)oldSortOrder) + 1) % enumLength).ToString());
     429      }
     430
     431      if (!addToSortedIndices)
     432        sortedColumnIndices.Clear();
     433
     434      if (sortedColumnIndices.Any(x => x.Key == columnIndex)) {
     435        int sortedIndex = sortedColumnIndices.FindIndex(x => x.Key == columnIndex);
     436        if (newSortOrder != SortOrder.None)
     437          sortedColumnIndices[sortedIndex] = new KeyValuePair<int, SortOrder>(columnIndex, newSortOrder);
     438        else
     439          sortedColumnIndices.RemoveAt(sortedIndex);
     440      } else
     441        if (newSortOrder != SortOrder.None)
     442          sortedColumnIndices.Add(new KeyValuePair<int, SortOrder>(columnIndex, newSortOrder));
     443      Sort();
     444    }
     445
    440446    protected virtual int[] Sort(IEnumerable<KeyValuePair<int, SortOrder>> sortedColumns) {
    441447      int[] newSortedIndex = Enumerable.Range(0, Content.Rows).ToArray();
     
    510516    }
    511517
    512     private void dataGridView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
     518    protected virtual void dataGridView_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) {
    513519      if (Content == null) return;
    514520      if (e.Button == MouseButtons.Right && Content.ColumnNames.Count() != 0)
     
    543549
    544550    protected virtual void dataGridView_SelectionChanged(object sender, EventArgs e) {
    545       string stringFormat = "{0,20:0.0000}";
    546551      statisticsTextBox.Text = string.Empty;
    547552      if (dataGridView.SelectedCells.Count > 1) {
     
    553558        }
    554559        if (selectedValues.Count > 1) {
    555           StringBuilder labelText = new StringBuilder();
    556           labelText.Append("Count: " + string.Format(stringFormat, selectedValues.Count) + "    ");
    557           labelText.Append("Sum: " + string.Format(stringFormat, selectedValues.Sum()) + "    ");
    558           labelText.Append("Min: " + string.Format(stringFormat, selectedValues.Min()) + "    ");
    559           labelText.Append("Max: " + string.Format(stringFormat, selectedValues.Max()) + "    ");
    560           labelText.Append("Average: " + string.Format(stringFormat, selectedValues.Average()) + "    ");
    561           labelText.Append("Standard Deviation: " + string.Format(stringFormat, selectedValues.StandardDeviation()) + "    ");
    562 
    563           statisticsTextBox.Text = labelText.ToString();
    564         }
    565       }
     560          statisticsTextBox.Text = CreateStatisticsText(selectedValues);
     561        }
     562      }
     563    }
     564
     565    protected virtual string CreateStatisticsText(ICollection<double> values) {
     566      string stringFormat = "{0,20:0.0000}";
     567      int overallCount = values.Count;
     568      values = values.Where(x => !double.IsNaN(x)).ToList();
     569      if (!values.Any()) {
     570        return "";
     571      }
     572      StringBuilder statisticsText = new StringBuilder();
     573      statisticsText.Append("Count: " + values.Count + "    ");
     574      statisticsText.Append("Sum: " + string.Format(stringFormat, values.Sum()) + "    ");
     575      statisticsText.Append("Min: " + string.Format(stringFormat, values.Min()) + "    ");
     576      statisticsText.Append("Max: " + string.Format(stringFormat, values.Max()) + "    ");
     577      statisticsText.Append("Average: " + string.Format(stringFormat, values.Average()) + "    ");
     578      statisticsText.Append("Standard Deviation: " + string.Format(stringFormat, values.StandardDeviation()) + "    ");
     579      if (overallCount > 0)
     580        statisticsText.Append("Missing Values: " + string.Format(stringFormat, ((overallCount - values.Count) / (double)overallCount) * 100) + "%    ");
     581      return statisticsText.ToString();
    566582    }
    567583  }
  • stable/HeuristicLab.DataPreprocessing.Views

    • Property svn:mergeinfo set to (toggle deleted branches)
      /stable/HeuristicLab.DataPreprocessing.Viewsmergedeligible
      /trunk/sources/HeuristicLab.DataPreprocessing.Viewsmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.DataPreprocessing.Views10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.DataPreprocessing.Views5516-5520
      /branches/Benchmarking/sources/HeuristicLab.DataPreprocessing.Views6917-7005
      /branches/CloningRefactoring/HeuristicLab.DataPreprocessing.Views4656-4721
      /branches/CodeEditor/HeuristicLab.DataPreprocessing.Views11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.DataPreprocessing.Views5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.DataPreprocessing.Views5815-6180
      /branches/DataAnalysis/HeuristicLab.DataPreprocessing.Views4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views10085-11101
      /branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views12054-12675
      /branches/GP.Grammar.Editor/HeuristicLab.DataPreprocessing.Views6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.DataPreprocessing.Views5060
      /branches/HLScript/HeuristicLab.DataPreprocessing.Views10331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.DataPreprocessing.Views11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.DataPreprocessing.Views6123-9799
      /branches/LogResidualEvaluator/HeuristicLab.DataPreprocessing.Views10202-10483
      /branches/NET40/sources/HeuristicLab.DataPreprocessing.Views5138-5162
      /branches/NSGA-II Changes/HeuristicLab.DataPreprocessing.Views12033-12122
      /branches/ParallelEngine/HeuristicLab.DataPreprocessing.Views5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.DataPreprocessing.Views7568-7810
      /branches/QAPAlgorithms/HeuristicLab.DataPreprocessing.Views6350-6627
      /branches/Restructure trunk solution/HeuristicLab.DataPreprocessing.Views6828
      /branches/RuntimeOptimizer/HeuristicLab.DataPreprocessing.Views8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.DataPreprocessing.Views7787-8333
      /branches/SlaveShutdown/HeuristicLab.DataPreprocessing.Views8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.DataPreprocessing.Views10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.DataPreprocessing.Views5370-5682
      /branches/Trunk/HeuristicLab.DataPreprocessing.Views6829-6865
      /branches/UnloadJobs/HeuristicLab.DataPreprocessing.Views9168-9215
      /branches/VNS/HeuristicLab.DataPreprocessing.Views5594-5752
      /branches/histogram/HeuristicLab.DataPreprocessing.Views5959-6341
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r12009 r12718  
    6161      dataGridView.KeyDown += dataGridView_KeyDown;
    6262      dataGridView.MouseUp += dataGridView_MouseUp;
    63       dataGridView.ColumnHeaderMouseClick += dataGridView_ColumnHeaderMouseClick;
    6463      contextMenuCell.Items.Add(ShowHideColumns);
    6564      _highlightedCellsBackground = new Dictionary<int, IList<int>>();
     
    127126
    128127      string errorMessage;
    129       if (Content != null) {
     128      if (!String.IsNullOrEmpty(e.FormattedValue.ToString())) {
    130129        if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered) {
    131130          errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode.";
     
    164163    }
    165164
    166     private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
     165    protected override void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
     166      if (Content != null) {
     167        if (e.Button == System.Windows.Forms.MouseButtons.Left) {
     168          dataGridView.Focus();
     169          dataGridView.ClearSelection();
     170          dataGridView.SelectionChanged -= dataGridView_SelectionChanged;
     171          for (int i = 0; i < dataGridView.RowCount; i++) {
     172            if (i + 1 == dataGridView.RowCount)
     173              dataGridView.SelectionChanged += dataGridView_SelectionChanged;
     174            dataGridView[e.ColumnIndex, i].Selected = true;
     175          }
     176        } else if (Content.SortableView) {
     177          SortColumn(e.ColumnIndex);
     178        }
     179      }
    167180      searchIterator = null;
    168181    }
     
    437450    private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
    438451      if (Content == null) return;
    439       if (e.Button == System.Windows.Forms.MouseButtons.Right) {
     452      if (e.Button == System.Windows.Forms.MouseButtons.Right && !(e.ColumnIndex != -1 && e.RowIndex == -1)) {
    440453        if (e.ColumnIndex == -1 || e.RowIndex == -1) {
    441454          replaceValueOverColumnToolStripMenuItem.Visible = false;
     
    474487    private void dataGridView_KeyDown(object sender, KeyEventArgs e) {
    475488      var selectedRows = dataGridView.SelectedRows;
    476       if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {
    477         List<int> rows = new List<int>();
    478         for (int i = 0; i < selectedRows.Count; ++i) {
    479           rows.Add(selectedRows[i].Index);
    480         }
    481         Content.DeleteRow(rows);
    482       } else if (e.Control && e.KeyCode == Keys.F) {
    483         CreateFindAndReplaceDialog();
    484         findAndReplaceDialog.ActivateSearch();
    485       } else if (e.Control && e.KeyCode == Keys.R) {
    486         CreateFindAndReplaceDialog();
    487         findAndReplaceDialog.ActivateReplace();
     489      var selectedCells = dataGridView.SelectedCells;
     490      if (!Content.FilterLogic.IsFiltered) { //data is in read only mode....
     491        if (e.KeyCode == Keys.Delete && selectedCells.Count == Content.Rows && selectedCells.Count > 0) {
     492          Content.DeleteColumn(selectedCells[0].ColumnIndex);
     493        } else if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {
     494          List<int> rows = new List<int>();
     495          for (int i = 0; i < selectedRows.Count; ++i) {
     496            int index = (sortedColumnIndices.Count != 0) ? (Convert.ToInt32(selectedRows[i].HeaderCell.Value) - 1) :
     497              selectedRows[i].Index;
     498            rows.Add(index);
     499          }
     500          Content.DeleteRows(rows);
     501        } else if (e.Control && e.KeyCode == Keys.F) {
     502          CreateFindAndReplaceDialog();
     503          findAndReplaceDialog.ActivateSearch();
     504        } else if (e.Control && e.KeyCode == Keys.R) {
     505          CreateFindAndReplaceDialog();
     506          findAndReplaceDialog.ActivateReplace();
     507        }
    488508      }
    489509    }
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessingView.cs

    r12009 r12718  
    4646      if (Content != null) {
    4747        var data = Content.Data;
    48         var searchLogic = new SearchLogic(data);
     48        var filterLogic = new FilterLogic(data);
     49        var searchLogic = new SearchLogic(data, filterLogic);
    4950        var statisticsLogic = new StatisticsLogic(data, searchLogic);
    5051        var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic);
    51         var filterLogic = new FilterLogic(data);
    5252
    5353        var viewShortcuts = new ItemList<IViewShortcut> {
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/DataPreprocessorStarter.cs

    r12009 r12718  
    4444        IContentView contentView = control as IContentView;
    4545        if (contentView != null) {
    46           algorithm = contentView.Content as IAlgorithm;
    47           problem = contentView.Content as IDataAnalysisProblem;
     46          var newAlgorithm = contentView.Content as IAlgorithm;
     47          if (newAlgorithm != null)
     48            algorithm = newAlgorithm;
     49          var newProblem = contentView.Content as IDataAnalysisProblem;
     50          if (newProblem != null)
     51            problem = newProblem;
    4852        }
    4953        control = control.Parent;
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.Designer.cs

    r11043 r12718  
    2525    private void InitializeComponent() {
    2626      this.optionsBox = new System.Windows.Forms.GroupBox();
     27      this.displayDetailsCheckBox = new System.Windows.Forms.CheckBox();
    2728      this.label1 = new System.Windows.Forms.Label();
    2829      this.classifierComboBox = new System.Windows.Forms.ComboBox();
     
    3334      //
    3435      this.optionsBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     36      this.optionsBox.Controls.Add(this.displayDetailsCheckBox);
    3537      this.optionsBox.Controls.Add(this.label1);
    3638      this.optionsBox.Controls.Add(this.classifierComboBox);
    37       this.optionsBox.Location = new System.Drawing.Point(4, 263);
     39      this.optionsBox.Location = new System.Drawing.Point(5, 324);
     40      this.optionsBox.Margin = new System.Windows.Forms.Padding(4);
    3841      this.optionsBox.Name = "optionsBox";
    39       this.optionsBox.Size = new System.Drawing.Size(152, 134);
     42      this.optionsBox.Padding = new System.Windows.Forms.Padding(4);
     43      this.optionsBox.Size = new System.Drawing.Size(203, 165);
    4044      this.optionsBox.TabIndex = 7;
    4145      this.optionsBox.TabStop = false;
    4246      this.optionsBox.Text = "Options";
    4347      //
     48      // displayDetailsCheckBox
     49      //
     50      this.displayDetailsCheckBox.AutoSize = true;
     51      this.displayDetailsCheckBox.Location = new System.Drawing.Point(7, 71);
     52      this.displayDetailsCheckBox.Name = "displayDetailsCheckBox";
     53      this.displayDetailsCheckBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
     54      this.displayDetailsCheckBox.Size = new System.Drawing.Size(153, 21);
     55      this.displayDetailsCheckBox.TabIndex = 3;
     56      this.displayDetailsCheckBox.Text = "Display value count";
     57      this.displayDetailsCheckBox.UseVisualStyleBackColor = true;
     58      this.displayDetailsCheckBox.CheckedChanged += new System.EventHandler(this.displayDetailsCheckBox_CheckedChanged);
     59      //
    4460      // label1
    4561      //
    4662      this.label1.AutoSize = true;
    47       this.label1.Location = new System.Drawing.Point(6, 26);
     63      this.label1.Location = new System.Drawing.Point(4, 19);
     64      this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    4865      this.label1.Name = "label1";
    49       this.label1.Size = new System.Drawing.Size(91, 13);
     66      this.label1.Size = new System.Drawing.Size(108, 17);
    5067      this.label1.TabIndex = 2;
    51       this.label1.Text = "Classifier variable:";
     68      this.label1.Text = "Target variable:";
    5269      //
    5370      // classifierComboBox
     
    5572      this.classifierComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    5673      this.classifierComboBox.FormattingEnabled = true;
    57       this.classifierComboBox.Location = new System.Drawing.Point(9, 52);
     74      this.classifierComboBox.Location = new System.Drawing.Point(7, 40);
     75      this.classifierComboBox.Margin = new System.Windows.Forms.Padding(4);
    5876      this.classifierComboBox.Name = "classifierComboBox";
    59       this.classifierComboBox.Size = new System.Drawing.Size(121, 21);
     77      this.classifierComboBox.Size = new System.Drawing.Size(160, 24);
    6078      this.classifierComboBox.TabIndex = 1;
    6179      this.classifierComboBox.SelectedIndexChanged += new System.EventHandler(this.classifierComboBox_SelectedIndexChanged);
     
    6381      // HistogramView
    6482      //
    65       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     83      this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
    6684      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    6785      this.Controls.Add(this.optionsBox);
     86      this.Margin = new System.Windows.Forms.Padding(5);
    6887      this.Name = "HistogramView";
    6988      this.Controls.SetChildIndex(this.optionsBox, 0);
     
    7998    private System.Windows.Forms.ComboBox classifierComboBox;
    8099    private System.Windows.Forms.Label label1;
     100    private System.Windows.Forms.CheckBox displayDetailsCheckBox;
    81101
    82102  }
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/HistogramView.cs

    r12009 r12718  
    7070
    7171      Content.ClassifierVariableIndex = classifierComboBox.SelectedIndex;
    72 
    73       GenerateChart();
     72      if (Content.IsDetailedChartViewEnabled != IsDetailedChartViewEnabled) {
     73        displayDetailsCheckBox.Checked = Content.IsDetailedChartViewEnabled;
     74      } else {
     75        GenerateChart();
     76      }
     77    }
     78    private void displayDetailsCheckBox_CheckedChanged(object sender, EventArgs e) {
     79      bool isChecked = displayDetailsCheckBox.Checked;
     80      if (IsDetailedChartViewEnabled != isChecked) {
     81        IsDetailedChartViewEnabled = isChecked;
     82        Content.IsDetailedChartViewEnabled = isChecked;
     83        GenerateChart();
     84      }
    7485    }
    7586  }
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.Designer.cs

    r11537 r12718  
    4949      this.label10 = new System.Windows.Forms.Label();
    5050      this.tabDataShuffle = new System.Windows.Forms.TabPage();
     51      this.shuffleSeparatelyCheckbox = new System.Windows.Forms.CheckBox();
    5152      this.lblShuffleProperties = new System.Windows.Forms.Label();
    5253      this.grpBoxPreview = new System.Windows.Forms.GroupBox();
     
    6667      this.lblPreviewShuffle = new System.Windows.Forms.Label();
    6768      this.label9 = new System.Windows.Forms.Label();
    68       this.shuffleSeparatelyCheckbox = new System.Windows.Forms.CheckBox();
     69      this.panel1 = new System.Windows.Forms.Panel();
     70      this.panel2 = new System.Windows.Forms.Panel();
    6971      this.grpBoxData.SuspendLayout();
    7072      this.tabsData.SuspendLayout();
     
    8385      this.tabPreviewReplaceMissingValues.SuspendLayout();
    8486      this.tabPreviewShuffle.SuspendLayout();
     87      this.panel1.SuspendLayout();
     88      this.panel2.SuspendLayout();
    8589      this.SuspendLayout();
    8690      //
     
    9094            | System.Windows.Forms.AnchorStyles.Right)));
    9195      this.lstMethods.FormattingEnabled = true;
     96      this.lstMethods.ItemHeight = 16;
    9297      this.lstMethods.Items.AddRange(new object[] {
    9398            "Delete Columns with insufficient Information",
     
    96101            "Replace Missing Values",
    97102            "Shuffle Data"});
    98       this.lstMethods.Location = new System.Drawing.Point(3, 3);
     103      this.lstMethods.Location = new System.Drawing.Point(4, 4);
     104      this.lstMethods.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    99105      this.lstMethods.Name = "lstMethods";
    100       this.lstMethods.Size = new System.Drawing.Size(733, 95);
     106      this.lstMethods.Size = new System.Drawing.Size(976, 116);
    101107      this.lstMethods.Sorted = true;
    102108      this.lstMethods.TabIndex = 0;
     
    107113      this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    108114      this.btnApply.Enabled = false;
    109       this.btnApply.Location = new System.Drawing.Point(603, 500);
     115      this.btnApply.Location = new System.Drawing.Point(804, 615);
     116      this.btnApply.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    110117      this.btnApply.Name = "btnApply";
    111       this.btnApply.Size = new System.Drawing.Size(129, 23);
     118      this.btnApply.Size = new System.Drawing.Size(172, 28);
    112119      this.btnApply.TabIndex = 2;
    113120      this.btnApply.Text = "Apply Manipulation";
     
    120127            | System.Windows.Forms.AnchorStyles.Right)));
    121128      this.grpBoxData.Controls.Add(this.tabsData);
    122       this.grpBoxData.Location = new System.Drawing.Point(4, 105);
     129      this.grpBoxData.Location = new System.Drawing.Point(5, 129);
     130      this.grpBoxData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    123131      this.grpBoxData.Name = "grpBoxData";
    124       this.grpBoxData.Size = new System.Drawing.Size(732, 189);
     132      this.grpBoxData.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     133      this.grpBoxData.Size = new System.Drawing.Size(976, 233);
    125134      this.grpBoxData.TabIndex = 3;
    126135      this.grpBoxData.TabStop = false;
     
    138147      this.tabsData.Controls.Add(this.tabDataShuffle);
    139148      this.tabsData.ItemSize = new System.Drawing.Size(58, 18);
    140       this.tabsData.Location = new System.Drawing.Point(6, 19);
     149      this.tabsData.Location = new System.Drawing.Point(8, 23);
     150      this.tabsData.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    141151      this.tabsData.Name = "tabsData";
    142152      this.tabsData.SelectedIndex = 0;
    143       this.tabsData.Size = new System.Drawing.Size(719, 164);
     153      this.tabsData.Size = new System.Drawing.Size(959, 202);
    144154      this.tabsData.TabIndex = 3;
    145155      //
     
    148158      this.tabPage1.Controls.Add(this.label7);
    149159      this.tabPage1.Location = new System.Drawing.Point(4, 22);
     160      this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    150161      this.tabPage1.Name = "tabPage1";
    151       this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
    152       this.tabPage1.Size = new System.Drawing.Size(711, 138);
     162      this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     163      this.tabPage1.Size = new System.Drawing.Size(951, 176);
    153164      this.tabPage1.TabIndex = 5;
    154165      this.tabPage1.Text = "tabDataInactive";
     
    159170      this.label7.AutoSize = true;
    160171      this.label7.Enabled = false;
    161       this.label7.Location = new System.Drawing.Point(3, 3);
     172      this.label7.Location = new System.Drawing.Point(4, 4);
     173      this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    162174      this.label7.Name = "label7";
    163       this.label7.Size = new System.Drawing.Size(259, 13);
     175      this.label7.Size = new System.Drawing.Size(345, 17);
    164176      this.label7.TabIndex = 1;
    165177      this.label7.Text = "Please select one of the manipulation methods above";
     
    171183      this.tabDataDeleteColumnsInformation.Controls.Add(this.label1);
    172184      this.tabDataDeleteColumnsInformation.Location = new System.Drawing.Point(4, 22);
     185      this.tabDataDeleteColumnsInformation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    173186      this.tabDataDeleteColumnsInformation.Name = "tabDataDeleteColumnsInformation";
    174       this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding(3);
    175       this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size(711, 138);
     187      this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     188      this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size(951, 176);
    176189      this.tabDataDeleteColumnsInformation.TabIndex = 0;
    177190      this.tabDataDeleteColumnsInformation.Text = "del columns info";
     
    181194      //
    182195      this.label2.AutoSize = true;
    183       this.label2.Location = new System.Drawing.Point(204, 3);
     196      this.label2.Location = new System.Drawing.Point(272, 4);
     197      this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    184198      this.label2.Name = "label2";
    185       this.label2.Size = new System.Drawing.Size(89, 13);
     199      this.label2.Size = new System.Drawing.Size(120, 17);
    186200      this.label2.TabIndex = 5;
    187201      this.label2.Text = "% missing values.";
     
    189203      // txtDeleteColumnsInfo
    190204      //
    191       this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(164, 0);
     205      this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(219, 0);
     206      this.txtDeleteColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    192207      this.txtDeleteColumnsInfo.Name = "txtDeleteColumnsInfo";
    193       this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(34, 20);
     208      this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(44, 22);
    194209      this.txtDeleteColumnsInfo.TabIndex = 4;
    195210      this.txtDeleteColumnsInfo.TextChanged += new System.EventHandler(this.txtDeleteColumnsInfo_TextChanged);
     
    198213      //
    199214      this.label1.AutoSize = true;
    200       this.label1.Location = new System.Drawing.Point(3, 3);
     215      this.label1.Location = new System.Drawing.Point(4, 4);
     216      this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    201217      this.label1.Name = "label1";
    202       this.label1.Size = new System.Drawing.Size(155, 13);
     218      this.label1.Size = new System.Drawing.Size(205, 17);
    203219      this.label1.TabIndex = 3;
    204220      this.label1.Text = "Delete columns with more than ";
     
    209225      this.tabDataDeleteColumnsVariance.Controls.Add(this.label4);
    210226      this.tabDataDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
     227      this.tabDataDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    211228      this.tabDataDeleteColumnsVariance.Name = "tabDataDeleteColumnsVariance";
    212       this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
    213       this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(711, 138);
     229      this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     230      this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(951, 176);
    214231      this.tabDataDeleteColumnsVariance.TabIndex = 1;
    215232      this.tabDataDeleteColumnsVariance.Text = "del columns variance";
     
    218235      // txtDeleteColumnsVariance
    219236      //
    220       this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(229, 0);
     237      this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(305, 0);
     238      this.txtDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    221239      this.txtDeleteColumnsVariance.Name = "txtDeleteColumnsVariance";
    222       this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(135, 20);
     240      this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(179, 22);
    223241      this.txtDeleteColumnsVariance.TabIndex = 4;
    224242      this.txtDeleteColumnsVariance.TextChanged += new System.EventHandler(this.txtDeleteColumnsVariance_TextChanged);
     
    227245      //
    228246      this.label4.AutoSize = true;
    229       this.label4.Location = new System.Drawing.Point(3, 3);
     247      this.label4.Location = new System.Drawing.Point(4, 4);
     248      this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    230249      this.label4.Name = "label4";
    231       this.label4.Size = new System.Drawing.Size(220, 13);
     250      this.label4.Size = new System.Drawing.Size(292, 17);
    232251      this.label4.TabIndex = 3;
    233252      this.label4.Text = "Delete columns with a variance smaller than  ";
     
    239258      this.tabDataDeleteRowsInfo.Controls.Add(this.label5);
    240259      this.tabDataDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
     260      this.tabDataDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    241261      this.tabDataDeleteRowsInfo.Name = "tabDataDeleteRowsInfo";
    242       this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
    243       this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(711, 138);
     262      this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     263      this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(951, 176);
    244264      this.tabDataDeleteRowsInfo.TabIndex = 2;
    245265      this.tabDataDeleteRowsInfo.Text = "del rows info";
     
    249269      //
    250270      this.label3.AutoSize = true;
    251       this.label3.Location = new System.Drawing.Point(189, 3);
     271      this.label3.Location = new System.Drawing.Point(252, 4);
     272      this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    252273      this.label3.Name = "label3";
    253       this.label3.Size = new System.Drawing.Size(89, 13);
     274      this.label3.Size = new System.Drawing.Size(120, 17);
    254275      this.label3.TabIndex = 8;
    255276      this.label3.Text = "% missing values.";
     
    257278      // txtDeleteRowsInfo
    258279      //
    259       this.txtDeleteRowsInfo.Location = new System.Drawing.Point(147, 0);
     280      this.txtDeleteRowsInfo.Location = new System.Drawing.Point(196, 0);
     281      this.txtDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    260282      this.txtDeleteRowsInfo.Name = "txtDeleteRowsInfo";
    261       this.txtDeleteRowsInfo.Size = new System.Drawing.Size(34, 20);
     283      this.txtDeleteRowsInfo.Size = new System.Drawing.Size(44, 22);
    262284      this.txtDeleteRowsInfo.TabIndex = 7;
    263285      this.txtDeleteRowsInfo.TextChanged += new System.EventHandler(this.txtDeleteRowsInfo_TextChanged);
     
    266288      //
    267289      this.label5.AutoSize = true;
    268       this.label5.Location = new System.Drawing.Point(3, 3);
     290      this.label5.Location = new System.Drawing.Point(4, 4);
     291      this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    269292      this.label5.Name = "label5";
    270       this.label5.Size = new System.Drawing.Size(138, 13);
     293      this.label5.Size = new System.Drawing.Size(182, 17);
    271294      this.label5.TabIndex = 6;
    272295      this.label5.Text = "Delete rows with more than ";
     
    281304      this.tabReplaceMissingValues.Controls.Add(this.label10);
    282305      this.tabReplaceMissingValues.Location = new System.Drawing.Point(4, 22);
     306      this.tabReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    283307      this.tabReplaceMissingValues.Name = "tabReplaceMissingValues";
    284       this.tabReplaceMissingValues.Padding = new System.Windows.Forms.Padding(3);
    285       this.tabReplaceMissingValues.Size = new System.Drawing.Size(711, 138);
     308      this.tabReplaceMissingValues.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     309      this.tabReplaceMissingValues.Size = new System.Drawing.Size(951, 176);
    286310      this.tabReplaceMissingValues.TabIndex = 6;
    287311      this.tabReplaceMissingValues.Text = "repl missing vals";
     
    290314      // txtReplaceValue
    291315      //
    292       this.txtReplaceValue.Location = new System.Drawing.Point(173, 27);
     316      this.txtReplaceValue.Location = new System.Drawing.Point(231, 33);
     317      this.txtReplaceValue.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    293318      this.txtReplaceValue.Name = "txtReplaceValue";
    294       this.txtReplaceValue.Size = new System.Drawing.Size(100, 20);
     319      this.txtReplaceValue.Size = new System.Drawing.Size(132, 22);
    295320      this.txtReplaceValue.TabIndex = 2;
    296321      this.txtReplaceValue.TextChanged += new System.EventHandler(this.txtReplaceValue_TextChanged);
     
    300325      this.cmbVariableNames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
    301326      this.cmbVariableNames.FormattingEnabled = true;
    302       this.cmbVariableNames.Location = new System.Drawing.Point(142, 0);
     327      this.cmbVariableNames.Location = new System.Drawing.Point(189, 0);
     328      this.cmbVariableNames.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    303329      this.cmbVariableNames.Name = "cmbVariableNames";
    304       this.cmbVariableNames.Size = new System.Drawing.Size(121, 21);
     330      this.cmbVariableNames.Size = new System.Drawing.Size(160, 24);
    305331      this.cmbVariableNames.TabIndex = 1;
    306332      this.cmbVariableNames.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
     
    316342            "Most Common",
    317343            "Random"});
    318       this.cmbReplaceWith.Location = new System.Drawing.Point(35, 27);
     344      this.cmbReplaceWith.Location = new System.Drawing.Point(47, 33);
     345      this.cmbReplaceWith.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    319346      this.cmbReplaceWith.Name = "cmbReplaceWith";
    320       this.cmbReplaceWith.Size = new System.Drawing.Size(121, 21);
     347      this.cmbReplaceWith.Size = new System.Drawing.Size(160, 24);
    321348      this.cmbReplaceWith.TabIndex = 1;
    322349      this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
     
    325352      //
    326353      this.lblValueColon.AutoSize = true;
    327       this.lblValueColon.Location = new System.Drawing.Point(157, 30);
     354      this.lblValueColon.Location = new System.Drawing.Point(209, 37);
     355      this.lblValueColon.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    328356      this.lblValueColon.Name = "lblValueColon";
    329       this.lblValueColon.Size = new System.Drawing.Size(10, 13);
     357      this.lblValueColon.Size = new System.Drawing.Size(12, 17);
    330358      this.lblValueColon.TabIndex = 0;
    331359      this.lblValueColon.Text = ":";
     
    334362      //
    335363      this.label8.AutoSize = true;
    336       this.label8.Location = new System.Drawing.Point(3, 30);
     364      this.label8.Location = new System.Drawing.Point(4, 37);
     365      this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    337366      this.label8.Name = "label8";
    338       this.label8.Size = new System.Drawing.Size(26, 13);
     367      this.label8.Size = new System.Drawing.Size(32, 17);
    339368      this.label8.TabIndex = 0;
    340369      this.label8.Text = "with";
     
    343372      //
    344373      this.label10.AutoSize = true;
    345       this.label10.Location = new System.Drawing.Point(3, 3);
     374      this.label10.Location = new System.Drawing.Point(4, 4);
     375      this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    346376      this.label10.Name = "label10";
    347       this.label10.Size = new System.Drawing.Size(133, 13);
     377      this.label10.Size = new System.Drawing.Size(177, 17);
    348378      this.label10.TabIndex = 0;
    349379      this.label10.Text = "Replace missing values for";
     
    354384      this.tabDataShuffle.Controls.Add(this.lblShuffleProperties);
    355385      this.tabDataShuffle.Location = new System.Drawing.Point(4, 22);
     386      this.tabDataShuffle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    356387      this.tabDataShuffle.Name = "tabDataShuffle";
    357       this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(3);
    358       this.tabDataShuffle.Size = new System.Drawing.Size(711, 138);
     388      this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     389      this.tabDataShuffle.Size = new System.Drawing.Size(951, 176);
    359390      this.tabDataShuffle.TabIndex = 4;
    360391      this.tabDataShuffle.Text = "shuffle";
    361392      this.tabDataShuffle.UseVisualStyleBackColor = true;
    362393      //
     394      // shuffleSeparatelyCheckbox
     395      //
     396      this.shuffleSeparatelyCheckbox.AutoSize = true;
     397      this.shuffleSeparatelyCheckbox.Location = new System.Drawing.Point(8, 2);
     398      this.shuffleSeparatelyCheckbox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
     399      this.shuffleSeparatelyCheckbox.Name = "shuffleSeparatelyCheckbox";
     400      this.shuffleSeparatelyCheckbox.Size = new System.Drawing.Size(312, 21);
     401      this.shuffleSeparatelyCheckbox.TabIndex = 1;
     402      this.shuffleSeparatelyCheckbox.Text = "Shuffle training and test partitions separately";
     403      this.shuffleSeparatelyCheckbox.UseVisualStyleBackColor = true;
     404      //
    363405      // lblShuffleProperties
    364406      //
    365407      this.lblShuffleProperties.AutoSize = true;
    366408      this.lblShuffleProperties.Enabled = false;
    367       this.lblShuffleProperties.Location = new System.Drawing.Point(3, 3);
     409      this.lblShuffleProperties.Location = new System.Drawing.Point(4, 4);
     410      this.lblShuffleProperties.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    368411      this.lblShuffleProperties.Name = "lblShuffleProperties";
    369       this.lblShuffleProperties.Size = new System.Drawing.Size(115, 13);
     412      this.lblShuffleProperties.Size = new System.Drawing.Size(154, 17);
    370413      this.lblShuffleProperties.TabIndex = 0;
    371414      this.lblShuffleProperties.Text = "No properties available";
     
    377420            | System.Windows.Forms.AnchorStyles.Right)));
    378421      this.grpBoxPreview.Controls.Add(this.tabsPreview);
    379       this.grpBoxPreview.Location = new System.Drawing.Point(4, 301);
     422      this.grpBoxPreview.Location = new System.Drawing.Point(5, 370);
     423      this.grpBoxPreview.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    380424      this.grpBoxPreview.Name = "grpBoxPreview";
    381       this.grpBoxPreview.Size = new System.Drawing.Size(732, 193);
     425      this.grpBoxPreview.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     426      this.grpBoxPreview.Size = new System.Drawing.Size(976, 238);
    382427      this.grpBoxPreview.TabIndex = 4;
    383428      this.grpBoxPreview.TabStop = false;
     
    395440      this.tabsPreview.Controls.Add(this.tabPreviewShuffle);
    396441      this.tabsPreview.ItemSize = new System.Drawing.Size(58, 18);
    397       this.tabsPreview.Location = new System.Drawing.Point(6, 19);
     442      this.tabsPreview.Location = new System.Drawing.Point(8, 23);
     443      this.tabsPreview.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    398444      this.tabsPreview.Name = "tabsPreview";
    399445      this.tabsPreview.SelectedIndex = 0;
    400       this.tabsPreview.Size = new System.Drawing.Size(719, 168);
     446      this.tabsPreview.Size = new System.Drawing.Size(959, 207);
    401447      this.tabsPreview.TabIndex = 3;
    402448      //
     
    405451      this.tabPreviewInactive.Controls.Add(this.lblPreviewInActive);
    406452      this.tabPreviewInactive.Location = new System.Drawing.Point(4, 22);
     453      this.tabPreviewInactive.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    407454      this.tabPreviewInactive.Name = "tabPreviewInactive";
    408       this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding(3);
    409       this.tabPreviewInactive.Size = new System.Drawing.Size(711, 142);
     455      this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     456      this.tabPreviewInactive.Size = new System.Drawing.Size(951, 181);
    410457      this.tabPreviewInactive.TabIndex = 5;
    411458      this.tabPreviewInactive.Text = "inactive";
     
    415462      //
    416463      this.lblPreviewInActive.AutoSize = true;
    417       this.lblPreviewInActive.Location = new System.Drawing.Point(3, 3);
     464      this.lblPreviewInActive.Location = new System.Drawing.Point(4, 4);
     465      this.lblPreviewInActive.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    418466      this.lblPreviewInActive.Name = "lblPreviewInActive";
    419       this.lblPreviewInActive.Size = new System.Drawing.Size(361, 39);
     467      this.lblPreviewInActive.Size = new System.Drawing.Size(491, 51);
    420468      this.lblPreviewInActive.TabIndex = 2;
    421469      this.lblPreviewInActive.Text = "Filters are active and thus manipulations cannot be applied!\r\n\r\nPlease deactive t" +
     
    425473      // tabPreviewDeleteColumnsInfo
    426474      //
    427       this.tabPreviewDeleteColumnsInfo.Controls.Add(this.lblPreviewColumnsInfo);
     475      this.tabPreviewDeleteColumnsInfo.Controls.Add(this.panel1);
    428476      this.tabPreviewDeleteColumnsInfo.Location = new System.Drawing.Point(4, 22);
     477      this.tabPreviewDeleteColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    429478      this.tabPreviewDeleteColumnsInfo.Name = "tabPreviewDeleteColumnsInfo";
    430       this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding(3);
    431       this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size(711, 142);
     479      this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     480      this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size(951, 181);
    432481      this.tabPreviewDeleteColumnsInfo.TabIndex = 0;
    433482      this.tabPreviewDeleteColumnsInfo.Text = "del columns info";
     
    437486      //
    438487      this.lblPreviewColumnsInfo.AutoSize = true;
    439       this.lblPreviewColumnsInfo.Location = new System.Drawing.Point(3, 3);
     488      this.lblPreviewColumnsInfo.Dock = System.Windows.Forms.DockStyle.Left;
     489      this.lblPreviewColumnsInfo.Location = new System.Drawing.Point(0, 0);
     490      this.lblPreviewColumnsInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    440491      this.lblPreviewColumnsInfo.Name = "lblPreviewColumnsInfo";
    441       this.lblPreviewColumnsInfo.Size = new System.Drawing.Size(318, 13);
     492      this.lblPreviewColumnsInfo.Size = new System.Drawing.Size(423, 17);
    442493      this.lblPreviewColumnsInfo.TabIndex = 1;
    443494      this.lblPreviewColumnsInfo.Text = "{0} columns with more than {1} % missing values would be deleted";
     
    445496      // tabPreviewDeleteColumnsVariance
    446497      //
     498      this.tabPreviewDeleteColumnsVariance.Controls.Add(this.panel2);
    447499      this.tabPreviewDeleteColumnsVariance.Controls.Add(this.label12);
    448       this.tabPreviewDeleteColumnsVariance.Controls.Add(this.lblPreviewColumnsVariance);
    449500      this.tabPreviewDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
     501      this.tabPreviewDeleteColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    450502      this.tabPreviewDeleteColumnsVariance.Name = "tabPreviewDeleteColumnsVariance";
    451       this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
    452       this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size(711, 142);
     503      this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     504      this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size(951, 181);
    453505      this.tabPreviewDeleteColumnsVariance.TabIndex = 1;
    454506      this.tabPreviewDeleteColumnsVariance.Text = "del columns variance";
     
    458510      //
    459511      this.label12.AutoSize = true;
    460       this.label12.Location = new System.Drawing.Point(6, 22);
     512      this.label12.Location = new System.Drawing.Point(8, 27);
     513      this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    461514      this.label12.Name = "label12";
    462       this.label12.Size = new System.Drawing.Size(0, 13);
     515      this.label12.Size = new System.Drawing.Size(0, 17);
    463516      this.label12.TabIndex = 2;
    464517      //
     
    466519      //
    467520      this.lblPreviewColumnsVariance.AutoSize = true;
    468       this.lblPreviewColumnsVariance.Location = new System.Drawing.Point(3, 3);
     521      this.lblPreviewColumnsVariance.Dock = System.Windows.Forms.DockStyle.Left;
     522      this.lblPreviewColumnsVariance.Location = new System.Drawing.Point(0, 0);
     523      this.lblPreviewColumnsVariance.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    469524      this.lblPreviewColumnsVariance.Name = "lblPreviewColumnsVariance";
    470       this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(301, 13);
     525      this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(398, 17);
    471526      this.lblPreviewColumnsVariance.TabIndex = 2;
    472527      this.lblPreviewColumnsVariance.Text = "{0} columns with a variance smaller than {1} would be deleted.";
     
    476531      this.tabPreviewDeleteRowsInfo.Controls.Add(this.lblPreviewRowsInfo);
    477532      this.tabPreviewDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
     533      this.tabPreviewDeleteRowsInfo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    478534      this.tabPreviewDeleteRowsInfo.Name = "tabPreviewDeleteRowsInfo";
    479       this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
    480       this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size(711, 142);
     535      this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     536      this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size(951, 181);
    481537      this.tabPreviewDeleteRowsInfo.TabIndex = 2;
    482538      this.tabPreviewDeleteRowsInfo.Text = "del rows info";
     
    486542      //
    487543      this.lblPreviewRowsInfo.AutoSize = true;
    488       this.lblPreviewRowsInfo.Location = new System.Drawing.Point(3, 3);
     544      this.lblPreviewRowsInfo.Location = new System.Drawing.Point(4, 4);
     545      this.lblPreviewRowsInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    489546      this.lblPreviewRowsInfo.Name = "lblPreviewRowsInfo";
    490       this.lblPreviewRowsInfo.Size = new System.Drawing.Size(301, 13);
     547      this.lblPreviewRowsInfo.Size = new System.Drawing.Size(400, 17);
    491548      this.lblPreviewRowsInfo.TabIndex = 2;
    492549      this.lblPreviewRowsInfo.Text = "{0} rows with more than {1} % missing values would be deleted";
     
    496553      this.tabPreviewReplaceMissingValues.Controls.Add(this.lblPreviewReplaceMissingValues);
    497554      this.tabPreviewReplaceMissingValues.Location = new System.Drawing.Point(4, 22);
     555      this.tabPreviewReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    498556      this.tabPreviewReplaceMissingValues.Name = "tabPreviewReplaceMissingValues";
    499       this.tabPreviewReplaceMissingValues.Padding = new System.Windows.Forms.Padding(3);
    500       this.tabPreviewReplaceMissingValues.Size = new System.Drawing.Size(711, 142);
     557      this.tabPreviewReplaceMissingValues.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     558      this.tabPreviewReplaceMissingValues.Size = new System.Drawing.Size(951, 181);
    501559      this.tabPreviewReplaceMissingValues.TabIndex = 6;
    502560      this.tabPreviewReplaceMissingValues.Text = "repl missing vals";
     
    506564      //
    507565      this.lblPreviewReplaceMissingValues.AutoSize = true;
    508       this.lblPreviewReplaceMissingValues.Location = new System.Drawing.Point(3, 3);
     566      this.lblPreviewReplaceMissingValues.Location = new System.Drawing.Point(4, 4);
     567      this.lblPreviewReplaceMissingValues.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    509568      this.lblPreviewReplaceMissingValues.Name = "lblPreviewReplaceMissingValues";
    510       this.lblPreviewReplaceMissingValues.Size = new System.Drawing.Size(343, 13);
     569      this.lblPreviewReplaceMissingValues.Size = new System.Drawing.Size(449, 17);
    511570      this.lblPreviewReplaceMissingValues.TabIndex = 3;
    512571      this.lblPreviewReplaceMissingValues.Text = "{0} cells detected with missing values which would be replaced with {1}";
     
    516575      this.tabPreviewShuffle.Controls.Add(this.lblPreviewShuffle);
    517576      this.tabPreviewShuffle.Location = new System.Drawing.Point(4, 22);
     577      this.tabPreviewShuffle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    518578      this.tabPreviewShuffle.Name = "tabPreviewShuffle";
    519       this.tabPreviewShuffle.Padding = new System.Windows.Forms.Padding(3);
    520       this.tabPreviewShuffle.Size = new System.Drawing.Size(711, 142);
     579      this.tabPreviewShuffle.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
     580      this.tabPreviewShuffle.Size = new System.Drawing.Size(951, 181);
    521581      this.tabPreviewShuffle.TabIndex = 4;
    522582      this.tabPreviewShuffle.Text = "shuffle";
     
    526586      //
    527587      this.lblPreviewShuffle.AutoSize = true;
    528       this.lblPreviewShuffle.Location = new System.Drawing.Point(3, 3);
     588      this.lblPreviewShuffle.Location = new System.Drawing.Point(4, 4);
     589      this.lblPreviewShuffle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
    529590      this.lblPreviewShuffle.Name = "lblPreviewShuffle";
    530       this.lblPreviewShuffle.Size = new System.Drawing.Size(252, 13);
     591      this.lblPreviewShuffle.Size = new System.Drawing.Size(337, 17);
    531592      this.lblPreviewShuffle.TabIndex = 0;
    532593      this.lblPreviewShuffle.Text = "Data will be shuffled randomly - preview not possible";
     
    539600      this.label9.TabIndex = 0;
    540601      //
    541       // shuffleSeparatelyCheckbox
    542       //
    543       this.shuffleSeparatelyCheckbox.AutoSize = true;
    544       this.shuffleSeparatelyCheckbox.Location = new System.Drawing.Point(6, 2);
    545       this.shuffleSeparatelyCheckbox.Name = "shuffleSeparatelyCheckbox";
    546       this.shuffleSeparatelyCheckbox.Size = new System.Drawing.Size(233, 17);
    547       this.shuffleSeparatelyCheckbox.TabIndex = 1;
    548       this.shuffleSeparatelyCheckbox.Text = "Shuffle training and test partitions separately";
    549       this.shuffleSeparatelyCheckbox.UseVisualStyleBackColor = true;
     602      // panel1
     603      //
     604      this.panel1.AutoScroll = true;
     605      this.panel1.Controls.Add(this.lblPreviewColumnsInfo);
     606      this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
     607      this.panel1.Location = new System.Drawing.Point(4, 4);
     608      this.panel1.Name = "panel1";
     609      this.panel1.Size = new System.Drawing.Size(943, 173);
     610      this.panel1.TabIndex = 2;
     611      //
     612      // panel2
     613      //
     614      this.panel2.AutoScroll = true;
     615      this.panel2.Controls.Add(this.lblPreviewColumnsVariance);
     616      this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
     617      this.panel2.Location = new System.Drawing.Point(4, 4);
     618      this.panel2.Name = "panel2";
     619      this.panel2.Size = new System.Drawing.Size(943, 173);
     620      this.panel2.TabIndex = 3;
    550621      //
    551622      // ManipulationView
    552623      //
    553       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     624      this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
    554625      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    555626      this.Controls.Add(this.btnApply);
     
    557628      this.Controls.Add(this.grpBoxData);
    558629      this.Controls.Add(this.lstMethods);
     630      this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
    559631      this.Name = "ManipulationView";
    560       this.Size = new System.Drawing.Size(739, 529);
     632      this.Size = new System.Drawing.Size(985, 651);
    561633      this.grpBoxData.ResumeLayout(false);
    562634      this.tabsData.ResumeLayout(false);
     
    578650      this.tabPreviewInactive.PerformLayout();
    579651      this.tabPreviewDeleteColumnsInfo.ResumeLayout(false);
    580       this.tabPreviewDeleteColumnsInfo.PerformLayout();
    581652      this.tabPreviewDeleteColumnsVariance.ResumeLayout(false);
    582653      this.tabPreviewDeleteColumnsVariance.PerformLayout();
     
    587658      this.tabPreviewShuffle.ResumeLayout(false);
    588659      this.tabPreviewShuffle.PerformLayout();
     660      this.panel1.ResumeLayout(false);
     661      this.panel1.PerformLayout();
     662      this.panel2.ResumeLayout(false);
     663      this.panel2.PerformLayout();
    589664      this.ResumeLayout(false);
    590665
     
    636711    private System.Windows.Forms.Label lblPreviewInActive;
    637712    private System.Windows.Forms.CheckBox shuffleSeparatelyCheckbox;
     713    private System.Windows.Forms.Panel panel1;
     714    private System.Windows.Forms.Panel panel2;
    638715  }
    639716}
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r12009 r12718  
    2323using System.Collections.Generic;
    2424using System.Drawing;
     25using System.Globalization;
     26using System.Linq;
     27using System.Text;
    2528using System.Windows.Forms;
    2629using HeuristicLab.Core.Views;
     
    149152      validateDoubleTextBox(txtDeleteColumnsInfo.Text);
    150153      if (btnApply.Enabled) {
    151         int count = Content.ManipulationLogic.ColumnsWithMissingValuesGreater(getDeleteColumnsInfo()).Count;
    152         int rowCount = Content.FilterLogic.PreprocessingData.Rows;
    153         lblPreviewColumnsInfo.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + rowCount + " (" + string.Format("{0:F2}%", 100d / rowCount * count) + ") were detected with more than " + txtDeleteColumnsInfo.Text + "% missing values.";
     154        var filteredColumns = Content.ManipulationLogic.ColumnsWithMissingValuesGreater(getDeleteColumnsInfo());
     155        int count = filteredColumns.Count;
     156        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
     157        lblPreviewColumnsInfo.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with more than " + txtDeleteColumnsInfo.Text + "% missing values.";
    154158        if (count > 0) {
    155           lblPreviewColumnsInfo.Text += Environment.NewLine + Environment.NewLine + "Please press the button \"Apply Manipulation\" if you wish to delete those columns.";
     159          StringBuilder sb = new StringBuilder();
     160          sb.Append(Environment.NewLine);
     161          sb.Append("Columns: ");
     162          sb.Append(Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
     163          for (int i = 1; i < filteredColumns.Count; i++) {
     164            string columnName = Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
     165            sb.Append(", ");
     166            sb.Append(columnName);
     167          }
     168          sb.Append(Environment.NewLine);
     169          sb.Append("Please press the button \"Apply Manipulation\" if you wish to delete those columns.");
     170
     171          lblPreviewColumnsInfo.Text += sb.ToString();
    156172        } else {
    157173          btnApply.Enabled = false;
     
    165181      validateDoubleTextBox(txtDeleteColumnsVariance.Text);
    166182      if (btnApply.Enabled) {
    167         int count = Content.ManipulationLogic.ColumnsWithVarianceSmaller(getDeleteColumnsVariance()).Count;
    168         int rowCount = Content.FilterLogic.PreprocessingData.Rows;
    169         lblPreviewColumnsVariance.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + rowCount + " (" + string.Format("{0:F2}%", 100d / rowCount * count) + ") were detected with a variance smaller than " + txtDeleteColumnsVariance.Text + ".";
     183        var filteredColumns = Content.ManipulationLogic.ColumnsWithVarianceSmaller(getDeleteColumnsVariance());
     184        int count = filteredColumns.Count;
     185        int columnCount = Content.FilterLogic.PreprocessingData.Columns;
     186        lblPreviewColumnsVariance.Text = count + " column" + (count > 1 || count == 0 ? "s" : "") + " of " + columnCount + " (" + string.Format("{0:F2}%", 100d / columnCount * count) + ") were detected with a variance smaller than " + txtDeleteColumnsVariance.Text + ".";
    170187        if (count > 0) {
    171           lblPreviewColumnsVariance.Text += Environment.NewLine + Environment.NewLine + "Please press the button \"Apply Manipulation\" if you wish to delete those columns.";
     188          StringBuilder sb = new StringBuilder();
     189          sb.Append(Environment.NewLine);
     190          sb.Append("Columns: ");
     191          sb.Append(Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(0)));
     192          for (int i = 1; i < filteredColumns.Count; i++) {
     193            string columnName = Content.SearchLogic.VariableNames.ElementAt(filteredColumns.ElementAt(i));
     194            sb.Append(", ");
     195            sb.Append(columnName);
     196          }
     197          sb.Append(Environment.NewLine);
     198          sb.Append("Please press the button \"Apply Manipulation\" if you wish to delete those columns.");
     199
     200          lblPreviewColumnsVariance.Text += sb.ToString();
    172201        } else {
    173202          btnApply.Enabled = false;
     
    279308      if (!string.IsNullOrEmpty(text)) {
    280309        double percent;
    281         if (Double.TryParse(text, out percent)) {
     310        if (Double.TryParse(text, NumberStyles.Number ^ NumberStyles.AllowThousands, CultureInfo.CurrentCulture, out percent)) {
    282311          btnApply.Enabled = true;
    283312        }
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingChartView.cs

    r12009 r12718  
    2222using System;
    2323using System.Collections.Generic;
     24using System.Linq;
    2425using System.Windows.Forms;
    2526using HeuristicLab.Analysis;
     
    4950
    5051    public IEnumerable<double> Classification { get; set; }
     52    public bool IsDetailedChartViewEnabled { get; set; }
    5153
    5254    public PreprocessingChartView() {
     
    5961    //Add or remove data row
    6062    private void CheckedItemsChanged(object sender, CollectionItemsChangedEventArgs<IndexedItem<StringValue>> checkedItems) {
     63
    6164      foreach (IndexedItem<StringValue> item in checkedItems.Items) {
    6265        string variableName = item.Value.Value;
     
    121124      if (Content.VariableItemList == null) {
    122125        Content.VariableItemList = Content.CreateVariableItemList();
     126      } else {
     127        var checkedNames = Content.VariableItemList.CheckedItems.Select(x => x.Value.Value);
     128        Content.VariableItemList = Content.CreateVariableItemList(checkedNames);
    123129      }
    124130      checkedItemList.Content = Content.VariableItemList;
     
    135141        DataRow row = GetDataRow(variableName);
    136142
    137         //add row to data table
    138         dataTable.Rows.Add(row);
    139 
    140         //add row to data table per variable
    141         d.Rows.Add(row);
    142         dataTablePerVariable.Add(d);
     143        if (row != null) {
     144          //add row to data table
     145          dataTable.Rows.Add(row);
     146
     147          //add row to data table per variable
     148          d.Rows.Add(row);
     149          dataTablePerVariable.Add(d);
     150        }
    143151      }
    144152
     
    152160      dataTable.SelectedRows.Clear();
    153161      foreach (var selectedRow in selectedDataRows) {
    154         if(VariableIsDisplayed(selectedRow.Name))
     162        if (VariableIsDisplayed(selectedRow.Name))
    155163          dataTable.SelectedRows.Add(selectedRow);
    156164      }
     
    354362      PreprocessingDataTableView dataView = new PreprocessingDataTableView();
    355363      dataView.Classification = Classification;
     364      dataView.IsDetailedChartViewEnabled = IsDetailedChartViewEnabled;
    356365
    357366      if (dataTable == null) {
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/PreprocessingDataTableView.cs

    r12009 r12718  
    4747
    4848    public IEnumerable<double> Classification { get; set; }
     49    public bool IsDetailedChartViewEnabled { get; set; }
    4950
    5051    public PreprocessingDataTableView() {
     
    145146        RegisterDataRowEvents(row);
    146147        var series = new Series(row.Name);
    147         if (row.VisualProperties.DisplayName.Trim() != String.Empty) series.LegendText = row.VisualProperties.DisplayName;
     148        if (row.VisualProperties.DisplayName.Trim() != String.Empty)
     149          series.LegendText = row.VisualProperties.DisplayName;
    148150        else series.LegendText = row.Name;
     151
    149152        ConfigureSeries(series, row);
    150153        FillSeriesWithRowValues(series, row);
    151154
     155        if (IsDetailedChartViewEnabled) {
     156          series.LegendText += " Values: " + row.Values.Count;
     157        }
    152158        if (Classification == null)
    153159          chart.Series.Add(series);
     
    661667
    662668        chart.Titles.Add(row.Name);
    663 
     669        int featureOverallValueCount = 0;
     670        if (IsDetailedChartViewEnabled)
     671          featureOverallValueCount = row.Values.Count(x => !IsInvalidValue(x));
    664672        foreach (KeyValuePair<double, List<double>> entry in valuesPerClass) {
    665673          var s = new Series(row.Name + entry.Key);
     
    669677
    670678          s.LegendText = entry.Key.ToString();
    671 
     679          if (IsDetailedChartViewEnabled) {
     680            int featureValueCount = entry.Value.Count(x => !IsInvalidValue(x));
     681            s.LegendText += " Values: ";
     682            s.LegendText += (featureOverallValueCount > 0) ?
     683              string.Format("{0} ({1:F2}%)", featureValueCount, (featureValueCount / (double)featureOverallValueCount) * 100)
     684            : "0";
     685          }
    672686          chart.Series.Add(s);
    673687        }
     
    752766                              ? "Y"
    753767                              : Content.VisualProperties.YAxisTitle;
    754         series.Points.Add(new DataPoint(d - intervalCenter, sum) {
    755           ToolTip =
    756             xAxisTitle + ": [" + (d - intervalWidth) + "-" + d + ")" + Environment.NewLine +
    757             yAxisTitle + ": " + sum
    758         });
     768        DataPoint newDataPoint = new DataPoint(d - intervalCenter, sum);
     769        newDataPoint.ToolTip =
     770          xAxisTitle + ": [" + (d - intervalWidth) + "-" + d + ")" + Environment.NewLine +
     771          yAxisTitle + ": " + sum;
     772        int overallValueCount = row.Values.Count();
     773        if (overallValueCount > 0)
     774          newDataPoint.ToolTip += string.Format(" ({0:F2}%)", (sum / overallValueCount) * 100);
     775        series.Points.Add(newDataPoint);
    759776      }
    760777    }
  • stable/HeuristicLab.DataPreprocessing.Views/3.4/StatisticsView.cs

    r12009 r12718  
    166166        "", //standard deviation
    167167        "", //variance
    168         logic.GetMostCommonValue<string>(columnIndex).ToString(),
     168        logic.GetMostCommonValue<string>(columnIndex) ?? "",
    169169        logic.GetDifferentValuesCount<string>(columnIndex).ToString()
    170170      };
  • stable/HeuristicLab.DataPreprocessing/3.4

    • Property svn:mergeinfo set to (toggle deleted branches)
      /trunk/sources/HeuristicLab.DataPreprocessing/3.4mergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.DataPreprocessing/3.410321-10322
      /branches/1721-RandomForestPersistence/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.DataPreprocessing/3.45516-5520
      /branches/Algorithms.GradientDescent/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45516-5520
      /branches/Benchmarking/sources/HeuristicLab.DataPreprocessing/3.46917-7005
      /branches/Benchmarking/sources/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46917-7005
      /branches/CloningRefactoring/HeuristicLab.DataPreprocessing/3.44656-4721
      /branches/CloningRefactoring/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.44656-4721
      /branches/CodeEditor/HeuristicLab.DataPreprocessing/3.411700-11806
      /branches/CodeEditor/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.411700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.DataPreprocessing/3.45471-5808
      /branches/DataAnalysis Refactoring/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.DataPreprocessing/3.45815-6180
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45815-6180
      /branches/DataAnalysis/HeuristicLab.DataPreprocessing/3.44458-4459,​4462,​4464
      /branches/DataAnalysis/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.44458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.410085-11101
      /branches/DataPreprocessing/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410085-11101
      /branches/DataPreprocessingImprovements/3.412051
      /branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing/3.412053-12675
      /branches/GP.Grammar.Editor/HeuristicLab.DataPreprocessing/3.46284-6795
      /branches/GP.Grammar.Editor/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.DataPreprocessing/3.45060
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45060
      /branches/HLScript/HeuristicLab.DataPreprocessing/3.410331-10358
      /branches/HLScript/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.DataPreprocessing/3.411570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.DataPreprocessing/3.46123-9799
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46123-9799
      /branches/LogResidualEvaluator/HeuristicLab.DataPreprocessing/3.410202-10483
      /branches/LogResidualEvaluator/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410202-10483
      /branches/NET40/sources/HeuristicLab.DataPreprocessing/3.45138-5162
      /branches/NET40/sources/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45138-5162
      /branches/NSGA-II Changes/HeuristicLab.DataPreprocessing/3.412033-12122
      /branches/ParallelEngine/HeuristicLab.DataPreprocessing/3.45175-5192
      /branches/ParallelEngine/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.DataPreprocessing/3.47568-7810
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.47568-7810
      /branches/QAPAlgorithms/HeuristicLab.DataPreprocessing/3.46350-6627
      /branches/QAPAlgorithms/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46350-6627
      /branches/Restructure trunk solution/HeuristicLab.DataPreprocessing/3.46828
      /branches/Restructure trunk solution/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46828
      /branches/RuntimeOptimizer/HeuristicLab.DataPreprocessing/3.48943-9078
      /branches/RuntimeOptimizer/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.48943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.DataPreprocessing/3.47787-8333
      /branches/ScatterSearch (trunk integration)/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.47787-8333
      /branches/SlaveShutdown/HeuristicLab.DataPreprocessing/3.48944-8956
      /branches/SlaveShutdown/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.48944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.DataPreprocessing/3.410204-10479
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.DataPreprocessing/3.45370-5682
      /branches/SuccessProgressAnalysis/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45370-5682
      /branches/Trunk/HeuristicLab.DataPreprocessing/3.46829-6865
      /branches/Trunk/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.46829-6865
      /branches/UnloadJobs/HeuristicLab.DataPreprocessing/3.49168-9215
      /branches/UnloadJobs/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.49168-9215
      /branches/VNS/HeuristicLab.DataPreprocessing/3.45594-5752
      /branches/VNS/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45594-5752
      /branches/histogram/HeuristicLab.DataPreprocessing/3.45959-6341
      /branches/histogram/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.45959-6341
      /stable/HeuristicLab.DataPreprocessing/HeuristicLab.DataPreprocessing/3.410032-10033,​11170,​11173,​11175,​12008-12010
  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/DataGridContent.cs

    r12009 r12718  
    114114    }
    115115
    116     public void DeleteRow(IEnumerable<int> rows) {
     116    public void DeleteRows(IEnumerable<int> rows) {
    117117      PreProcessingData.DeleteRowsWithIndices(rows);
    118118      createRowNames();
     119    }
     120
     121    public void DeleteColumn(int column) {
     122      PreProcessingData.DeleteColumn(column);
    119123    }
    120124
  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/HistogramContent.cs

    r12009 r12718  
    4242      set { this.classifierVariableIndex = value; }
    4343    }
     44    public bool IsDetailedChartViewEnabled { get; set; }
    4445
    4546
  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/PreprocessingChartContent.cs

    r12009 r12718  
    2323using System.Collections.Generic;
    2424using System.Drawing;
     25using System.Linq;
    2526using HeuristicLab.Analysis;
    2627using HeuristicLab.Common;
     
    126127
    127128
    128     public ICheckedItemList<StringValue> CreateVariableItemList() {
     129    public ICheckedItemList<StringValue> CreateVariableItemList(IEnumerable<string> checkedItems = null) {
    129130      ICheckedItemList<StringValue> itemList = new CheckedItemList<StringValue>();
    130131      foreach (string name in PreprocessingData.GetDoubleVariableNames()) {
    131         itemList.Add(new StringValue(name), true);
     132        var n = new StringValue(name);
     133        itemList.Add(n, (checkedItems == null) ? true : checkedItems.Contains(name));
    132134      }
    133135      return new ReadOnlyCheckedItemList<StringValue>(itemList);
  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/SearchLogic.cs

    r12009 r12718  
    2323using System.Collections;
    2424using System.Collections.Generic;
    25 using System.Linq;
    2625
    2726namespace HeuristicLab.DataPreprocessing {
    2827  public class SearchLogic : ISearchLogic {
    2928    private readonly ITransactionalPreprocessingData preprocessingData;
     29    private readonly IFilterLogic filterLogic;
    3030
    3131    private Dictionary<int, IList<int>> MissingValueIndicies { get; set; }
     
    4444    }
    4545
    46     public SearchLogic(ITransactionalPreprocessingData thePreprocessingData) {
     46    public SearchLogic(ITransactionalPreprocessingData thePreprocessingData, IFilterLogic theFilterLogic) {
    4747      preprocessingData = thePreprocessingData;
     48      filterLogic = theFilterLogic;
    4849
    4950      MissingValueIndicies = new Dictionary<int, IList<int>>();
    5051      ValuesWithoutNaN = new Dictionary<int, IList>();
    5152
    52       preprocessingData.Changed += preprocessingData_Changed;
     53      preprocessingData.Changed += PreprocessingData_Changed;
     54      filterLogic.FilterChanged += FilterLogic_FilterChanged;
    5355    }
    5456
    55     void preprocessingData_Changed(object sender, DataPreprocessingChangedEventArgs e)
    56     {
     57    void FilterLogic_FilterChanged(object sender, EventArgs e) {
     58      //recalculate
     59      for (int i = 0; i < Columns; i++) {
     60        MissingValueIndicies.Remove(i);
     61        ValuesWithoutNaN.Remove(i);
     62      }
     63    }
     64
     65    void PreprocessingData_Changed(object sender, DataPreprocessingChangedEventArgs e) {
    5766      switch (e.Type) {
    5867        case DataPreprocessingChangedEventType.DeleteColumn:
     
    7382          ValuesWithoutNaN = new Dictionary<int, IList>();
    7483          break;
    75       } 
     84      }
    7685    }
    7786
     
    97106
    98107    public IList<int> GetMissingValueIndices(int columnIndex) {
    99       if (!MissingValueIndicies.ContainsKey(columnIndex)){       
    100           if (preprocessingData.VariableHasType<double>(columnIndex)) {
    101             MissingValueIndicies[columnIndex] = GetMissingValueIndices<double>(columnIndex);
    102           } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
    103             MissingValueIndicies[columnIndex] = GetMissingValueIndices<string>(columnIndex);
    104           } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
    105             MissingValueIndicies[columnIndex] = GetMissingValueIndices<DateTime>(columnIndex);
    106           } else {
    107             throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
    108           }
    109       }
     108      if (!MissingValueIndicies.ContainsKey(columnIndex)) {
     109        if (preprocessingData.VariableHasType<double>(columnIndex)) {
     110          MissingValueIndicies[columnIndex] = GetMissingValueIndices<double>(columnIndex);
     111        } else if (preprocessingData.VariableHasType<string>(columnIndex)) {
     112          MissingValueIndicies[columnIndex] = GetMissingValueIndices<string>(columnIndex);
     113        } else if (preprocessingData.VariableHasType<DateTime>(columnIndex)) {
     114          MissingValueIndicies[columnIndex] = GetMissingValueIndices<DateTime>(columnIndex);
     115        } else {
     116          throw new ArgumentException("column " + columnIndex + " contains a non supported type.");
     117        }
     118      }
     119      return MissingValueIndicies[columnIndex];
     120    }
    110121
    111       return MissingValueIndicies[columnIndex];
    112    }
    113122    private IList<int> GetMissingValueIndices<T>(int columnIndex) {
    114123      List<int> missingIndices = new List<int>();
    115      
    116       for(int row = 0; row < preprocessingData.Rows; ++row) {
     124
     125      for (int row = 0; row < preprocessingData.Rows; ++row) {
    117126        if (IsMissingValue(columnIndex, row)) {
    118127          missingIndices.Add(row);
     
    123132    }
    124133
    125     public IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection)
    126     {
    127       if (considerSelection) {     
    128         var selectedRows =  preprocessingData.Selection[columnIndex];
    129        
     134    public IEnumerable<T> GetValuesWithoutNaN<T>(int columnIndex, bool considerSelection) {
     135      if (considerSelection) {
     136        var selectedRows = preprocessingData.Selection[columnIndex];
     137
    130138        List<T> values = new List<T>();
    131139        foreach (var rowIdx in selectedRows) {
  • stable/HeuristicLab.DataPreprocessing/3.4/Implementations/StatisticsLogic.cs

    r12009 r12718  
    3838
    3939    public int GetColumnCount() {
    40       return preprocessingData.Columns;
     40      return searchLogic.Columns;
    4141    }
    4242
    4343    public int GetRowCount() {
    44       return preprocessingData.Rows;
     44      return searchLogic.Rows;
    4545    }
    4646
     
    4848      int count = 0;
    4949
    50       for (int i = 0; i < preprocessingData.Columns; ++i) {
     50      for (int i = 0; i < searchLogic.Columns; ++i) {
    5151        if (preprocessingData.VariableHasType<double>(i)) {
    5252          ++count;
     
    5757
    5858    public int GetNominalColumnCount() {
    59       return preprocessingData.Columns - GetNumericColumnCount();
     59      return searchLogic.Columns - GetNumericColumnCount();
    6060    }
    6161
    6262    public int GetMissingValueCount() {
    6363      int count = 0;
    64       for (int i = 0; i < preprocessingData.Columns; ++i) {
     64      for (int i = 0; i < searchLogic.Columns; ++i) {
    6565        count += GetMissingValueCount(i);
    6666      }
     
    7373
    7474    public T GetMin<T>(int columnIndex, bool considerSelection) where T : IComparable<T> {
    75       return preprocessingData.GetValues<T>(columnIndex, considerSelection).Min();
     75      var min = default(T);
     76      if (preprocessingData.VariableHasType<T>(columnIndex)) {
     77        var values = GetValuesWithoutNaN<T>(columnIndex, considerSelection);
     78        if (values.Any()) {
     79          min = values.Min();
     80        }
     81      }
     82      return min;
    7683    }
    7784
    7885    public T GetMax<T>(int columnIndex, bool considerSelection) where T : IComparable<T> {
    79       return preprocessingData.GetValues<T>(columnIndex, considerSelection).Max();
     86      var max = default(T);
     87      if (preprocessingData.VariableHasType<T>(columnIndex)) {
     88        var values = GetValuesWithoutNaN<T>(columnIndex, considerSelection);
     89        if (values.Any()) {
     90          max = values.Max();
     91        }
     92      }
     93      return max;
    8094    }
    8195
     
    8397      double median = double.NaN;
    8498      if (preprocessingData.VariableHasType<double>(columnIndex)) {
    85         median = GetValuesWithoutNaN<double>(columnIndex, considerSelection).Median();
     99        var values = GetValuesWithoutNaN<double>(columnIndex, considerSelection);
     100        if (values.Any()) {
     101          median = values.Median();
     102        }
    86103      }
    87104      return median;
     
    91108      double avg = double.NaN;
    92109      if (preprocessingData.VariableHasType<double>(columnIndex)) {
    93         avg = GetValuesWithoutNaN<double>(columnIndex, considerSelection).Average();
     110        var values = GetValuesWithoutNaN<double>(columnIndex, considerSelection);
     111        if (values.Any()) {
     112          avg = values.Average();
     113        }
    94114      }
    95115      return avg;
     
    113133
    114134    public T GetMostCommonValue<T>(int columnIndex, bool considerSelection) {
    115       var t = preprocessingData.GetValues<T>(columnIndex, considerSelection);
    116       var t2 = t.GroupBy(x => x);
    117       var t3 = t2.Select(g => g.Key);
    118 
    119       return preprocessingData.GetValues<T>(columnIndex, considerSelection)
    120                               .GroupBy(x => x)
     135      var values = GetValuesWithoutNaN<T>(columnIndex, considerSelection);
     136      if (!values.Any())
     137        return default(T);
     138      return values.GroupBy(x => x)
    121139                              .OrderByDescending(g => g.Count())
    122140                              .Select(g => g.Key)
  • stable/HeuristicLab.DataPreprocessing/3.4/Interfaces/IDataGridContent.cs

    r12009 r12718  
    3131    IDictionary<int, IList<int>> Selection { get; set; }
    3232
    33     void DeleteRow(IEnumerable<int> rows);
     33    void DeleteRows(IEnumerable<int> rows);
     34    void DeleteColumn(int column);
    3435    bool Validate(string value, out string errorMessage, int columnIndex);
    3536
  • stable/HeuristicLab.DataPreprocessing/3.4/ProblemDataCreator.cs

    r12009 r12718  
    6161      SetTrainingAndTestPartition(problemData);
    6262      // set the input variables to the correct checked state
    63       var inputVariables = problemData.InputVariables.ToDictionary(x => x.Value, x => x);
    64       foreach (var variable in oldProblemData.InputVariables) {
    65         bool @checked = oldProblemData.InputVariables.ItemChecked(variable);
    66         problemData.InputVariables.SetItemCheckedState(inputVariables[variable.Value], @checked);
     63      var inputVariables = oldProblemData.InputVariables.ToDictionary(x => x.Value, x => x);
     64      foreach (var variable in problemData.InputVariables) {
     65        bool isChecked = oldProblemData.InputVariables.ItemChecked(inputVariables[variable.Value]);
     66        problemData.InputVariables.SetItemCheckedState(variable, isChecked);
    6767      }
    6868
     
    7777
    7878    private IDataAnalysisProblemData CreateClassificationData(ClassificationProblemData oldProblemData) {
     79      // target variable must be double and must exist in the new dataset
    7980      var targetVariable = oldProblemData.TargetVariable;
    80       // target variable must be double and must exist in the new dataset
    81       return new ClassificationProblemData(ExportedDataset, GetDoubleInputVariables(targetVariable), targetVariable, Transformations);
     81      var newProblemData = new ClassificationProblemData(ExportedDataset, GetDoubleInputVariables(targetVariable), targetVariable, Transformations);
     82      newProblemData.PositiveClass = oldProblemData.PositiveClass;
     83      return newProblemData;
    8284    }
    8385
Note: See TracChangeset for help on using the changeset viewer.