Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/28/14 14:37:39 (10 years ago)
Author:
rstoll
Message:
  • Manipulation View

missing values per column
validating per column
success message for missing values was missing

Location:
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
Files:
3 edited

Legend:

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

    r10904 r10905  
    5858          new FilterContent(filterLogic),
    5959          new TransformationContent(data),
    60           new ManipulationContent(manipulationLogic, searchLogic),
     60          new ManipulationContent(manipulationLogic, searchLogic, dataGridLogic),
    6161          new LineChartContent(chartLogic),
    6262          new HistogramContent(chartLogic),
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.Designer.cs

    r10776 r10905  
    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.tabReplaceMissingValues = new System.Windows.Forms.TabPage();
     44      this.txtReplaceValue = new System.Windows.Forms.TextBox();
     45      this.cmbVariableNames = new System.Windows.Forms.ComboBox();
     46      this.cmbReplaceWith = new System.Windows.Forms.ComboBox();
     47      this.lblValueColon = new System.Windows.Forms.Label();
     48      this.label8 = new System.Windows.Forms.Label();
     49      this.label10 = new System.Windows.Forms.Label();
     50      this.tabDataShuffle = new System.Windows.Forms.TabPage();
     51      this.label6 = new System.Windows.Forms.Label();
    2952      this.grpBoxPreview = new System.Windows.Forms.GroupBox();
    3053      this.tabsPreview = new System.Windows.Forms.TabControl();
     
    4265      this.lblPreviewShuffle = new System.Windows.Forms.Label();
    4366      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();
    6567      this.grpBoxData.SuspendLayout();
     68      this.tabsData.SuspendLayout();
     69      this.tabPage1.SuspendLayout();
     70      this.tabDataDeleteColumnsInformation.SuspendLayout();
     71      this.tabDataDeleteColumnsVariance.SuspendLayout();
     72      this.tabDataDeleteRowsInfo.SuspendLayout();
     73      this.tabReplaceMissingValues.SuspendLayout();
     74      this.tabDataShuffle.SuspendLayout();
    6675      this.grpBoxPreview.SuspendLayout();
    6776      this.tabsPreview.SuspendLayout();
     
    7180      this.tabPreviewReplaceMissingValues.SuspendLayout();
    7281      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();
    8082      this.SuspendLayout();
    8183      //
    8284      // lstMethods
    8385      //
    84       this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     86      this.lstMethods.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    8587            | System.Windows.Forms.AnchorStyles.Right)));
    8688      this.lstMethods.FormattingEnabled = true;
     
    112114      // grpBoxData
    113115      //
    114       this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     116      this.grpBoxData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    115117            | System.Windows.Forms.AnchorStyles.Right)));
    116118      this.grpBoxData.Controls.Add(this.tabsData);
     
    122124      this.grpBoxData.Text = "Properties";
    123125      //
     126      // tabsData
     127      //
     128      this.tabsData.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     129            | System.Windows.Forms.AnchorStyles.Right)));
     130      this.tabsData.Controls.Add(this.tabPage1);
     131      this.tabsData.Controls.Add(this.tabDataDeleteColumnsInformation);
     132      this.tabsData.Controls.Add(this.tabDataDeleteColumnsVariance);
     133      this.tabsData.Controls.Add(this.tabDataDeleteRowsInfo);
     134      this.tabsData.Controls.Add(this.tabReplaceMissingValues);
     135      this.tabsData.Controls.Add(this.tabDataShuffle);
     136      this.tabsData.ItemSize = new System.Drawing.Size(58, 18);
     137      this.tabsData.Location = new System.Drawing.Point(6, 19);
     138      this.tabsData.Name = "tabsData";
     139      this.tabsData.SelectedIndex = 0;
     140      this.tabsData.Size = new System.Drawing.Size(719, 164);
     141      this.tabsData.TabIndex = 3;
     142      //
     143      // tabPage1
     144      //
     145      this.tabPage1.Controls.Add(this.label7);
     146      this.tabPage1.Location = new System.Drawing.Point(4, 22);
     147      this.tabPage1.Name = "tabPage1";
     148      this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
     149      this.tabPage1.Size = new System.Drawing.Size(711, 138);
     150      this.tabPage1.TabIndex = 5;
     151      this.tabPage1.Text = "tabDataInactive";
     152      this.tabPage1.UseVisualStyleBackColor = true;
     153      //
     154      // label7
     155      //
     156      this.label7.AutoSize = true;
     157      this.label7.Enabled = false;
     158      this.label7.Location = new System.Drawing.Point(3, 3);
     159      this.label7.Name = "label7";
     160      this.label7.Size = new System.Drawing.Size(259, 13);
     161      this.label7.TabIndex = 1;
     162      this.label7.Text = "Please select one of the manipulation methods above";
     163      //
     164      // tabDataDeleteColumnsInformation
     165      //
     166      this.tabDataDeleteColumnsInformation.Controls.Add(this.label2);
     167      this.tabDataDeleteColumnsInformation.Controls.Add(this.txtDeleteColumnsInfo);
     168      this.tabDataDeleteColumnsInformation.Controls.Add(this.label1);
     169      this.tabDataDeleteColumnsInformation.Location = new System.Drawing.Point(4, 22);
     170      this.tabDataDeleteColumnsInformation.Name = "tabDataDeleteColumnsInformation";
     171      this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding(3);
     172      this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size(711, 138);
     173      this.tabDataDeleteColumnsInformation.TabIndex = 0;
     174      this.tabDataDeleteColumnsInformation.Text = "del columns info";
     175      this.tabDataDeleteColumnsInformation.UseVisualStyleBackColor = true;
     176      //
     177      // label2
     178      //
     179      this.label2.AutoSize = true;
     180      this.label2.Location = new System.Drawing.Point(204, 3);
     181      this.label2.Name = "label2";
     182      this.label2.Size = new System.Drawing.Size(89, 13);
     183      this.label2.TabIndex = 5;
     184      this.label2.Text = "% missing values.";
     185      //
     186      // txtDeleteColumnsInfo
     187      //
     188      this.txtDeleteColumnsInfo.Location = new System.Drawing.Point(164, 0);
     189      this.txtDeleteColumnsInfo.Name = "txtDeleteColumnsInfo";
     190      this.txtDeleteColumnsInfo.Size = new System.Drawing.Size(34, 20);
     191      this.txtDeleteColumnsInfo.TabIndex = 4;
     192      this.txtDeleteColumnsInfo.TextChanged += new System.EventHandler(this.txtDeleteColumnsInfo_TextChanged);
     193      //
     194      // label1
     195      //
     196      this.label1.AutoSize = true;
     197      this.label1.Location = new System.Drawing.Point(3, 3);
     198      this.label1.Name = "label1";
     199      this.label1.Size = new System.Drawing.Size(155, 13);
     200      this.label1.TabIndex = 3;
     201      this.label1.Text = "Delete columns with more than ";
     202      //
     203      // tabDataDeleteColumnsVariance
     204      //
     205      this.tabDataDeleteColumnsVariance.Controls.Add(this.txtDeleteColumnsVariance);
     206      this.tabDataDeleteColumnsVariance.Controls.Add(this.label4);
     207      this.tabDataDeleteColumnsVariance.Location = new System.Drawing.Point(4, 22);
     208      this.tabDataDeleteColumnsVariance.Name = "tabDataDeleteColumnsVariance";
     209      this.tabDataDeleteColumnsVariance.Padding = new System.Windows.Forms.Padding(3);
     210      this.tabDataDeleteColumnsVariance.Size = new System.Drawing.Size(711, 138);
     211      this.tabDataDeleteColumnsVariance.TabIndex = 1;
     212      this.tabDataDeleteColumnsVariance.Text = "del columns variance";
     213      this.tabDataDeleteColumnsVariance.UseVisualStyleBackColor = true;
     214      //
     215      // txtDeleteColumnsVariance
     216      //
     217      this.txtDeleteColumnsVariance.Location = new System.Drawing.Point(229, 0);
     218      this.txtDeleteColumnsVariance.Name = "txtDeleteColumnsVariance";
     219      this.txtDeleteColumnsVariance.Size = new System.Drawing.Size(135, 20);
     220      this.txtDeleteColumnsVariance.TabIndex = 4;
     221      this.txtDeleteColumnsVariance.TextChanged += new System.EventHandler(this.txtDeleteColumnsVariance_TextChanged);
     222      //
     223      // label4
     224      //
     225      this.label4.AutoSize = true;
     226      this.label4.Location = new System.Drawing.Point(3, 3);
     227      this.label4.Name = "label4";
     228      this.label4.Size = new System.Drawing.Size(220, 13);
     229      this.label4.TabIndex = 3;
     230      this.label4.Text = "Delete columns with a variance smaller than  ";
     231      //
     232      // tabDataDeleteRowsInfo
     233      //
     234      this.tabDataDeleteRowsInfo.Controls.Add(this.label3);
     235      this.tabDataDeleteRowsInfo.Controls.Add(this.txtDeleteRowsInfo);
     236      this.tabDataDeleteRowsInfo.Controls.Add(this.label5);
     237      this.tabDataDeleteRowsInfo.Location = new System.Drawing.Point(4, 22);
     238      this.tabDataDeleteRowsInfo.Name = "tabDataDeleteRowsInfo";
     239      this.tabDataDeleteRowsInfo.Padding = new System.Windows.Forms.Padding(3);
     240      this.tabDataDeleteRowsInfo.Size = new System.Drawing.Size(711, 138);
     241      this.tabDataDeleteRowsInfo.TabIndex = 2;
     242      this.tabDataDeleteRowsInfo.Text = "del rows info";
     243      this.tabDataDeleteRowsInfo.UseVisualStyleBackColor = true;
     244      //
     245      // label3
     246      //
     247      this.label3.AutoSize = true;
     248      this.label3.Location = new System.Drawing.Point(189, 3);
     249      this.label3.Name = "label3";
     250      this.label3.Size = new System.Drawing.Size(89, 13);
     251      this.label3.TabIndex = 8;
     252      this.label3.Text = "% missing values.";
     253      //
     254      // txtDeleteRowsInfo
     255      //
     256      this.txtDeleteRowsInfo.Location = new System.Drawing.Point(147, 0);
     257      this.txtDeleteRowsInfo.Name = "txtDeleteRowsInfo";
     258      this.txtDeleteRowsInfo.Size = new System.Drawing.Size(34, 20);
     259      this.txtDeleteRowsInfo.TabIndex = 7;
     260      this.txtDeleteRowsInfo.TextChanged += new System.EventHandler(this.txtDeleteRowsInfo_TextChanged);
     261      //
     262      // label5
     263      //
     264      this.label5.AutoSize = true;
     265      this.label5.Location = new System.Drawing.Point(3, 3);
     266      this.label5.Name = "label5";
     267      this.label5.Size = new System.Drawing.Size(138, 13);
     268      this.label5.TabIndex = 6;
     269      this.label5.Text = "Delete rows with more than ";
     270      //
     271      // tabReplaceMissingValues
     272      //
     273      this.tabReplaceMissingValues.Controls.Add(this.txtReplaceValue);
     274      this.tabReplaceMissingValues.Controls.Add(this.cmbVariableNames);
     275      this.tabReplaceMissingValues.Controls.Add(this.cmbReplaceWith);
     276      this.tabReplaceMissingValues.Controls.Add(this.lblValueColon);
     277      this.tabReplaceMissingValues.Controls.Add(this.label8);
     278      this.tabReplaceMissingValues.Controls.Add(this.label10);
     279      this.tabReplaceMissingValues.Location = new System.Drawing.Point(4, 22);
     280      this.tabReplaceMissingValues.Name = "tabReplaceMissingValues";
     281      this.tabReplaceMissingValues.Padding = new System.Windows.Forms.Padding(3);
     282      this.tabReplaceMissingValues.Size = new System.Drawing.Size(711, 138);
     283      this.tabReplaceMissingValues.TabIndex = 6;
     284      this.tabReplaceMissingValues.Text = "repl missing vals";
     285      this.tabReplaceMissingValues.UseVisualStyleBackColor = true;
     286      //
     287      // txtReplaceValue
     288      //
     289      this.txtReplaceValue.Location = new System.Drawing.Point(173, 27);
     290      this.txtReplaceValue.Name = "txtReplaceValue";
     291      this.txtReplaceValue.Size = new System.Drawing.Size(100, 20);
     292      this.txtReplaceValue.TabIndex = 2;
     293      this.txtReplaceValue.TextChanged += new System.EventHandler(this.txtReplaceValue_TextChanged);
     294      //
     295      // cmbVariableNames
     296      //
     297      this.cmbVariableNames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     298      this.cmbVariableNames.FormattingEnabled = true;
     299      this.cmbVariableNames.Location = new System.Drawing.Point(142, 0);
     300      this.cmbVariableNames.Name = "cmbVariableNames";
     301      this.cmbVariableNames.Size = new System.Drawing.Size(121, 21);
     302      this.cmbVariableNames.TabIndex = 1;
     303      this.cmbVariableNames.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
     304      //
     305      // cmbReplaceWith
     306      //
     307      this.cmbReplaceWith.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     308      this.cmbReplaceWith.FormattingEnabled = true;
     309      this.cmbReplaceWith.Items.AddRange(new object[] {
     310            "Value",
     311            "Average",
     312            "Median",
     313            "Most Common",
     314            "Random"});
     315      this.cmbReplaceWith.Location = new System.Drawing.Point(35, 27);
     316      this.cmbReplaceWith.Name = "cmbReplaceWith";
     317      this.cmbReplaceWith.Size = new System.Drawing.Size(121, 21);
     318      this.cmbReplaceWith.TabIndex = 1;
     319      this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
     320      //
     321      // lblValueColon
     322      //
     323      this.lblValueColon.AutoSize = true;
     324      this.lblValueColon.Location = new System.Drawing.Point(157, 30);
     325      this.lblValueColon.Name = "lblValueColon";
     326      this.lblValueColon.Size = new System.Drawing.Size(10, 13);
     327      this.lblValueColon.TabIndex = 0;
     328      this.lblValueColon.Text = ":";
     329      //
     330      // label8
     331      //
     332      this.label8.AutoSize = true;
     333      this.label8.Location = new System.Drawing.Point(3, 30);
     334      this.label8.Name = "label8";
     335      this.label8.Size = new System.Drawing.Size(26, 13);
     336      this.label8.TabIndex = 0;
     337      this.label8.Text = "with";
     338      //
     339      // label10
     340      //
     341      this.label10.AutoSize = true;
     342      this.label10.Location = new System.Drawing.Point(3, 3);
     343      this.label10.Name = "label10";
     344      this.label10.Size = new System.Drawing.Size(133, 13);
     345      this.label10.TabIndex = 0;
     346      this.label10.Text = "Replace missing values for";
     347      //
     348      // tabDataShuffle
     349      //
     350      this.tabDataShuffle.Controls.Add(this.label6);
     351      this.tabDataShuffle.Location = new System.Drawing.Point(4, 22);
     352      this.tabDataShuffle.Name = "tabDataShuffle";
     353      this.tabDataShuffle.Padding = new System.Windows.Forms.Padding(3);
     354      this.tabDataShuffle.Size = new System.Drawing.Size(711, 138);
     355      this.tabDataShuffle.TabIndex = 4;
     356      this.tabDataShuffle.Text = "shuffle";
     357      this.tabDataShuffle.UseVisualStyleBackColor = true;
     358      //
     359      // label6
     360      //
     361      this.label6.AutoSize = true;
     362      this.label6.Enabled = false;
     363      this.label6.Location = new System.Drawing.Point(3, 3);
     364      this.label6.Name = "label6";
     365      this.label6.Size = new System.Drawing.Size(115, 13);
     366      this.label6.TabIndex = 0;
     367      this.label6.Text = "No properties available";
     368      //
    124369      // grpBoxPreview
    125370      //
    126       this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
    127             | System.Windows.Forms.AnchorStyles.Left) 
     371      this.grpBoxPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     372            | System.Windows.Forms.AnchorStyles.Left)
    128373            | System.Windows.Forms.AnchorStyles.Right)));
    129374      this.grpBoxPreview.Controls.Add(this.tabsPreview);
     
    137382      // tabsPreview
    138383      //
    139       this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
     384      this.tabsPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    140385            | System.Windows.Forms.AnchorStyles.Right)));
    141386      this.tabsPreview.Controls.Add(this.tabPreviewInactive);
     
    278523      this.label9.TabIndex = 0;
    279524      //
    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);
    424       //
    425       // tabDataDeleteColumnsInformation
    426       //
    427       this.tabDataDeleteColumnsInformation.Controls.Add(this.label2);
    428       this.tabDataDeleteColumnsInformation.Controls.Add(this.txtDeleteColumnsInfo);
    429       this.tabDataDeleteColumnsInformation.Controls.Add(this.label1);
    430       this.tabDataDeleteColumnsInformation.Location = new System.Drawing.Point(4, 22);
    431       this.tabDataDeleteColumnsInformation.Name = "tabDataDeleteColumnsInformation";
    432       this.tabDataDeleteColumnsInformation.Padding = new System.Windows.Forms.Padding(3);
    433       this.tabDataDeleteColumnsInformation.Size = new System.Drawing.Size(711, 138);
    434       this.tabDataDeleteColumnsInformation.TabIndex = 0;
    435       this.tabDataDeleteColumnsInformation.Text = "del columns info";
    436       this.tabDataDeleteColumnsInformation.UseVisualStyleBackColor = true;
    437       //
    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       //
    455       // label2
    456       //
    457       this.label2.AutoSize = true;
    458       this.label2.Location = new System.Drawing.Point(204, 3);
    459       this.label2.Name = "label2";
    460       this.label2.Size = new System.Drawing.Size(89, 13);
    461       this.label2.TabIndex = 5;
    462       this.label2.Text = "% missing values.";
    463       //
    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)
    488             | System.Windows.Forms.AnchorStyles.Right)));
    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;
    501       //
    502525      // ManipulationView
    503526      //
     
    511534      this.Size = new System.Drawing.Size(739, 529);
    512535      this.grpBoxData.ResumeLayout(false);
     536      this.tabsData.ResumeLayout(false);
     537      this.tabPage1.ResumeLayout(false);
     538      this.tabPage1.PerformLayout();
     539      this.tabDataDeleteColumnsInformation.ResumeLayout(false);
     540      this.tabDataDeleteColumnsInformation.PerformLayout();
     541      this.tabDataDeleteColumnsVariance.ResumeLayout(false);
     542      this.tabDataDeleteColumnsVariance.PerformLayout();
     543      this.tabDataDeleteRowsInfo.ResumeLayout(false);
     544      this.tabDataDeleteRowsInfo.PerformLayout();
     545      this.tabReplaceMissingValues.ResumeLayout(false);
     546      this.tabReplaceMissingValues.PerformLayout();
     547      this.tabDataShuffle.ResumeLayout(false);
     548      this.tabDataShuffle.PerformLayout();
    513549      this.grpBoxPreview.ResumeLayout(false);
    514550      this.tabsPreview.ResumeLayout(false);
     
    523559      this.tabPreviewShuffle.ResumeLayout(false);
    524560      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);
    538561      this.ResumeLayout(false);
    539562
     
    581604    private System.Windows.Forms.TabPage tabDataShuffle;
    582605    private System.Windows.Forms.Label label6;
     606    private System.Windows.Forms.ComboBox cmbVariableNames;
     607    private System.Windows.Forms.Label label8;
    583608  }
    584609}
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/ManipulationView.cs

    r10811 r10905  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Drawing;
    2425using System.Windows.Forms;
     
    6061        ()=>Content.ManipulationLogic.ShuffleWithRanges()
    6162      };
     63
     64    }
     65
     66    protected override void OnContentChanged() {
     67      base.OnContentChanged();
     68      if (Content != null) {
     69        cmbVariableNames.Items.Clear();
     70        foreach (var name in Content.DataGridLogic.ColumnNames) {
     71          cmbVariableNames.Items.Add(name);
     72        }
     73        cmbVariableNames.SelectedIndex = 0;
     74      }
    6275    }
    6376
     
    8598
    8699    private void replaceMissingValues() {
    87       var cells = Content.SearchLogic.GetMissingValueIndices();
    88       switch (cmbReplaceWith.SelectedIndex) {
     100      var allIndices = Content.SearchLogic.GetMissingValueIndices();
     101      var columnIndex = cmbVariableNames.SelectedIndex;
     102      var columnIndices = new Dictionary<int, IList<int>>{
     103          {columnIndex,   allIndices[columnIndex]}
     104      };
     105
     106      switch (cmbReplaceWith.SelectedIndex) {
    89107        case 0: //Value
    90           Content.ManipulationLogic.ReplaceIndicesByValue(cells, txtReplaceValue.Text);
     108          Content.ManipulationLogic.ReplaceIndicesByValue(columnIndices, txtReplaceValue.Text);
    91109          break;
    92110        case 1: //Average
    93           Content.ManipulationLogic.ReplaceIndicesByAverageValue(cells);
     111          Content.ManipulationLogic.ReplaceIndicesByAverageValue(columnIndices);
    94112          break;
    95113        case 2: //Median
    96           Content.ManipulationLogic.ReplaceIndicesByMedianValue(cells);
     114          Content.ManipulationLogic.ReplaceIndicesByMedianValue(columnIndices);
    97115          break;
    98116        case 3: //Most Common
    99           Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(cells);
     117          Content.ManipulationLogic.ReplaceIndicesByMostCommonValue(columnIndices);
    100118          break;
    101119        case 4: //Random
    102           Content.ManipulationLogic.ReplaceIndicesByRandomValue(cells);
     120          Content.ManipulationLogic.ReplaceIndicesByRandomValue(columnIndices);
    103121          break;
    104122      }
     
    152170    private void validateReplaceWith() {
    153171      btnApply.Enabled = false;
    154       string replaceValue = cmbReplaceWith.SelectedText;
     172      string replaceWith = (string)cmbReplaceWith.SelectedItem;
     173      int columnIndex = cmbVariableNames.SelectedIndex;
     174
    155175      if (cmbReplaceWith.SelectedIndex == 0) {
    156         btnApply.Enabled = !string.IsNullOrEmpty(txtReplaceValue.Text);
    157         replaceValue = @"\"+ txtReplaceValue.Text + @"\";
     176        string errorMessage;
     177        string replaceValue = txtReplaceValue.Text;
     178        if (string.IsNullOrEmpty(replaceValue)) {
     179          lblPreviewReplaceMissingValues.Text = "Preview not possible yet - please input the text which will be used as replacement.";
     180        } else if (!Content.DataGridLogic.Validate(txtReplaceValue.Text, out errorMessage, columnIndex)) {
     181          lblPreviewReplaceMissingValues.Text = "Preview not possible yet - " + errorMessage;
     182        } else {
     183          btnApply.Enabled = true;
     184        }
     185        replaceWith = "\"" + replaceValue + "\"";
    158186      } else {
    159187        btnApply.Enabled = true;
    160188      }
    161189      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;
     190        var allIndices = Content.SearchLogic.GetMissingValueIndices();
     191        int count = allIndices[columnIndex].Count;
     192        lblPreviewReplaceMissingValues.Text = count + " cell" + (count > 1 || count == 0 ? "s" : "")
     193          + " were detected with missing values which would be replaced with " + replaceWith;
    165194        if (count > 0) {
    166195          lblPreviewReplaceMissingValues.Text += Environment.NewLine + Environment.NewLine + "Please press the button \"Apply Manipulation\" if you wish to perform the replacement.";
     
    168197          btnApply.Enabled = false;
    169198        }
    170       } else {
    171         lblPreviewReplaceMissingValues.Text = "Preview not possible yet - please input the text which will be used as replacement.";
    172199      }
    173200    }
     
    203230          break;
    204231        case 3:
     232          lblPreviewReplaceMissingValues.Text = "missing values successfully replaced.";
     233          btnApply.Enabled = false;
     234          break;
     235        case 4:
    205236          lblPreviewShuffle.Text = "dataset shuffled successfully.";
    206237          btnApply.Enabled = false;
     
    232263
    233264    void Content_Changed(object sender, DataPreprocessingChangedEventArgs e) {
    234       switch(lstMethods.SelectedIndex){
     265      switch (lstMethods.SelectedIndex) {
    235266        case 0:
    236267          validateDeleteColumnsInfo();
Note: See TracChangeset for help on using the changeset viewer.