Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15958


Ignore:
Timestamp:
06/13/18 15:28:39 (7 years ago)
Author:
rhanghof
Message:

#2913:

  • Enhancements on the RegressionMatlabImportDialog
  • Added a new text formater SymbolicDataAnalysisExpressionMATLABFunctionFormatter
Location:
branches/2913_MatlabScriptProblemInstanceProvider
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj

    r14948 r15958  
    143143    <Compile Include="Formatters\SymbolicDataAnalysisExpressionMathematicaFormatter.cs" />
    144144    <Compile Include="Formatters\SymbolicDataAnalysisExpressionCSharpFormatter.cs" />
     145    <Compile Include="Formatters\SymbolicDataAnalysisExpressionMATLABFunctionFormatter.cs" />
    145146    <Compile Include="Importer\InfixExpressionParser.cs" />
    146147    <Compile Include="Importer\SymbolicExpressionImporter.cs" />
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj

    r15926 r15958  
    235235  </ItemGroup>
    236236  <ItemGroup>
     237    <EmbeddedResource Include="DataAnalysisImportDialog.resx">
     238      <DependentUpon>DataAnalysisImportDialog.cs</DependentUpon>
     239    </EmbeddedResource>
    237240    <EmbeddedResource Include="RegressionInstanceProviderView.resx">
    238241      <DependentUpon>RegressionInstanceProviderView.cs</DependentUpon>
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/Regression/Matlab/RegressionMatlabImportDialog.Designer.cs

    r15926 r15958  
    3131            this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    3232            this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
     33            this.ShuffelInfoLabel = new System.Windows.Forms.Label();
    3334            this.ProblemDataSettingsGroupBox = new System.Windows.Forms.GroupBox();
    3435            this.ErrorTextBox = new System.Windows.Forms.TextBox();
     36            this.ShuffleDataCheckbox = new System.Windows.Forms.CheckBox();
    3537            this.label1 = new System.Windows.Forms.Label();
    3638            this.TargetVariableComboBox = new System.Windows.Forms.ComboBox();
     
    9193            this.openFileDialog.Filter = "Matlab files (*.m)|*.m|All files (*.*)|*.*";
    9294            //
     95            // ShuffelInfoLabel
     96            //
     97            this.ShuffelInfoLabel.Image = ((System.Drawing.Image)(resources.GetObject("ShuffelInfoLabel.Image")));
     98            this.ShuffelInfoLabel.Location = new System.Drawing.Point(114, 21);
     99            this.ShuffelInfoLabel.Name = "ShuffelInfoLabel";
     100            this.ShuffelInfoLabel.Size = new System.Drawing.Size(16, 16);
     101            this.ShuffelInfoLabel.TabIndex = 11;
     102            this.ShuffelInfoLabel.Tag = "Check, if the imported data should be shuffled";
     103            this.ToolTip.SetToolTip(this.ShuffelInfoLabel, "Check, if the imported data should be shuffled");
     104            //
    93105            // ProblemDataSettingsGroupBox
    94106            //
     
    97109            | System.Windows.Forms.AnchorStyles.Right)));
    98110            this.ProblemDataSettingsGroupBox.Controls.Add(this.ErrorTextBox);
     111            this.ProblemDataSettingsGroupBox.Controls.Add(this.ShuffelInfoLabel);
     112            this.ProblemDataSettingsGroupBox.Controls.Add(this.ShuffleDataCheckbox);
    99113            this.ProblemDataSettingsGroupBox.Controls.Add(this.label1);
    100114            this.ProblemDataSettingsGroupBox.Controls.Add(this.TargetVariableComboBox);
     
    116130            | System.Windows.Forms.AnchorStyles.Left)
    117131            | System.Windows.Forms.AnchorStyles.Right)));
    118             this.ErrorTextBox.Location = new System.Drawing.Point(6, 15);
     132            this.ErrorTextBox.Location = new System.Drawing.Point(6, 18);
    119133            this.ErrorTextBox.Multiline = true;
    120134            this.ErrorTextBox.Name = "ErrorTextBox";
    121135            this.ErrorTextBox.ReadOnly = true;
    122             this.ErrorTextBox.Size = new System.Drawing.Size(435, 237);
     136            this.ErrorTextBox.Size = new System.Drawing.Size(435, 70);
    123137            this.ErrorTextBox.TabIndex = 0;
    124138            this.ErrorTextBox.Text = "Open a Matlab File";
    125139            //
     140            // ShuffleDataCheckbox
     141            //
     142            this.ShuffleDataCheckbox.AutoSize = true;
     143            this.ShuffleDataCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     144            this.ShuffleDataCheckbox.Location = new System.Drawing.Point(12, 21);
     145            this.ShuffleDataCheckbox.Name = "ShuffleDataCheckbox";
     146            this.ShuffleDataCheckbox.Size = new System.Drawing.Size(91, 17);
     147            this.ShuffleDataCheckbox.TabIndex = 10;
     148            this.ShuffleDataCheckbox.Text = "Shuffle Data?";
     149            this.ShuffleDataCheckbox.UseVisualStyleBackColor = true;
     150            //
    126151            // label1
    127152            //
     153            this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    128154            this.label1.AutoSize = true;
    129             this.label1.Location = new System.Drawing.Point(9, 22);
     155            this.label1.Location = new System.Drawing.Point(168, 22);
    130156            this.label1.Name = "label1";
    131157            this.label1.Size = new System.Drawing.Size(82, 13);
     
    135161            // TargetVariableComboBox
    136162            //
     163            this.TargetVariableComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    137164            this.TargetVariableComboBox.BackColor = System.Drawing.SystemColors.Control;
    138165            this.TargetVariableComboBox.FormattingEnabled = true;
    139             this.TargetVariableComboBox.Location = new System.Drawing.Point(97, 19);
     166            this.TargetVariableComboBox.Location = new System.Drawing.Point(256, 19);
    140167            this.TargetVariableComboBox.Name = "TargetVariableComboBox";
    141168            this.TargetVariableComboBox.Size = new System.Drawing.Size(185, 21);
     
    363390    private System.Windows.Forms.TabPage DoubleArrays;
    364391    private System.Windows.Forms.CheckedListBox DoubleArraysListBox;
     392    protected System.Windows.Forms.Label ShuffelInfoLabel;
     393    protected System.Windows.Forms.CheckBox ShuffleDataCheckbox;
    365394  }
    366395}
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/Regression/Matlab/RegressionMatlabImportDialog.cs

    r15926 r15958  
    11using System;
    2 using System.Collections;
    32using System.Collections.Generic;
    43using System.ComponentModel;
     
    4948      get {
    5049        return new RegressionMatlabImportType() {
    51           Shuffle = false,
     50          Shuffle = ShuffleDataCheckbox.Checked,
    5251          TrainingPercentage = TrainingTestTrackBar.Value,
    5352          TargetVariable = (String)TargetVariableComboBox.SelectedValue,
     
    200199        GC.Collect();
    201200        var token = _cts.Token;
    202         var ds = await Task.Run<Dataset>(() => _variablesLoader.GetPreviewDataset(_mlConnector, token), token);
     201        var values = await Task.Run<Dataset>(() => _variablesLoader.GetPreviewDataset(_mlConnector, token), token);
    203202        GC.Collect();
    204203
    205         if (ds != null) {
    206           _values = ds;
     204        if (values != null) {
     205          _values = values;
    207206          PreviewDatasetMatrix.Content = _values;
    208207          TargetVariableComboBox.DataSource = _values.VariableNames;
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/Regression/Matlab/RegressionMatlabImportDialog.resx

    r15912 r15958  
    142142    <value>192, 15</value>
    143143  </metadata>
     144  <data name="ShuffelInfoLabel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     145    <value>
     146        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
     147        DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
     148        bGUAAEjHnZZ3VFTXFofPvXd6oc0w0hl6ky4wgPQuIB0EURhmBhjKAMMMTWyIqEBEEREBRZCggAGjoUis
     149        iGIhKKhgD0gQUGIwiqioZEbWSnx5ee/l5ffHvd/aZ+9z99l7n7UuACRPHy4vBZYCIJkn4Ad6ONNXhUfQ
     150        sf0ABniAAaYAMFnpqb5B7sFAJC83F3q6yAn8i94MAUj8vmXo6U+ng/9P0qxUvgAAyF/E5mxOOkvE+SJO
     151        yhSkiu0zIqbGJIoZRomZL0pQxHJijlvkpZ99FtlRzOxkHlvE4pxT2clsMfeIeHuGkCNixEfEBRlcTqaI
     152        b4tYM0mYzBXxW3FsMoeZDgCKJLYLOKx4EZuImMQPDnQR8XIAcKS4LzjmCxZwsgTiQ7mkpGbzuXHxArou
     153        S49uam3NoHtyMpM4AoGhP5OVyOSz6S4pyalMXjYAi2f+LBlxbemiIluaWltaGpoZmX5RqP+6+Dcl7u0i
     154        vQr43DOI1veH7a/8UuoAYMyKarPrD1vMfgA6tgIgd/8Pm+YhACRFfWu/8cV5aOJ5iRcIUm2MjTMzM424
     155        HJaRuKC/6386/A198T0j8Xa/l4fuyollCpMEdHHdWClJKUI+PT2VyeLQDf88xP848K/zWBrIieXwOTxR
     156        RKhoyri8OFG7eWyugJvCo3N5/6mJ/zDsT1qca5Eo9Z8ANcoISN2gAuTnPoCiEAESeVDc9d/75oMPBeKb
     157        F6Y6sTj3nwX9+65wifiRzo37HOcSGExnCfkZi2viawnQgAAkARXIAxWgAXSBITADVsAWOAI3sAL4gWAQ
     158        DtYCFogHyYAPMkEu2AwKQBHYBfaCSlAD6kEjaAEnQAc4DS6Ay+A6uAnugAdgBIyD52AGvAHzEARhITJE
     159        geQhVUgLMoDMIAZkD7lBPlAgFA5FQ3EQDxJCudAWqAgqhSqhWqgR+hY6BV2ArkID0D1oFJqCfoXewwhM
     160        gqmwMqwNG8MM2An2hoPhNXAcnAbnwPnwTrgCroOPwe3wBfg6fAcegZ/DswhAiAgNUUMMEQbigvghEUgs
     161        wkc2IIVIOVKHtCBdSC9yCxlBppF3KAyKgqKjDFG2KE9UCIqFSkNtQBWjKlFHUe2oHtQt1ChqBvUJTUYr
     162        oQ3QNmgv9Cp0HDoTXYAuRzeg29CX0HfQ4+g3GAyGhtHBWGE8MeGYBMw6TDHmAKYVcx4zgBnDzGKxWHms
     163        AdYO64dlYgXYAux+7DHsOewgdhz7FkfEqeLMcO64CBwPl4crxzXhzuIGcRO4ebwUXgtvg/fDs/HZ+BJ8
     164        Pb4LfwM/jp8nSBN0CHaEYEICYTOhgtBCuER4SHhFJBLVidbEACKXuIlYQTxOvEIcJb4jyZD0SS6kSJKQ
     165        tJN0hHSedI/0ikwma5MdyRFkAXknuZF8kfyY/FaCImEk4SXBltgoUSXRLjEo8UISL6kl6SS5VjJHslzy
     166        pOQNyWkpvJS2lIsUU2qDVJXUKalhqVlpirSptJ90snSxdJP0VelJGayMtoybDFsmX+awzEWZMQpC0aC4
     167        UFiULZR6yiXKOBVD1aF6UROoRdRvqP3UGVkZ2WWyobJZslWyZ2RHaAhNm+ZFS6KV0E7QhmjvlygvcVrC
     168        WbJjScuSwSVzcopyjnIcuUK5Vrk7cu/l6fJu8onyu+U75B8poBT0FQIUMhUOKlxSmFakKtoqshQLFU8o
     169        3leClfSVApXWKR1W6lOaVVZR9lBOVd6vfFF5WoWm4qiSoFKmclZlSpWiaq/KVS1TPaf6jC5Ld6In0Svo
     170        PfQZNSU1TzWhWq1av9q8uo56iHqeeqv6Iw2CBkMjVqNMo1tjRlNV01czV7NZ874WXouhFa+1T6tXa05b
     171        RztMe5t2h/akjpyOl06OTrPOQ12yroNumm6d7m09jB5DL1HvgN5NfVjfQj9ev0r/hgFsYGnANThgMLAU
     172        vdR6KW9p3dJhQ5Khk2GGYbPhqBHNyMcoz6jD6IWxpnGE8W7jXuNPJhYmSSb1Jg9MZUxXmOaZdpn+aqZv
     173        xjKrMrttTjZ3N99o3mn+cpnBMs6yg8vuWlAsfC22WXRbfLS0suRbtlhOWWlaRVtVWw0zqAx/RjHjijXa
     174        2tl6o/Vp63c2ljYCmxM2v9ga2ibaNtlOLtdZzllev3zMTt2OaVdrN2JPt4+2P2Q/4qDmwHSoc3jiqOHI
     175        dmxwnHDSc0pwOub0wtnEme/c5jznYuOy3uW8K+Lq4Vro2u8m4xbiVun22F3dPc692X3Gw8Jjncd5T7Sn
     176        t+duz2EvZS+WV6PXzAqrFetX9HiTvIO8K72f+Oj78H26fGHfFb57fB+u1FrJW9nhB/y8/Pb4PfLX8U/z
     177        /z4AE+AfUBXwNNA0MDewN4gSFBXUFPQm2Dm4JPhBiG6IMKQ7VDI0MrQxdC7MNaw0bGSV8ar1q66HK4Rz
     178        wzsjsBGhEQ0Rs6vdVu9dPR5pEVkQObRGZ03WmqtrFdYmrT0TJRnFjDoZjY4Oi26K/sD0Y9YxZ2O8Yqpj
     179        ZlgurH2s52xHdhl7imPHKeVMxNrFlsZOxtnF7YmbineIL4+f5rpwK7kvEzwTahLmEv0SjyQuJIUltSbj
     180        kqOTT/FkeIm8nhSVlKyUgVSD1ILUkTSbtL1pM3xvfkM6lL4mvVNAFf1M9Ql1hVuFoxn2GVUZbzNDM09m
     181        SWfxsvqy9bN3ZE/kuOd8vQ61jrWuO1ctd3Pu6Hqn9bUboA0xG7o3amzM3zi+yWPT0c2EzYmbf8gzySvN
     182        e70lbEtXvnL+pvyxrR5bmwskCvgFw9tst9VsR23nbu/fYb5j/45PhezCa0UmReVFH4pZxde+Mv2q4quF
     183        nbE7+0ssSw7uwuzi7Rra7bD7aKl0aU7p2B7fPe1l9LLCstd7o/ZeLV9WXrOPsE+4b6TCp6Jzv+b+Xfs/
     184        VMZX3qlyrmqtVqreUT13gH1g8KDjwZYa5ZqimveHuIfu1nrUttdp15UfxhzOOPy0PrS+92vG140NCg1F
     185        DR+P8I6MHA082tNo1djYpNRU0gw3C5unjkUeu/mN6zedLYYtta201qLj4Ljw+LNvo78dOuF9ovsk42TL
     186        d1rfVbdR2grbofbs9pmO+I6RzvDOgVMrTnV32Xa1fW/0/ZHTaqerzsieKTlLOJt/duFczrnZ86nnpy/E
     187        XRjrjup+cHHVxds9AT39l7wvXbnsfvlir1PvuSt2V05ftbl66hrjWsd1y+vtfRZ9bT9Y/NDWb9nffsPq
     188        RudN65tdA8sHzg46DF645Xrr8m2v29fvrLwzMBQydHc4cnjkLvvu5L2key/vZ9yff7DpIfph4SOpR+WP
     189        lR7X/aj3Y+uI5ciZUdfRvidBTx6Mscae/5T+04fx/Kfkp+UTqhONk2aTp6fcp24+W/1s/Hnq8/npgp+l
     190        f65+ofviu18cf+mbWTUz/pL/cuHX4lfyr468Xva6e9Z/9vGb5Dfzc4Vv5d8efcd41/s+7P3EfOYH7IeK
     191        j3ofuz55f3q4kLyw8Bv3hPP74uYdwgAAAAlwSFlzAAALEgAACxIB0t1+/AAAABl0RVh0U29mdHdhcmUA
     192        UGFpbnQuTkVUIHYzLjUuODc7gF0AAAK0SURBVDhPrZBrSNNRAMWNvkVEEBT0oY+BUAgSRBhIQmUqKYb4
     193        KgudU1MTlj2WZUlMykdu+VhatmWKWaaITF35qCmzWoaGj81kms72dm5/3cM9TtvdX9Sob/0+XC6Hcw73
     194        noA/uVKrDC54OV94t1nHvy7U8Rjc6eLLpdJcdoU4kLb8nexqxTaWYDa3vFP9dWjG6plWOzCnc0GptuLD
     195        yDxKBEOyc3nCotTbr3bRkQ2Y3IntrGfKopZhg9uFDZZXXTCtOsndvGJHc9cIYnLq+pLyhXvpqJ+syvHE
     196        x53zHuKkURutOJY7jCPM99AvUbQK1LcOIoJZ3ZrAqt9JwoySL7tv1I32K9Um2uJnzekGp2ECHOEY7A7/
     197        K/zYwSh44YzMrI4nBWnFkvjSBtlmB+GXzorRH3qo9BZa8ZY6HN7TBvGAzPuKKgkpSGB3sKtaZH7HJto/
     198        ziLoghjR+b3QGv1fcDldcNkpyCcViM2uWSQF8WxRFv/NN2LYjEyuwdEkCUJTu7GgXyKa2zuxbdUM1ZwS
     199        cXlPVKQg+U5PcnmjzON2b9kQozM6HE/uRXiGCBqTmWhOlwuU2QC5fAqxOXwtKbhS0hN6r6af8o22mcmf
     200        RoTEihHFEIFyWIlmoShYLVr09A7hNKNykhSUCAZ35JeJ+sRDCmJaRzquw77g1zgY1oQFo39Io14Lq1mF
     201        rEKBr+AhKfDBKhWF3uJ2UeZVGzH6aOqWIzC6CYdiGvC2d8q7oPcbNg2a294h7GKFIi7v6X467ieX03bp
     202        QW33mkqj8cbX4HZQWHEsYWXFAMqogcOiQoeoH+EMnulMetVJOraVxKvPI1JuCr4XclvxeWQMNmoRy4Y5
     203        DEikuFbc6AlP40kjM/4RXicqk38gIr2qICSpbPDw2fufgmI40hMpj9ojmZXnT6Xy9tC2/0VAwG8zx1zr
     204        HKDQkgAAAABJRU5ErkJggg==
     205</value>
     206  </data>
    144207</root>
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Matlab/Api/Types/MLDoubleArray.cs

    r15926 r15958  
    2020      _dataHeaders = new string[Data.GetLength(1)];
    2121      for (int i = 0; i < _dataHeaders.Length; i++) {
    22         _dataHeaders[i] = string.Format("{0}:{1}", name, i);
     22        _dataHeaders[i] = string.Format("{0}_{1}", name, i);
    2323      }
    2424    }
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Matlab/Api/Types/MLTimeseries.cs

    r15926 r15958  
    9797
    9898      for (int i = 0; i < valueColumns; i++) {
    99         _dataHeaders[i] = string.Format("{0}:{1}", Name, i);
     99        _dataHeaders[i] = string.Format("{0}_{1}", Name, i);
    100100      }
    101101
  • branches/2913_MatlabScriptProblemInstanceProvider/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/Matlab/RegressionMatlabInstanceProvider.cs

    r15926 r15958  
    2828using HeuristicLab.Common;
    2929using HeuristicLab.Problems.DataAnalysis;
    30 using HeuristicLab.Problems.Instances.DataAnalysis.Regression.Matlab.Api;
    3130using HeuristicLab.Problems.Instances.DataAnalysis.Regression.Matlab.Api.Types;
     31using HeuristicLab.Random;
    3232
    3333namespace HeuristicLab.Problems.Instances.DataAnalysis.Regression.Matlab {
     
    6767
    6868
     69    private Dataset GetValues(RegressionMatlabImportType type) {
     70      if (type.Shuffle) {
     71        type.Values = type.Values.Shuffle(new MersenneTwister());
     72      }
     73      return type.Values;
     74    }
     75
    6976    public IRegressionProblemData ImportData(string path, RegressionMatlabImportType type, IEnumerable<MLVariableInfo> variableNames) {
    70       var dataset = type.Values;
     77      var dataset = GetValues(type);
    7178      var targetVar = type.TargetVariable;
    7279
Note: See TracChangeset for help on using the changeset viewer.