Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17785


Ignore:
Timestamp:
11/30/20 16:37:14 (4 years ago)
Author:
pfleck
Message:

#3040 Made vector separator symbol configurable in the CSV import dialog.

Location:
branches/3040_VectorBasedGP
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/ClassificationImportDialog.Designer.cs

    r17180 r17785  
    8787      this.ProblemDataSettingsGroupBox.Controls.Add(this.TargetVariableComboBox);
    8888      this.ProblemDataSettingsGroupBox.Controls.Add(this.UniformDistributionOfClassesCheckbox);
    89       this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 285);
     89      this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 255);
    9090      this.ProblemDataSettingsGroupBox.Controls.SetChildIndex(this.UniformDistributionOfClassesCheckbox, 0);
    9191      this.ProblemDataSettingsGroupBox.Controls.SetChildIndex(this.TargetVariableComboBox, 0);
     
    110110      //
    111111      this.PreviewDatasetMatrix.Location = new System.Drawing.Point(6, 134);
    112       this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 145);
     112      this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 115);
    113113      //
    114114      // PreviewLabel
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.Designer.cs

    r17180 r17785  
    6363      this.SeparatorComboBox = new System.Windows.Forms.ComboBox();
    6464      this.CSVSettingsGroupBox = new System.Windows.Forms.GroupBox();
     65      this.VectorSeparatorInfoLabel = new System.Windows.Forms.Label();
     66      this.VectorSeparatorComboBox = new System.Windows.Forms.ComboBox();
     67      this.VectorSeparatorLabel = new System.Windows.Forms.Label();
    6568      this.EncodingInfoLabel = new System.Windows.Forms.Label();
    6669      this.EncodingLabel = new System.Windows.Forms.Label();
     
    97100      this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    98101      this.OkButton.Enabled = false;
    99       this.OkButton.Location = new System.Drawing.Point(303, 422);
     102      this.OkButton.Location = new System.Drawing.Point(303, 528);
    100103      this.OkButton.Name = "OkButton";
    101104      this.OkButton.Size = new System.Drawing.Size(75, 23);
     
    106109      // TrainingTestTrackBar
    107110      //
    108       this.TrainingTestTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     111      this.TrainingTestTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    109112            | System.Windows.Forms.AnchorStyles.Right)));
    110113      this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 43);
     
    141144      this.CancellationButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    142145      this.CancellationButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
    143       this.CancellationButton.Location = new System.Drawing.Point(384, 422);
     146      this.CancellationButton.Location = new System.Drawing.Point(384, 528);
    144147      this.CancellationButton.Name = "CancellationButton";
    145148      this.CancellationButton.Size = new System.Drawing.Size(75, 23);
     
    250253      // CSVSettingsGroupBox
    251254      //
    252       this.CSVSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    253             | System.Windows.Forms.AnchorStyles.Right)));
     255      this.CSVSettingsGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     256            | System.Windows.Forms.AnchorStyles.Right)));
     257      this.CSVSettingsGroupBox.Controls.Add(this.VectorSeparatorInfoLabel);
     258      this.CSVSettingsGroupBox.Controls.Add(this.VectorSeparatorComboBox);
     259      this.CSVSettingsGroupBox.Controls.Add(this.VectorSeparatorLabel);
    254260      this.CSVSettingsGroupBox.Controls.Add(this.EncodingInfoLabel);
    255261      this.CSVSettingsGroupBox.Controls.Add(this.EncodingLabel);
     
    267273      this.CSVSettingsGroupBox.Location = new System.Drawing.Point(12, 32);
    268274      this.CSVSettingsGroupBox.Name = "CSVSettingsGroupBox";
    269       this.CSVSettingsGroupBox.Size = new System.Drawing.Size(447, 153);
     275      this.CSVSettingsGroupBox.Size = new System.Drawing.Size(447, 183);
    270276      this.CSVSettingsGroupBox.TabIndex = 16;
    271277      this.CSVSettingsGroupBox.TabStop = false;
    272278      this.CSVSettingsGroupBox.Text = "CSV Settings";
    273279      //
     280      // VectorSeparatorInfoLabel
     281      //
     282      this.VectorSeparatorInfoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     283      this.VectorSeparatorInfoLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Information;
     284      this.VectorSeparatorInfoLabel.Location = new System.Drawing.Point(417, 100);
     285      this.VectorSeparatorInfoLabel.Name = "VectorSeparatorInfoLabel";
     286      this.VectorSeparatorInfoLabel.Size = new System.Drawing.Size(24, 25);
     287      this.VectorSeparatorInfoLabel.TabIndex = 30;
     288      this.VectorSeparatorInfoLabel.Tag = "Select the decimal separator used to for double values";
     289      this.ToolTip.SetToolTip(this.VectorSeparatorInfoLabel, "If a value contains a Vector Separator it is converted to a Vector column with th" +
     290        "e value split on the Vector Separator symbol.");
     291      //
     292      // VectorSeparatorComboBox
     293      //
     294      this.VectorSeparatorComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     295            | System.Windows.Forms.AnchorStyles.Right)));
     296      this.VectorSeparatorComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
     297      this.VectorSeparatorComboBox.Enabled = false;
     298      this.VectorSeparatorComboBox.FormattingEnabled = true;
     299      this.VectorSeparatorComboBox.Location = new System.Drawing.Point(111, 100);
     300      this.VectorSeparatorComboBox.Name = "VectorSeparatorComboBox";
     301      this.VectorSeparatorComboBox.Size = new System.Drawing.Size(300, 21);
     302      this.VectorSeparatorComboBox.TabIndex = 29;
     303      this.VectorSeparatorComboBox.SelectionChangeCommitted += new System.EventHandler(this.CSVFormatComboBoxSelectionChangeCommitted);
     304      //
     305      // VectorSeparatorLabel
     306      //
     307      this.VectorSeparatorLabel.AutoSize = true;
     308      this.VectorSeparatorLabel.Location = new System.Drawing.Point(6, 104);
     309      this.VectorSeparatorLabel.Name = "VectorSeparatorLabel";
     310      this.VectorSeparatorLabel.Size = new System.Drawing.Size(90, 13);
     311      this.VectorSeparatorLabel.TabIndex = 28;
     312      this.VectorSeparatorLabel.Text = "Vector Separator:";
     313      //
    274314      // EncodingInfoLabel
    275315      //
    276316      this.EncodingInfoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    277317      this.EncodingInfoLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Information;
    278       this.EncodingInfoLabel.Location = new System.Drawing.Point(421, 102);
     318      this.EncodingInfoLabel.Location = new System.Drawing.Point(421, 130);
    279319      this.EncodingInfoLabel.Name = "EncodingInfoLabel";
    280320      this.EncodingInfoLabel.Size = new System.Drawing.Size(16, 16);
     
    287327      //
    288328      this.EncodingLabel.AutoSize = true;
    289       this.EncodingLabel.Location = new System.Drawing.Point(6, 103);
     329      this.EncodingLabel.Location = new System.Drawing.Point(6, 130);
    290330      this.EncodingLabel.Name = "EncodingLabel";
    291331      this.EncodingLabel.Size = new System.Drawing.Size(52, 13);
     
    300340      this.EncodingComboBox.Enabled = false;
    301341      this.EncodingComboBox.FormattingEnabled = true;
    302       this.EncodingComboBox.Location = new System.Drawing.Point(111, 100);
     342      this.EncodingComboBox.Location = new System.Drawing.Point(111, 127);
    303343      this.EncodingComboBox.Name = "EncodingComboBox";
    304344      this.EncodingComboBox.Size = new System.Drawing.Size(300, 21);
     
    309349      //
    310350      this.CheckboxColumnNames.AutoSize = true;
    311       this.CheckboxColumnNames.Location = new System.Drawing.Point(9, 127);
     351      this.CheckboxColumnNames.Location = new System.Drawing.Point(9, 154);
    312352      this.CheckboxColumnNames.Name = "CheckboxColumnNames";
    313353      this.CheckboxColumnNames.Size = new System.Drawing.Size(144, 17);
     
    366406      this.ProblemDataSettingsGroupBox.Controls.Add(this.TrainingTestTrackBar);
    367407      this.ProblemDataSettingsGroupBox.Controls.Add(this.ShuffleDataCheckbox);
    368       this.ProblemDataSettingsGroupBox.Location = new System.Drawing.Point(12, 191);
     408      this.ProblemDataSettingsGroupBox.Location = new System.Drawing.Point(12, 221);
    369409      this.ProblemDataSettingsGroupBox.Name = "ProblemDataSettingsGroupBox";
    370       this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 225);
     410      this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 301);
    371411      this.ProblemDataSettingsGroupBox.TabIndex = 17;
    372412      this.ProblemDataSettingsGroupBox.TabStop = false;
     
    416456      this.PreviewDatasetMatrix.ShowRowsAndColumnsTextBox = false;
    417457      this.PreviewDatasetMatrix.ShowStatisticalInformation = false;
    418       this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 111);
     458      this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 187);
    419459      this.PreviewDatasetMatrix.TabIndex = 0;
    420460      //
     
    424464      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    425465      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    426       this.ClientSize = new System.Drawing.Size(471, 457);
     466      this.ClientSize = new System.Drawing.Size(471, 563);
    427467      this.Controls.Add(this.ProblemDataSettingsGroupBox);
    428468      this.Controls.Add(this.CSVSettingsGroupBox);
     
    480520    protected System.Windows.Forms.Label EncodingLabel;
    481521    protected System.Windows.Forms.ComboBox EncodingComboBox;
     522    protected System.Windows.Forms.Label VectorSeparatorInfoLabel;
     523    protected System.Windows.Forms.ComboBox VectorSeparatorComboBox;
     524    protected System.Windows.Forms.Label VectorSeparatorLabel;
    482525  }
    483526}
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportDialog.cs

    r17414 r17785  
    2929using HeuristicLab.Core.Views;
    3030using HeuristicLab.Problems.DataAnalysis;
     31using DoubleVector = MathNet.Numerics.LinearAlgebra.Vector<double>;
    3132
    3233namespace HeuristicLab.Problems.Instances.DataAnalysis.Views {
     
    5556    };
    5657
     58    private static readonly List<KeyValuePair<char?, string>> POSSIBLE_VECTOR_SEPARATORS =
     59      new List<KeyValuePair<char?, string>>{
     60        new KeyValuePair<char?, string>(null, "None"),
     61        new KeyValuePair<char?, string>(',', ", (Comma)"),
     62        new KeyValuePair<char?, string>(';', "; (Semicolon)"),
     63        new KeyValuePair<char?, string>(' ', "' ' (Space)"),
     64        new KeyValuePair<char?, string>('|', "| (Pipe)")
     65      };
     66
    5767    private static readonly List<KeyValuePair<Encoding, string>> POSSIBLE_ENCODINGS =
    5868      new List<KeyValuePair<Encoding, string>> {
     
    8292          NumberFormatInfo = (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
    8393          DateTimeFormatInfo = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
     94          VectorSeparator = (char?)VectorSeparatorComboBox.SelectedValue,
    8495          VariableNamesAvailable = CheckboxColumnNames.Checked,
    8596          Encoding = (Encoding)EncodingComboBox.SelectedValue
     
    97108      DecimalSeparatorComboBox.ValueMember = "Key";
    98109      DecimalSeparatorComboBox.DisplayMember = "Value";
     110      VectorSeparatorComboBox.DataSource = POSSIBLE_VECTOR_SEPARATORS;
     111      VectorSeparatorComboBox.ValueMember = "Key";
     112      VectorSeparatorComboBox.DisplayMember = "Value";
    99113      DateTimeFormatComboBox.DataSource = POSSIBLE_DATETIME_FORMATS;
    100114      DateTimeFormatComboBox.ValueMember = "Key";
     
    125139      SeparatorComboBox.Enabled = true;
    126140      DecimalSeparatorComboBox.Enabled = true;
     141      VectorSeparatorComboBox.Enabled = true;
    127142      DateTimeFormatComboBox.Enabled = true;
    128143      EncodingComboBox.Enabled = true;
     
    132147        NumberFormat = (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
    133148        DateTimeFormat = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
    134         ColumnSeparator = (char)SeparatorComboBox.SelectedValue
     149        ColumnSeparator = (char)SeparatorComboBox.SelectedValue,
     150        VectorSeparator = (char?)VectorSeparatorComboBox.SelectedValue
    135151      };
    136152      CheckboxColumnNames.Checked = csvParser.AreColumnNamesInFirstLine(ProblemTextBox.Text, formatOptions);
     
    158174          NumberFormat = (NumberFormatInfo)DecimalSeparatorComboBox.SelectedValue,
    159175          DateTimeFormat = (DateTimeFormatInfo)DateTimeFormatComboBox.SelectedValue,
    160           ColumnSeparator = (char)SeparatorComboBox.SelectedValue
     176          ColumnSeparator = (char)SeparatorComboBox.SelectedValue,
     177          VectorSeparator = (char?)VectorSeparatorComboBox.SelectedValue
    161178        };
    162179        csvParser.Parse(ProblemTextBox.Text, formatOptions, CheckboxColumnNames.Checked, lineLimit: 500);
     
    195212        } else if (csvParser.Values[i] is List<DateTime>) {
    196213          variableNamesWithType[i] += " (DateTime)";
     214        } else if (csvParser.Values[i] is List<DoubleVector>) {
     215          variableNamesWithType[i] += " (Double-Vector)";
    197216        } else {
    198           throw new ArgumentException("The variable values must be of type List<double>, List<string> or List<DateTime>");
     217          throw new ArgumentException("The variable values must be of type List<double>, List<string>, List<DateTime> or List<DoubleVector>");
    199218        }
    200219      }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r17475 r17785  
    8181    <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    8282    <Reference Include="HeuristicLab.Visualization.ChartControlsExtensions-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     83    <Reference Include="MathNet.Numerics, Version=4.9.0.0, Culture=neutral, PublicKeyToken=cd8b63ad3d691a37, processorArchitecture=MSIL">
     84      <SpecificVersion>False</SpecificVersion>
     85      <HintPath>..\..\bin\MathNet.Numerics.dll</HintPath>
     86    </Reference>
    8387    <Reference Include="System" />
    8488    <Reference Include="System.Core" />
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/Plugin.cs.frame

    r17184 r17785  
    3636  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
    3737  [PluginDependency("HeuristicLab.Problems.Instances.Views", "3.3")]
     38  [PluginDependency("HeuristicLab.MathNet.Numerics", "4.9.0")]
    3839  public class HeuristicLabProblemsInstancesDataAnalysisViewsPlugin : PluginBase {
    3940  }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionImportDialog.Designer.cs

    r17180 r17785  
    6666      this.ProblemDataSettingsGroupBox.Controls.Add(this.TargetVariableLabel);
    6767      this.ProblemDataSettingsGroupBox.Controls.Add(this.TargetVariableComboBox);
     68      this.ProblemDataSettingsGroupBox.Size = new System.Drawing.Size(447, 194);
    6869      this.ProblemDataSettingsGroupBox.Controls.SetChildIndex(this.PreviewLabel, 0);
    6970      this.ProblemDataSettingsGroupBox.Controls.SetChildIndex(this.ShuffelInfoLabel, 0);
     
    7879      this.ProblemDataSettingsGroupBox.Controls.SetChildIndex(this.ErrorTextBox, 0);
    7980      //
     81      // PreviewDatasetMatrix
     82      //
     83      this.PreviewDatasetMatrix.Size = new System.Drawing.Size(435, 80);
    8084      // TargetVariableComboBox
    8185      //
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/DataAnalysisCSVFormat.cs

    r17180 r17785  
    2828    public NumberFormatInfo NumberFormatInfo { get; set; }
    2929    public DateTimeFormatInfo DateTimeFormatInfo { get; set; }
     30    public char? VectorSeparator { get; set; }
    3031    public bool VariableNamesAvailable { get; set; }
    3132    public Encoding Encoding { get; set; }
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/DataAnalysisInstanceProvider.cs

    r17414 r17785  
    4646      };
    4747      var formatOptions = new TableFileFormatOptions {
    48         NumberFormat = csvFormat.NumberFormatInfo, DateTimeFormat = csvFormat.DateTimeFormatInfo, ColumnSeparator = csvFormat.Separator
     48        NumberFormat = csvFormat.NumberFormatInfo,
     49        DateTimeFormat = csvFormat.DateTimeFormatInfo,
     50        ColumnSeparator = csvFormat.Separator,
     51        VectorSeparator = csvFormat.VectorSeparator
    4952      };
    5053      csvFileParser.Parse(path, formatOptions, csvFormat.VariableNamesAvailable);
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.Instances.DataAnalysis/3.3/HeuristicLab.Problems.Instances.DataAnalysis-3.3.csproj

    r17759 r17785  
    2424    <WarningLevel>4</WarningLevel>
    2525    <Prefer32Bit>false</Prefer32Bit>
    26     <LangVersion>default</LangVersion>
     26    <LangVersion>7</LangVersion>
    2727  </PropertyGroup>
    2828  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    3434    <WarningLevel>4</WarningLevel>
    3535    <Prefer32Bit>false</Prefer32Bit>
    36     <LangVersion>default</LangVersion>
     36    <LangVersion>7</LangVersion>
    3737  </PropertyGroup>
    3838  <PropertyGroup>
     
    5656    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    5757    <Prefer32Bit>false</Prefer32Bit>
    58     <LangVersion>default</LangVersion>
     58    <LangVersion>7</LangVersion>
    5959  </PropertyGroup>
    6060  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     
    7474    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    7575    <Prefer32Bit>false</Prefer32Bit>
    76     <LangVersion>default</LangVersion>
     76    <LangVersion>7</LangVersion>
    7777  </PropertyGroup>
    7878  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     
    9090    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    9191    <Prefer32Bit>false</Prefer32Bit>
    92     <LangVersion>default</LangVersion>
     92    <LangVersion>7</LangVersion>
    9393  </PropertyGroup>
    9494  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     
    108108    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    109109    <Prefer32Bit>false</Prefer32Bit>
    110     <LangVersion>default</LangVersion>
     110    <LangVersion>7</LangVersion>
    111111  </PropertyGroup>
    112112  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.