Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/14 14:04:01 (11 years ago)
Author:
rstoll
Message:
  • Missing values manipulations
Location:
branches/DataPreprocessing
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessingView.cs

    r10772 r10776  
    5858          new FilterContent(filterLogic),
    5959          new TransformationContent(data),
    60           new ManipulationContent(manipulationLogic),
     60          new ManipulationContent(manipulationLogic, searchLogic),
    6161          new LineChartContent(lineChartLogic),
    6262          new HistogramContent(histogramLogic)
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.Designer.cs

    r10737 r10776  
    2727      this.btnApply = new System.Windows.Forms.Button();
    2828      this.grpBoxData = new System.Windows.Forms.GroupBox();
    29       this.tabsData = new System.Windows.Forms.TabControl();
    30       this.tabPage1 = new System.Windows.Forms.TabPage();
    31       this.label7 = new System.Windows.Forms.Label();
    32       this.tabDataDeleteColumnsInformation = new System.Windows.Forms.TabPage();
    33       this.label2 = new System.Windows.Forms.Label();
    34       this.txtDeleteColumnsInfo = new System.Windows.Forms.TextBox();
    35       this.label1 = new System.Windows.Forms.Label();
    36       this.tabDataDeleteColumnsVariance = new System.Windows.Forms.TabPage();
    37       this.txtDeleteColumnsVariance = new System.Windows.Forms.TextBox();
    38       this.label4 = new System.Windows.Forms.Label();
    39       this.tabDataDeleteRowsInfo = new System.Windows.Forms.TabPage();
    40       this.label3 = new System.Windows.Forms.Label();
    41       this.txtDeleteRowsInfo = new System.Windows.Forms.TextBox();
    42       this.label5 = new System.Windows.Forms.Label();
    43       this.tabDataShuffle = new System.Windows.Forms.TabPage();
    44       this.label6 = new System.Windows.Forms.Label();
    4529      this.grpBoxPreview = new System.Windows.Forms.GroupBox();
    4630      this.tabsPreview = new System.Windows.Forms.TabControl();
     
    5337      this.tabPreviewDeleteRowsInfo = new System.Windows.Forms.TabPage();
    5438      this.lblPreviewRowsInfo = new System.Windows.Forms.Label();
     39      this.tabPreviewReplaceMissingValues = new System.Windows.Forms.TabPage();
     40      this.lblPreviewReplaceMissingValues = new System.Windows.Forms.Label();
    5541      this.tabPreviewShuffle = new System.Windows.Forms.TabPage();
    5642      this.lblPreviewShuffle = new System.Windows.Forms.Label();
     43      this.label9 = new System.Windows.Forms.Label();
     44      this.tabDataShuffle = new System.Windows.Forms.TabPage();
     45      this.label6 = new System.Windows.Forms.Label();
     46      this.tabReplaceMissingValues = new System.Windows.Forms.TabPage();
     47      this.label10 = new System.Windows.Forms.Label();
     48      this.lblValueColon = new System.Windows.Forms.Label();
     49      this.cmbReplaceWith = new System.Windows.Forms.ComboBox();
     50      this.txtReplaceValue = new System.Windows.Forms.TextBox();
     51      this.tabDataDeleteRowsInfo = new System.Windows.Forms.TabPage();
     52      this.label5 = new System.Windows.Forms.Label();
     53      this.txtDeleteRowsInfo = new System.Windows.Forms.TextBox();
     54      this.label3 = new System.Windows.Forms.Label();
     55      this.tabDataDeleteColumnsVariance = new System.Windows.Forms.TabPage();
     56      this.label4 = new System.Windows.Forms.Label();
     57      this.txtDeleteColumnsVariance = new System.Windows.Forms.TextBox();
     58      this.tabDataDeleteColumnsInformation = new System.Windows.Forms.TabPage();
     59      this.label1 = new System.Windows.Forms.Label();
     60      this.txtDeleteColumnsInfo = new System.Windows.Forms.TextBox();
     61      this.label2 = new System.Windows.Forms.Label();
     62      this.tabPage1 = new System.Windows.Forms.TabPage();
     63      this.label7 = new System.Windows.Forms.Label();
     64      this.tabsData = new System.Windows.Forms.TabControl();
    5765      this.grpBoxData.SuspendLayout();
    58       this.tabsData.SuspendLayout();
    59       this.tabPage1.SuspendLayout();
    60       this.tabDataDeleteColumnsInformation.SuspendLayout();
    61       this.tabDataDeleteColumnsVariance.SuspendLayout();
    62       this.tabDataDeleteRowsInfo.SuspendLayout();
    63       this.tabDataShuffle.SuspendLayout();
    6466      this.grpBoxPreview.SuspendLayout();
    6567      this.tabsPreview.SuspendLayout();
     
    6769      this.tabPreviewDeleteColumnsVariance.SuspendLayout();
    6870      this.tabPreviewDeleteRowsInfo.SuspendLayout();
     71      this.tabPreviewReplaceMissingValues.SuspendLayout();
    6972      this.tabPreviewShuffle.SuspendLayout();
     73      this.tabDataShuffle.SuspendLayout();
     74      this.tabReplaceMissingValues.SuspendLayout();
     75      this.tabDataDeleteRowsInfo.SuspendLayout();
     76      this.tabDataDeleteColumnsVariance.SuspendLayout();
     77      this.tabDataDeleteColumnsInformation.SuspendLayout();
     78      this.tabPage1.SuspendLayout();
     79      this.tabsData.SuspendLayout();
    7080      this.SuspendLayout();
    7181      //
     
    7989            "Delete Columns with insufficient Variance",
    8090            "Delete Rows with insufficient Information",
     91            "Replace Missing Values",
    8192            "Shuffle Data"});
    8293      this.lstMethods.Location = new System.Drawing.Point(3, 3);
     
    111122      this.grpBoxData.Text = "Properties";
    112123      //
    113       // tabsData
    114       //
    115       this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     124      // grpBoxPreview
     125      //
     126      this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     127            | System.Windows.Forms.AnchorStyles.Left)
    116128            | System.Windows.Forms.AnchorStyles.Right)));
    117       this.tabsData.Controls.Add(this.tabPage1);
    118       this.tabsData.Controls.Add(this.tabDataDeleteColumnsInformation);
    119       this.tabsData.Controls.Add(this.tabDataDeleteColumnsVariance);
    120       this.tabsData.Controls.Add(this.tabDataDeleteRowsInfo);
    121       this.tabsData.Controls.Add(this.tabDataShuffle);
    122       this.tabsData.ItemSize = new System.Drawing.Size(58, 18);
    123       this.tabsData.Location = new System.Drawing.Point(6, 19);
    124       this.tabsData.Name = "tabsData";
    125       this.tabsData.SelectedIndex = 0;
    126       this.tabsData.Size = new System.Drawing.Size(719, 164);
    127       this.tabsData.TabIndex = 3;
    128       //
    129       // tabPage1
    130       //
    131       this.tabPage1.Controls.Add(this.label7);
    132       this.tabPage1.Location = new System.Drawing.Point(4, 22);
    133       this.tabPage1.Name = "tabPage1";
    134       this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
    135       this.tabPage1.Size = new System.Drawing.Size(711, 138);
    136       this.tabPage1.TabIndex = 5;
    137       this.tabPage1.Text = "tabDataInactive";
    138       this.tabPage1.UseVisualStyleBackColor = true;
    139       //
    140       // label7
    141       //
    142       this.label7.AutoSize = true;
    143       this.label7.Enabled = false;
    144       this.label7.Location = new System.Drawing.Point(3, 3);
    145       this.label7.Name = "label7";
    146       this.label7.Size = new System.Drawing.Size(259, 13);
    147       this.label7.TabIndex = 1;
    148       this.label7.Text = "Please select one of the manipulation methods above";
     129      this.grpBoxPreview.Controls.Add(this.tabsPreview);
     130      this.grpBoxPreview.Location = new System.Drawing.Point(4, 301);
     131      this.grpBoxPreview.Name = "grpBoxPreview";
     132      this.grpBoxPreview.Size = new System.Drawing.Size(732, 193);
     133      this.grpBoxPreview.TabIndex = 4;
     134      this.grpBoxPreview.TabStop = false;
     135      this.grpBoxPreview.Text = "Preview";
     136      //
     137      // tabsPreview
     138      //
     139      this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     140            | System.Windows.Forms.AnchorStyles.Right)));
     141      this.tabsPreview.Controls.Add(this.tabPreviewInactive);
     142      this.tabsPreview.Controls.Add(this.tabPreviewDeleteColumnsInfo);
     143      this.tabsPreview.Controls.Add(this.tabPreviewDeleteColumnsVariance);
     144      this.tabsPreview.Controls.Add(this.tabPreviewDeleteRowsInfo);
     145      this.tabsPreview.Controls.Add(this.tabPreviewReplaceMissingValues);
     146      this.tabsPreview.Controls.Add(this.tabPreviewShuffle);
     147      this.tabsPreview.ItemSize = new System.Drawing.Size(58, 18);
     148      this.tabsPreview.Location = new System.Drawing.Point(6, 19);
     149      this.tabsPreview.Name = "tabsPreview";
     150      this.tabsPreview.SelectedIndex = 0;
     151      this.tabsPreview.Size = new System.Drawing.Size(719, 168);
     152      this.tabsPreview.TabIndex = 3;
     153      //
     154      // tabPreviewInactive
     155      //
     156      this.tabPreviewInactive.Location = new System.Drawing.Point(4, 22);
     157      this.tabPreviewInactive.Name = "tabPreviewInactive";
     158      this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding(3);
     159      this.tabPreviewInactive.Size = new System.Drawing.Size(711, 142);
     160      this.tabPreviewInactive.TabIndex = 5;
     161      this.tabPreviewInactive.Text = "inactive";
     162      this.tabPreviewInactive.UseVisualStyleBackColor = true;
     163      //
     164      // tabPreviewDeleteColumnsInfo
     165      //
     166      this.tabPreviewDeleteColumnsInfo.Controls.Add(this.lblPreviewColumnsInfo);
     167      this.tabPreviewDeleteColumnsInfo.Location = new System.Drawing.Point(4, 22);
     168      this.tabPreviewDeleteColumnsInfo.Name = "tabPreviewDeleteColumnsInfo";
     169      this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding(3);
     170      this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size(711, 142);
     171      this.tabPreviewDeleteColumnsInfo.TabIndex = 0;
     172      this.tabPreviewDeleteColumnsInfo.Text = "del columns info";
     173      this.tabPreviewDeleteColumnsInfo.UseVisualStyleBackColor = true;
     174      //
     175      // lblPreviewColumnsInfo
     176      //
     177      this.lblPreviewColumnsInfo.AutoSize = true;
     178      this.lblPreviewColumnsInfo.Location = new System.Drawing.Point(3, 3);
     179      this.lblPreviewColumnsInfo.Name = "lblPreviewColumnsInfo";
     180      this.lblPreviewColumnsInfo.Size = new System.Drawing.Size(318, 13);
     181      this.lblPreviewColumnsInfo.TabIndex = 1;
     182      this.lblPreviewColumnsInfo.Text = "{0} columns with more than {1} % missing values would be deleted";
     183      //
     184      // tabPreviewDeleteColumnsVariance
     185      //
     186      this.tabPreviewDeleteColumnsVariance.Controls.Add(this.label12);
     187      this.tabPreviewDeleteColumnsVariance.Controls.Add(this.lblPreviewColumnsVariance);
     188      this.tabPreviewDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
     189      this.tabPreviewDeleteColumnsVariance.Name = "tabPreviewDeleteColumnsVariance";
     190      this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
     191      this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size(711, 142);
     192      this.tabPreviewDeleteColumnsVariance.TabIndex = 1;
     193      this.tabPreviewDeleteColumnsVariance.Text = "del columns variance";
     194      this.tabPreviewDeleteColumnsVariance.UseVisualStyleBackColor = true;
     195      //
     196      // label12
     197      //
     198      this.label12.AutoSize = true;
     199      this.label12.Location = new System.Drawing.Point(6, 22);
     200      this.label12.Name = "label12";
     201      this.label12.Size = new System.Drawing.Size(0, 13);
     202      this.label12.TabIndex = 2;
     203      //
     204      // lblPreviewColumnsVariance
     205      //
     206      this.lblPreviewColumnsVariance.AutoSize = true;
     207      this.lblPreviewColumnsVariance.Location = new System.Drawing.Point(3, 3);
     208      this.lblPreviewColumnsVariance.Name = "lblPreviewColumnsVariance";
     209      this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(301, 13);
     210      this.lblPreviewColumnsVariance.TabIndex = 2;
     211      this.lblPreviewColumnsVariance.Text = "{0} columns with a variance smaller than {1} would be deleted.";
     212      //
     213      // tabPreviewDeleteRowsInfo
     214      //
     215      this.tabPreviewDeleteRowsInfo.Controls.Add(this.lblPreviewRowsInfo);
     216      this.tabPreviewDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
     217      this.tabPreviewDeleteRowsInfo.Name = "tabPreviewDeleteRowsInfo";
     218      this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
     219      this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size(711, 142);
     220      this.tabPreviewDeleteRowsInfo.TabIndex = 2;
     221      this.tabPreviewDeleteRowsInfo.Text = "del rows info";
     222      this.tabPreviewDeleteRowsInfo.UseVisualStyleBackColor = true;
     223      //
     224      // lblPreviewRowsInfo
     225      //
     226      this.lblPreviewRowsInfo.AutoSize = true;
     227      this.lblPreviewRowsInfo.Location = new System.Drawing.Point(3, 3);
     228      this.lblPreviewRowsInfo.Name = "lblPreviewRowsInfo";
     229      this.lblPreviewRowsInfo.Size = new System.Drawing.Size(301, 13);
     230      this.lblPreviewRowsInfo.TabIndex = 2;
     231      this.lblPreviewRowsInfo.Text = "{0} rows with more than {1} % missing values would be deleted";
     232      //
     233      // tabPreviewReplaceMissingValues
     234      //
     235      this.tabPreviewReplaceMissingValues.Controls.Add(this.lblPreviewReplaceMissingValues);
     236      this.tabPreviewReplaceMissingValues.Location = new System.Drawing.Point(4, 22);
     237      this.tabPreviewReplaceMissingValues.Name = "tabPreviewReplaceMissingValues";
     238      this.tabPreviewReplaceMissingValues.Padding = new System.Windows.Forms.Padding(3);
     239      this.tabPreviewReplaceMissingValues.Size = new System.Drawing.Size(711, 142);
     240      this.tabPreviewReplaceMissingValues.TabIndex = 6;
     241      this.tabPreviewReplaceMissingValues.Text = "repl missing vals";
     242      this.tabPreviewReplaceMissingValues.UseVisualStyleBackColor = true;
     243      //
     244      // lblPreviewReplaceMissingValues
     245      //
     246      this.lblPreviewReplaceMissingValues.AutoSize = true;
     247      this.lblPreviewReplaceMissingValues.Location = new System.Drawing.Point(3, 3);
     248      this.lblPreviewReplaceMissingValues.Name = "lblPreviewReplaceMissingValues";
     249      this.lblPreviewReplaceMissingValues.Size = new System.Drawing.Size(343, 13);
     250      this.lblPreviewReplaceMissingValues.TabIndex = 3;
     251      this.lblPreviewReplaceMissingValues.Text = "{0} cells detected with missing values which would be replaced with {1}";
     252      //
     253      // tabPreviewShuffle
     254      //
     255      this.tabPreviewShuffle.Controls.Add(this.lblPreviewShuffle);
     256      this.tabPreviewShuffle.Location = new System.Drawing.Point(4, 22);
     257      this.tabPreviewShuffle.Name = "tabPreviewShuffle";
     258      this.tabPreviewShuffle.Padding = new System.Windows.Forms.Padding(3);
     259      this.tabPreviewShuffle.Size = new System.Drawing.Size(711, 142);
     260      this.tabPreviewShuffle.TabIndex = 4;
     261      this.tabPreviewShuffle.Text = "shuffle";
     262      this.tabPreviewShuffle.UseVisualStyleBackColor = true;
     263      //
     264      // lblPreviewShuffle
     265      //
     266      this.lblPreviewShuffle.AutoSize = true;
     267      this.lblPreviewShuffle.Location = new System.Drawing.Point(3, 3);
     268      this.lblPreviewShuffle.Name = "lblPreviewShuffle";
     269      this.lblPreviewShuffle.Size = new System.Drawing.Size(252, 13);
     270      this.lblPreviewShuffle.TabIndex = 0;
     271      this.lblPreviewShuffle.Text = "Data will be shuffled randomly - preview not possible";
     272      //
     273      // label9
     274      //
     275      this.label9.Location = new System.Drawing.Point(0, 0);
     276      this.label9.Name = "label9";
     277      this.label9.Size = new System.Drawing.Size(100, 23);
     278      this.label9.TabIndex = 0;
     279      //
     280      // tabDataShuffle
     281      //
     282      this.tabDataShuffle.Controls.Add(this.label6);
     283      this.tabDataShuffle.Location = new System.Drawing.Point(4, 22);
     284      this.tabDataShuffle.Name = "tabDataShuffle";
     285      this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(3);
     286      this.tabDataShuffle.Size = new System.Drawing.Size(711, 138);
     287      this.tabDataShuffle.TabIndex = 4;
     288      this.tabDataShuffle.Text = "shuffle";
     289      this.tabDataShuffle.UseVisualStyleBackColor = true;
     290      //
     291      // label6
     292      //
     293      this.label6.AutoSize = true;
     294      this.label6.Enabled = false;
     295      this.label6.Location = new System.Drawing.Point(3, 3);
     296      this.label6.Name = "label6";
     297      this.label6.Size = new System.Drawing.Size(115, 13);
     298      this.label6.TabIndex = 0;
     299      this.label6.Text = "No properties available";
     300      //
     301      // tabReplaceMissingValues
     302      //
     303      this.tabReplaceMissingValues.Controls.Add(this.txtReplaceValue);
     304      this.tabReplaceMissingValues.Controls.Add(this.cmbReplaceWith);
     305      this.tabReplaceMissingValues.Controls.Add(this.lblValueColon);
     306      this.tabReplaceMissingValues.Controls.Add(this.label10);
     307      this.tabReplaceMissingValues.Location = new System.Drawing.Point(4, 22);
     308      this.tabReplaceMissingValues.Name = "tabReplaceMissingValues";
     309      this.tabReplaceMissingValues.Padding = new System.Windows.Forms.Padding(3);
     310      this.tabReplaceMissingValues.Size = new System.Drawing.Size(711, 138);
     311      this.tabReplaceMissingValues.TabIndex = 6;
     312      this.tabReplaceMissingValues.Text = "repl missing vals";
     313      this.tabReplaceMissingValues.UseVisualStyleBackColor = true;
     314      //
     315      // label10
     316      //
     317      this.label10.AutoSize = true;
     318      this.label10.Location = new System.Drawing.Point(3, 3);
     319      this.label10.Name = "label10";
     320      this.label10.Size = new System.Drawing.Size(140, 13);
     321      this.label10.TabIndex = 0;
     322      this.label10.Text = "Replace missing values with";
     323      //
     324      // lblValueColon
     325      //
     326      this.lblValueColon.AutoSize = true;
     327      this.lblValueColon.Location = new System.Drawing.Point(271, 3);
     328      this.lblValueColon.Name = "lblValueColon";
     329      this.lblValueColon.Size = new System.Drawing.Size(10, 13);
     330      this.lblValueColon.TabIndex = 0;
     331      this.lblValueColon.Text = ":";
     332      //
     333      // cmbReplaceWith
     334      //
     335      this.cmbReplaceWith.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     336      this.cmbReplaceWith.FormattingEnabled = true;
     337      this.cmbReplaceWith.Items.AddRange(new object[] {
     338            "Value",
     339            "Average",
     340            "Median",
     341            "Most Common",
     342            "Random"});
     343      this.cmbReplaceWith.Location = new System.Drawing.Point(149, 0);
     344      this.cmbReplaceWith.Name = "cmbReplaceWith";
     345      this.cmbReplaceWith.Size = new System.Drawing.Size(121, 21);
     346      this.cmbReplaceWith.TabIndex = 1;
     347      this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
     348      //
     349      // txtReplaceValue
     350      //
     351      this.txtReplaceValue.Location = new System.Drawing.Point(287, 0);
     352      this.txtReplaceValue.Name = "txtReplaceValue";
     353      this.txtReplaceValue.Size = new System.Drawing.Size(100, 20);
     354      this.txtReplaceValue.TabIndex = 2;
     355      this.txtReplaceValue.TextChanged += new System.EventHandler(this.txtReplaceValue_TextChanged);
     356      //
     357      // tabDataDeleteRowsInfo
     358      //
     359      this.tabDataDeleteRowsInfo.Controls.Add(this.label3);
     360      this.tabDataDeleteRowsInfo.Controls.Add(this.txtDeleteRowsInfo);
     361      this.tabDataDeleteRowsInfo.Controls.Add(this.label5);
     362      this.tabDataDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
     363      this.tabDataDeleteRowsInfo.Name = "tabDataDeleteRowsInfo";
     364      this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
     365      this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(711, 138);
     366      this.tabDataDeleteRowsInfo.TabIndex = 2;
     367      this.tabDataDeleteRowsInfo.Text = "del rows info";
     368      this.tabDataDeleteRowsInfo.UseVisualStyleBackColor = true;
     369      //
     370      // label5
     371      //
     372      this.label5.AutoSize = true;
     373      this.label5.Location = new System.Drawing.Point(3, 3);
     374      this.label5.Name = "label5";
     375      this.label5.Size = new System.Drawing.Size(138, 13);
     376      this.label5.TabIndex = 6;
     377      this.label5.Text = "Delete rows with more than ";
     378      //
     379      // txtDeleteRowsInfo
     380      //
     381      this.txtDeleteRowsInfo.Location = new System.Drawing.Point(147, 0);
     382      this.txtDeleteRowsInfo.Name = "txtDeleteRowsInfo";
     383      this.txtDeleteRowsInfo.Size = new System.Drawing.Size(34, 20);
     384      this.txtDeleteRowsInfo.TabIndex = 7;
     385      this.txtDeleteRowsInfo.TextChanged += new System.EventHandler(this.txtDeleteRowsInfo_TextChanged);
     386      //
     387      // label3
     388      //
     389      this.label3.AutoSize = true;
     390      this.label3.Location = new System.Drawing.Point(189, 3);
     391      this.label3.Name = "label3";
     392      this.label3.Size = new System.Drawing.Size(89, 13);
     393      this.label3.TabIndex = 8;
     394      this.label3.Text = "% missing values.";
     395      //
     396      // tabDataDeleteColumnsVariance
     397      //
     398      this.tabDataDeleteColumnsVariance.Controls.Add(this.txtDeleteColumnsVariance);
     399      this.tabDataDeleteColumnsVariance.Controls.Add(this.label4);
     400      this.tabDataDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
     401      this.tabDataDeleteColumnsVariance.Name = "tabDataDeleteColumnsVariance";
     402      this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
     403      this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(711, 138);
     404      this.tabDataDeleteColumnsVariance.TabIndex = 1;
     405      this.tabDataDeleteColumnsVariance.Text = "del columns variance";
     406      this.tabDataDeleteColumnsVariance.UseVisualStyleBackColor = true;
     407      //
     408      // label4
     409      //
     410      this.label4.AutoSize = true;
     411      this.label4.Location = new System.Drawing.Point(3, 3);
     412      this.label4.Name = "label4";
     413      this.label4.Size = new System.Drawing.Size(220, 13);
     414      this.label4.TabIndex = 3;
     415      this.label4.Text = "Delete columns with a variance smaller than  ";
     416      //
     417      // txtDeleteColumnsVariance
     418      //
     419      this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(229, 0);
     420      this.txtDeleteColumnsVariance.Name = "txtDeleteColumnsVariance";
     421      this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(135, 20);
     422      this.txtDeleteColumnsVariance.TabIndex = 4;
     423      this.txtDeleteColumnsVariance.TextChanged += new System.EventHandler(this.txtDeleteColumnsVariance_TextChanged);
    149424      //
    150425      // tabDataDeleteColumnsInformation
     
    161436      this.tabDataDeleteColumnsInformation.UseVisualStyleBackColor = true;
    162437      //
     438      // label1
     439      //
     440      this.label1.AutoSize = true;
     441      this.label1.Location = new System.Drawing.Point(3, 3);
     442      this.label1.Name = "label1";
     443      this.label1.Size = new System.Drawing.Size(155, 13);
     444      this.label1.TabIndex = 3;
     445      this.label1.Text = "Delete columns with more than ";
     446      //
     447      // txtDeleteColumnsInfo
     448      //
     449      this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(164, 0);
     450      this.txtDeleteColumnsInfo.Name = "txtDeleteColumnsInfo";
     451      this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(34, 20);
     452      this.txtDeleteColumnsInfo.TabIndex = 4;
     453      this.txtDeleteColumnsInfo.TextChanged += new System.EventHandler(this.txtDeleteColumnsInfo_TextChanged);
     454      //
    163455      // label2
    164456      //
     
    170462      this.label2.Text = "% missing values.";
    171463      //
    172       // txtDeleteColumnsInfo
    173       //
    174       this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(164, 0);
    175       this.txtDeleteColumnsInfo.Name = "txtDeleteColumnsInfo";
    176       this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(34, 20);
    177       this.txtDeleteColumnsInfo.TabIndex = 4;
    178       this.txtDeleteColumnsInfo.TextChanged += new System.EventHandler(this.txtDeleteColumnsInfo_TextChanged);
    179       //
    180       // label1
    181       //
    182       this.label1.AutoSize = true;
    183       this.label1.Location = new System.Drawing.Point(3, 3);
    184       this.label1.Name = "label1";
    185       this.label1.Size = new System.Drawing.Size(155, 13);
    186       this.label1.TabIndex = 3;
    187       this.label1.Text = "Delete columns with more than ";
    188       //
    189       // tabDataDeleteColumnsVariance
    190       //
    191       this.tabDataDeleteColumnsVariance.Controls.Add(this.txtDeleteColumnsVariance);
    192       this.tabDataDeleteColumnsVariance.Controls.Add(this.label4);
    193       this.tabDataDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
    194       this.tabDataDeleteColumnsVariance.Name = "tabDataDeleteColumnsVariance";
    195       this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
    196       this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(711, 138);
    197       this.tabDataDeleteColumnsVariance.TabIndex = 1;
    198       this.tabDataDeleteColumnsVariance.Text = "del columns variance";
    199       this.tabDataDeleteColumnsVariance.UseVisualStyleBackColor = true;
    200       //
    201       // txtDeleteColumnsVariance
    202       //
    203       this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(229, 0);
    204       this.txtDeleteColumnsVariance.Name = "txtDeleteColumnsVariance";
    205       this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(135, 20);
    206       this.txtDeleteColumnsVariance.TabIndex = 4;
    207       this.txtDeleteColumnsVariance.TextChanged += new System.EventHandler(this.txtDeleteColumnsVariance_TextChanged);
    208       //
    209       // label4
    210       //
    211       this.label4.AutoSize = true;
    212       this.label4.Location = new System.Drawing.Point(3, 3);
    213       this.label4.Name = "label4";
    214       this.label4.Size = new System.Drawing.Size(220, 13);
    215       this.label4.TabIndex = 3;
    216       this.label4.Text = "Delete columns with a variance smaller than  ";
    217       //
    218       // tabDataDeleteRowsInfo
    219       //
    220       this.tabDataDeleteRowsInfo.Controls.Add(this.label3);
    221       this.tabDataDeleteRowsInfo.Controls.Add(this.txtDeleteRowsInfo);
    222       this.tabDataDeleteRowsInfo.Controls.Add(this.label5);
    223       this.tabDataDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
    224       this.tabDataDeleteRowsInfo.Name = "tabDataDeleteRowsInfo";
    225       this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
    226       this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(711, 138);
    227       this.tabDataDeleteRowsInfo.TabIndex = 2;
    228       this.tabDataDeleteRowsInfo.Text = "del rows info";
    229       this.tabDataDeleteRowsInfo.UseVisualStyleBackColor = true;
    230       //
    231       // label3
    232       //
    233       this.label3.AutoSize = true;
    234       this.label3.Location = new System.Drawing.Point(189, 3);
    235       this.label3.Name = "label3";
    236       this.label3.Size = new System.Drawing.Size(89, 13);
    237       this.label3.TabIndex = 8;
    238       this.label3.Text = "% missing values.";
    239       //
    240       // txtDeleteRowsInfo
    241       //
    242       this.txtDeleteRowsInfo.Location = new System.Drawing.Point(147, 0);
    243       this.txtDeleteRowsInfo.Name = "txtDeleteRowsInfo";
    244       this.txtDeleteRowsInfo.Size = new System.Drawing.Size(34, 20);
    245       this.txtDeleteRowsInfo.TabIndex = 7;
    246       this.txtDeleteRowsInfo.TextChanged += new System.EventHandler(this.txtDeleteRowsInfo_TextChanged);
    247       //
    248       // label5
    249       //
    250       this.label5.AutoSize = true;
    251       this.label5.Location = new System.Drawing.Point(3, 3);
    252       this.label5.Name = "label5";
    253       this.label5.Size = new System.Drawing.Size(138, 13);
    254       this.label5.TabIndex = 6;
    255       this.label5.Text = "Delete rows with more than ";
    256       //
    257       // tabDataShuffle
    258       //
    259       this.tabDataShuffle.Controls.Add(this.label6);
    260       this.tabDataShuffle.Location = new System.Drawing.Point(4, 22);
    261       this.tabDataShuffle.Name = "tabDataShuffle";
    262       this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(3);
    263       this.tabDataShuffle.Size = new System.Drawing.Size(711, 138);
    264       this.tabDataShuffle.TabIndex = 4;
    265       this.tabDataShuffle.Text = "shuffle";
    266       this.tabDataShuffle.UseVisualStyleBackColor = true;
    267       //
    268       // label6
    269       //
    270       this.label6.AutoSize = true;
    271       this.label6.Enabled = false;
    272       this.label6.Location = new System.Drawing.Point(3, 3);
    273       this.label6.Name = "label6";
    274       this.label6.Size = new System.Drawing.Size(115, 13);
    275       this.label6.TabIndex = 0;
    276       this.label6.Text = "No properties available";
    277       //
    278       // grpBoxPreview
    279       //
    280       this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    281             | System.Windows.Forms.AnchorStyles.Left)
     464      // tabPage1
     465      //
     466      this.tabPage1.Controls.Add(this.label7);
     467      this.tabPage1.Location = new System.Drawing.Point(4, 22);
     468      this.tabPage1.Name = "tabPage1";
     469      this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
     470      this.tabPage1.Size = new System.Drawing.Size(711, 138);
     471      this.tabPage1.TabIndex = 5;
     472      this.tabPage1.Text = "tabDataInactive";
     473      this.tabPage1.UseVisualStyleBackColor = true;
     474      //
     475      // label7
     476      //
     477      this.label7.AutoSize = true;
     478      this.label7.Enabled = false;
     479      this.label7.Location = new System.Drawing.Point(3, 3);
     480      this.label7.Name = "label7";
     481      this.label7.Size = new System.Drawing.Size(259, 13);
     482      this.label7.TabIndex = 1;
     483      this.label7.Text = "Please select one of the manipulation methods above";
     484      //
     485      // tabsData
     486      //
     487      this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    282488            | System.Windows.Forms.AnchorStyles.Right)));
    283       this.grpBoxPreview.Controls.Add(this.tabsPreview);
    284       this.grpBoxPreview.Location = new System.Drawing.Point(4, 301);
    285       this.grpBoxPreview.Name = "grpBoxPreview";
    286       this.grpBoxPreview.Size = new System.Drawing.Size(732, 193);
    287       this.grpBoxPreview.TabIndex = 4;
    288       this.grpBoxPreview.TabStop = false;
    289       this.grpBoxPreview.Text = "Preview";
    290       //
    291       // tabsPreview
    292       //
    293       this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    294             | System.Windows.Forms.AnchorStyles.Right)));
    295       this.tabsPreview.Controls.Add(this.tabPreviewInactive);
    296       this.tabsPreview.Controls.Add(this.tabPreviewDeleteColumnsInfo);
    297       this.tabsPreview.Controls.Add(this.tabPreviewDeleteColumnsVariance);
    298       this.tabsPreview.Controls.Add(this.tabPreviewDeleteRowsInfo);
    299       this.tabsPreview.Controls.Add(this.tabPreviewShuffle);
    300       this.tabsPreview.ItemSize = new System.Drawing.Size(58, 18);
    301       this.tabsPreview.Location = new System.Drawing.Point(6, 19);
    302       this.tabsPreview.Name = "tabsPreview";
    303       this.tabsPreview.SelectedIndex = 0;
    304       this.tabsPreview.Size = new System.Drawing.Size(719, 168);
    305       this.tabsPreview.TabIndex = 3;
    306       //
    307       // tabPreviewInactive
    308       //
    309       this.tabPreviewInactive.Location = new System.Drawing.Point(4, 22);
    310       this.tabPreviewInactive.Name = "tabPreviewInactive";
    311       this.tabPreviewInactive.Padding = new System.Windows.Forms.Padding(3);
    312       this.tabPreviewInactive.Size = new System.Drawing.Size(711, 142);
    313       this.tabPreviewInactive.TabIndex = 5;
    314       this.tabPreviewInactive.Text = "inactive";
    315       this.tabPreviewInactive.UseVisualStyleBackColor = true;
    316       //
    317       // tabPreviewDeleteColumnsInfo
    318       //
    319       this.tabPreviewDeleteColumnsInfo.Controls.Add(this.lblPreviewColumnsInfo);
    320       this.tabPreviewDeleteColumnsInfo.Location = new System.Drawing.Point(4, 22);
    321       this.tabPreviewDeleteColumnsInfo.Name = "tabPreviewDeleteColumnsInfo";
    322       this.tabPreviewDeleteColumnsInfo.Padding = new System.Windows.Forms.Padding(3);
    323       this.tabPreviewDeleteColumnsInfo.Size = new System.Drawing.Size(711, 142);
    324       this.tabPreviewDeleteColumnsInfo.TabIndex = 0;
    325       this.tabPreviewDeleteColumnsInfo.Text = "del columns info";
    326       this.tabPreviewDeleteColumnsInfo.UseVisualStyleBackColor = true;
    327       //
    328       // lblPreviewColumnsInfo
    329       //
    330       this.lblPreviewColumnsInfo.AutoSize = true;
    331       this.lblPreviewColumnsInfo.Location = new System.Drawing.Point(3, 3);
    332       this.lblPreviewColumnsInfo.Name = "lblPreviewColumnsInfo";
    333       this.lblPreviewColumnsInfo.Size = new System.Drawing.Size(318, 13);
    334       this.lblPreviewColumnsInfo.TabIndex = 1;
    335       this.lblPreviewColumnsInfo.Text = "{0} columns with more than {1} % missing values would be deleted";
    336       //
    337       // tabPreviewDeleteColumnsVariance
    338       //
    339       this.tabPreviewDeleteColumnsVariance.Controls.Add(this.label12);
    340       this.tabPreviewDeleteColumnsVariance.Controls.Add(this.lblPreviewColumnsVariance);
    341       this.tabPreviewDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
    342       this.tabPreviewDeleteColumnsVariance.Name = "tabPreviewDeleteColumnsVariance";
    343       this.tabPreviewDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
    344       this.tabPreviewDeleteColumnsVariance.Size = new System.Drawing.Size(711, 142);
    345       this.tabPreviewDeleteColumnsVariance.TabIndex = 1;
    346       this.tabPreviewDeleteColumnsVariance.Text = "del columns variance";
    347       this.tabPreviewDeleteColumnsVariance.UseVisualStyleBackColor = true;
    348       //
    349       // label12
    350       //
    351       this.label12.AutoSize = true;
    352       this.label12.Location = new System.Drawing.Point(6, 22);
    353       this.label12.Name = "label12";
    354       this.label12.Size = new System.Drawing.Size(0, 13);
    355       this.label12.TabIndex = 2;
    356       //
    357       // lblPreviewColumnsVariance
    358       //
    359       this.lblPreviewColumnsVariance.AutoSize = true;
    360       this.lblPreviewColumnsVariance.Location = new System.Drawing.Point(3, 3);
    361       this.lblPreviewColumnsVariance.Name = "lblPreviewColumnsVariance";
    362       this.lblPreviewColumnsVariance.Size = new System.Drawing.Size(301, 13);
    363       this.lblPreviewColumnsVariance.TabIndex = 2;
    364       this.lblPreviewColumnsVariance.Text = "{0} columns with a variance smaller than {1} would be deleted.";
    365       //
    366       // tabPreviewDeleteRowsInfo
    367       //
    368       this.tabPreviewDeleteRowsInfo.Controls.Add(this.lblPreviewRowsInfo);
    369       this.tabPreviewDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
    370       this.tabPreviewDeleteRowsInfo.Name = "tabPreviewDeleteRowsInfo";
    371       this.tabPreviewDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
    372       this.tabPreviewDeleteRowsInfo.Size = new System.Drawing.Size(711, 142);
    373       this.tabPreviewDeleteRowsInfo.TabIndex = 2;
    374       this.tabPreviewDeleteRowsInfo.Text = "del rows info";
    375       this.tabPreviewDeleteRowsInfo.UseVisualStyleBackColor = true;
    376       //
    377       // lblPreviewRowsInfo
    378       //
    379       this.lblPreviewRowsInfo.AutoSize = true;
    380       this.lblPreviewRowsInfo.Location = new System.Drawing.Point(3, 3);
    381       this.lblPreviewRowsInfo.Name = "lblPreviewRowsInfo";
    382       this.lblPreviewRowsInfo.Size = new System.Drawing.Size(301, 13);
    383       this.lblPreviewRowsInfo.TabIndex = 2;
    384       this.lblPreviewRowsInfo.Text = "{0} rows with more than {1} % missing values would be deleted";
    385       //
    386       // tabPreviewShuffle
    387       //
    388       this.tabPreviewShuffle.Controls.Add(this.lblPreviewShuffle);
    389       this.tabPreviewShuffle.Location = new System.Drawing.Point(4, 22);
    390       this.tabPreviewShuffle.Name = "tabPreviewShuffle";
    391       this.tabPreviewShuffle.Padding = new System.Windows.Forms.Padding(3);
    392       this.tabPreviewShuffle.Size = new System.Drawing.Size(711, 142);
    393       this.tabPreviewShuffle.TabIndex = 4;
    394       this.tabPreviewShuffle.Text = "shuffle";
    395       this.tabPreviewShuffle.UseVisualStyleBackColor = true;
    396       //
    397       // lblPreviewShuffle
    398       //
    399       this.lblPreviewShuffle.AutoSize = true;
    400       this.lblPreviewShuffle.Location = new System.Drawing.Point(3, 3);
    401       this.lblPreviewShuffle.Name = "lblPreviewShuffle";
    402       this.lblPreviewShuffle.Size = new System.Drawing.Size(252, 13);
    403       this.lblPreviewShuffle.TabIndex = 0;
    404       this.lblPreviewShuffle.Text = "Data will be shuffled randomly - preview not possible";
     489      this.tabsData.Controls.Add(this.tabPage1);
     490      this.tabsData.Controls.Add(this.tabDataDeleteColumnsInformation);
     491      this.tabsData.Controls.Add(this.tabDataDeleteColumnsVariance);
     492      this.tabsData.Controls.Add(this.tabDataDeleteRowsInfo);
     493      this.tabsData.Controls.Add(this.tabReplaceMissingValues);
     494      this.tabsData.Controls.Add(this.tabDataShuffle);
     495      this.tabsData.ItemSize = new System.Drawing.Size(58, 18);
     496      this.tabsData.Location = new System.Drawing.Point(6, 19);
     497      this.tabsData.Name = "tabsData";
     498      this.tabsData.SelectedIndex = 0;
     499      this.tabsData.Size = new System.Drawing.Size(719, 164);
     500      this.tabsData.TabIndex = 3;
    405501      //
    406502      // ManipulationView
     
    415511      this.Size = new System.Drawing.Size(739, 529);
    416512      this.grpBoxData.ResumeLayout(false);
    417       this.tabsData.ResumeLayout(false);
    418       this.tabPage1.ResumeLayout(false);
    419       this.tabPage1.PerformLayout();
    420       this.tabDataDeleteColumnsInformation.ResumeLayout(false);
    421       this.tabDataDeleteColumnsInformation.PerformLayout();
    422       this.tabDataDeleteColumnsVariance.ResumeLayout(false);
    423       this.tabDataDeleteColumnsVariance.PerformLayout();
    424       this.tabDataDeleteRowsInfo.ResumeLayout(false);
    425       this.tabDataDeleteRowsInfo.PerformLayout();
    426       this.tabDataShuffle.ResumeLayout(false);
    427       this.tabDataShuffle.PerformLayout();
    428513      this.grpBoxPreview.ResumeLayout(false);
    429514      this.tabsPreview.ResumeLayout(false);
     
    434519      this.tabPreviewDeleteRowsInfo.ResumeLayout(false);
    435520      this.tabPreviewDeleteRowsInfo.PerformLayout();
     521      this.tabPreviewReplaceMissingValues.ResumeLayout(false);
     522      this.tabPreviewReplaceMissingValues.PerformLayout();
    436523      this.tabPreviewShuffle.ResumeLayout(false);
    437524      this.tabPreviewShuffle.PerformLayout();
     525      this.tabDataShuffle.ResumeLayout(false);
     526      this.tabDataShuffle.PerformLayout();
     527      this.tabReplaceMissingValues.ResumeLayout(false);
     528      this.tabReplaceMissingValues.PerformLayout();
     529      this.tabDataDeleteRowsInfo.ResumeLayout(false);
     530      this.tabDataDeleteRowsInfo.PerformLayout();
     531      this.tabDataDeleteColumnsVariance.ResumeLayout(false);
     532      this.tabDataDeleteColumnsVariance.PerformLayout();
     533      this.tabDataDeleteColumnsInformation.ResumeLayout(false);
     534      this.tabDataDeleteColumnsInformation.PerformLayout();
     535      this.tabPage1.ResumeLayout(false);
     536      this.tabPage1.PerformLayout();
     537      this.tabsData.ResumeLayout(false);
    438538      this.ResumeLayout(false);
    439539
     
    451551    private System.Windows.Forms.TabPage tabPreviewDeleteRowsInfo;
    452552    private System.Windows.Forms.TabPage tabPreviewShuffle;
     553    private System.Windows.Forms.Label lblPreviewShuffle;
     554    private System.Windows.Forms.TabPage tabPreviewInactive;
     555    private System.Windows.Forms.Label lblPreviewColumnsInfo;
     556    private System.Windows.Forms.Label label12;
     557    private System.Windows.Forms.Label lblPreviewColumnsVariance;
     558    private System.Windows.Forms.Label lblPreviewRowsInfo;
     559    private System.Windows.Forms.TabPage tabPreviewReplaceMissingValues;
     560    private System.Windows.Forms.Label lblPreviewReplaceMissingValues;
     561    private System.Windows.Forms.Label label9;
    453562    private System.Windows.Forms.TabControl tabsData;
     563    private System.Windows.Forms.TabPage tabPage1;
     564    private System.Windows.Forms.Label label7;
    454565    private System.Windows.Forms.TabPage tabDataDeleteColumnsInformation;
    455566    private System.Windows.Forms.Label label2;
     
    463574    private System.Windows.Forms.TextBox txtDeleteRowsInfo;
    464575    private System.Windows.Forms.Label label5;
     576    private System.Windows.Forms.TabPage tabReplaceMissingValues;
     577    private System.Windows.Forms.TextBox txtReplaceValue;
     578    private System.Windows.Forms.ComboBox cmbReplaceWith;
     579    private System.Windows.Forms.Label lblValueColon;
     580    private System.Windows.Forms.Label label10;
    465581    private System.Windows.Forms.TabPage tabDataShuffle;
    466582    private System.Windows.Forms.Label label6;
    467     private System.Windows.Forms.TabPage tabPage1;
    468     private System.Windows.Forms.Label label7;
    469     private System.Windows.Forms.Label lblPreviewShuffle;
    470     private System.Windows.Forms.TabPage tabPreviewInactive;
    471     private System.Windows.Forms.Label lblPreviewColumnsInfo;
    472     private System.Windows.Forms.Label label12;
    473     private System.Windows.Forms.Label lblPreviewColumnsVariance;
    474     private System.Windows.Forms.Label lblPreviewRowsInfo;
    475583  }
    476584}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.cs

    r10737 r10776  
    3737    public ManipulationView() {
    3838      InitializeComponent();
     39      cmbReplaceWith.SelectedIndex = 0;
    3940      tabsData.Appearance = TabAppearance.FlatButtons;
    4041      tabsData.ItemSize = new Size(0, 1);
     
    4849        ()=>validateDeleteColumnsVariance(),
    4950        ()=>validateDeleteRowsInfo(),
     51        ()=>validateReplaceWith(),
    5052        ()=>{btnApply.Enabled = true; lblPreviewShuffle.Text = "Data will be shuffled randomly - preview not possible";} //shuffle
    5153      };
     
    5557        ()=>Content.ManipulationLogic.DeleteColumnsWithVarianceSmaller(getDeleteColumnsVariance()),
    5658        ()=>Content.ManipulationLogic.DeleteRowsWithMissingValuesGreater(getRowsColumnsInfo()),
     59        ()=>replaceMissingValues(),
    5760        ()=>Content.ManipulationLogic.ShuffleWithRanges()
    5861      };
     
    8184    }
    8285
     86    private void replaceMissingValues() {
     87      var cells = Content.SearchLogic.GetMissingValueIndices();
     88      switch (cmbReplaceWith.SelectedIndex) {
     89        case 0: //Value
     90          Content.ManipulationLogic.ReplaceIndicesByValue(cells, txtReplaceValue.Text);
     91          break;
     92        case 1: //Average
     93          Content.ManipulationLogic.ReplaceIndicesByAverageValue(cells);
     94          break;
     95        case 2: //Median
     96          Content.ManipulationLogic.ReplaceIndicesByMedianValue(cells);
     97          break;
     98        case 3: //Most Common
     99          Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(cells);
     100          break;
     101        case 4: //Random
     102          Content.ManipulationLogic.ReplaceIndicesByRandomValue(cells);
     103          break;
     104      }
     105    }
     106
    83107    private void validateDeleteColumnsInfo() {
    84108      validateDoubleTextBox(txtDeleteColumnsInfo.Text);
     
    123147      } else {
    124148        lblPreviewRowsInfo.Text = "Preview not possible yet - please input the limit above.";
     149      }
     150    }
     151
     152    private void validateReplaceWith() {
     153      btnApply.Enabled = false;
     154      string replaceValue = cmbReplaceWith.SelectedText;
     155      if (cmbReplaceWith.SelectedIndex == 0) {
     156        btnApply.Enabled = !string.IsNullOrEmpty(txtReplaceValue.Text);
     157        replaceValue = @"\"+ txtReplaceValue.Text + @"\";
     158      } else {
     159        btnApply.Enabled = true;
     160      }
     161      if (btnApply.Enabled) {
     162        int count = Content.SearchLogic.GetMissingValueIndices().Count;
     163        lblPreviewReplaceMissingValues.Text = count + " cell" + (count > 1 || count == 0 ? "s" : "")
     164          + " were detected with missing values which would be replaced with " + replaceValue;
     165        if (count > 0) {
     166          lblPreviewReplaceMissingValues.Text += Environment.NewLine + Environment.NewLine + "Please press the button \"Apply Manipulation\" if you wish to perform the replacement.";
     167        } else {
     168          btnApply.Enabled = false;
     169        }
     170      } else {
     171        lblPreviewReplaceMissingValues.Text = "Preview not possible yet - please input the text which will be used as replacement.";
    125172      }
    126173    }
     
    132179
    133180    private void lstMethods_SelectedIndexChanged(object sender, System.EventArgs e) {
    134 
    135181      int index = lstMethods.SelectedIndex;
    136182      tabsData.SelectedIndex = index + 1;
     
    198244      }
    199245    }
     246
     247    private void cmbReplaceWith_SelectedIndexChanged(object sender, EventArgs e) {
     248      bool isReplaceWithValueSelected = cmbReplaceWith.SelectedIndex == 0;
     249      lblValueColon.Visible = isReplaceWithValueSelected;
     250      txtReplaceValue.Visible = isReplaceWithValueSelected;
     251      validateReplaceWith();
     252    }
     253
     254    private void txtReplaceValue_TextChanged(object sender, EventArgs e) {
     255      validateReplaceWith();
     256    }
    200257  }
    201258}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationContent.cs

    r10709 r10776  
    3030
    3131    private IManipulationLogic manipulationLogic;
     32    private ISearchLogic searchLogic;
    3233
    33     public ManipulationContent(IManipulationLogic theManipulationLogic) {
     34    public ManipulationContent(IManipulationLogic theManipulationLogic, ISearchLogic theSearchLogic) {
    3435      manipulationLogic = theManipulationLogic;
     36      searchLogic = theSearchLogic;
    3537    }
    3638
     
    4749    }
    4850
     51    public ISearchLogic SearchLogic {
     52      get {
     53        return searchLogic;
     54      }
     55    }
    4956
    5057    public static new Image StaticItemImage {
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/SearchLogic.cs

    r10737 r10776  
    2929    private readonly ITransactionalPreprocessingData preprocessingData;
    3030
    31     private Dictionary<int, IEnumerable<int>> MissingValueIndicies { get; set; }
     31    private Dictionary<int, IList<int>> MissingValueIndicies { get; set; }
    3232    private Dictionary<int, IEnumerable> ValuesWithoutNaN { get; set; }
    3333
     
    3535      preprocessingData = thePreprocessingData;
    3636
    37       MissingValueIndicies = new Dictionary<int, IEnumerable<int>>();
     37      MissingValueIndicies = new Dictionary<int, IList<int>>();
    3838      ValuesWithoutNaN = new Dictionary<int, IEnumerable>();
    3939
     
    5757        case DataPreprocessingChangedEventType.Any:
    5858        case DataPreprocessingChangedEventType.Transformation:
    59           MissingValueIndicies = new Dictionary<int, IEnumerable<int>>();
     59          MissingValueIndicies = new Dictionary<int, IList<int>>();
    6060          ValuesWithoutNaN = new Dictionary<int, IEnumerable>();
    6161          break;
     
    6363    }
    6464
    65     public IDictionary<string, IEnumerable<int>> GetMissingValueIndices() {
    66       var dic = new Dictionary<string, IEnumerable<int>>();
    67       foreach (string variableName in preprocessingData.VariableNames) {
    68         dic.Add(variableName, GetMissingValueIndices(preprocessingData.GetColumnIndex(variableName)));
     65    public IDictionary<int, IList<int>> GetMissingValueIndices() {
     66      var dic = new Dictionary<int, IList<int>>();
     67      for (int i = 0; i < preprocessingData.Columns; ++i) {
     68        dic.Add(i, GetMissingValueIndices(i));
    6969      }
    7070      return dic;
     
    8383    }
    8484
    85     public IEnumerable<int> GetMissingValueIndices(int columnIndex) {
     85    public IList<int> GetMissingValueIndices(int columnIndex) {
    8686      if (!MissingValueIndicies.ContainsKey(columnIndex)){       
    8787          if (preprocessingData.IsType<double>(columnIndex)) {
     
    9898      return MissingValueIndicies[columnIndex];
    9999   }
    100     private IEnumerable<int> GetMissingValueIndices<T>(int columnIndex) {
     100    private IList<int> GetMissingValueIndices<T>(int columnIndex) {
    101101      List<int> missingIndices = new List<int>();
    102102     
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/ISearchLogic.cs

    r10661 r10776  
    2626    /// <summary>
    2727    /// Return the indices of the missing values where the key
    28     /// correspdonds to the variable name and the values to the row indices
     28    /// correspdonds to the columbn index and the values to the row indices
    2929    /// </summary>
    3030    /// <returns></returns>
    31     IDictionary<string, IEnumerable<int>> GetMissingValueIndices();
     31    IDictionary<int, IList<int>> GetMissingValueIndices();
    3232
    3333    /// <summary>
     
    3535    /// </summary>
    3636    /// <returns></returns>
    37     IEnumerable<int> GetMissingValueIndices(int columnIndex);
     37    IList<int> GetMissingValueIndices(int columnIndex);
    3838
    3939    bool IsMissingValue(int columnIndex, int rowIndex);
Note: See TracChangeset for help on using the changeset viewer.