Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/12 16:27:13 (12 years ago)
Author:
spimming
Message:

#1807:

  • added file dialog to select csv problem file
  • wizard page to select target variable
  • plugin dependencies updated
Location:
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3
Files:
2 added
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/DataAnalysisExperimentWizard.cs

    r7944 r7953  
    1111      wizard.Text = "Data Analysis Service";
    1212      wizard.AddPage(new ProblemDataPage(context));
    13       wizard.AddPage(new ProblemDataViewPage(context));
     13      wizard.AddPage(new TargetVariablePage(context));
    1414      wizard.AddPage(new SelectAnalysisPage(context));
    1515      wizard.AddPage(new WizardPage());
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard.csproj

    r7944 r7953  
    142142      <DependentUpon>ProblemDataPage.cs</DependentUpon>
    143143    </Compile>
    144     <Compile Include="ProblemDataViewPage.cs">
    145       <SubType>UserControl</SubType>
    146     </Compile>
    147     <Compile Include="ProblemDataViewPage.Designer.cs">
    148       <DependentUpon>ProblemDataViewPage.cs</DependentUpon>
     144    <Compile Include="TargetVariablePage.cs">
     145      <SubType>UserControl</SubType>
     146    </Compile>
     147    <Compile Include="TargetVariablePage.Designer.cs">
     148      <DependentUpon>TargetVariablePage.cs</DependentUpon>
    149149    </Compile>
    150150    <Compile Include="Properties\AssemblyInfo.cs" />
     
    177177      <DependentUpon>ProblemDataPage.cs</DependentUpon>
    178178    </EmbeddedResource>
    179     <EmbeddedResource Include="ProblemDataViewPage.resx">
    180       <DependentUpon>ProblemDataViewPage.cs</DependentUpon>
     179    <EmbeddedResource Include="TargetVariablePage.resx">
     180      <DependentUpon>TargetVariablePage.cs</DependentUpon>
    181181    </EmbeddedResource>
    182182    <EmbeddedResource Include="ResultPage.resx">
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/Plugin.cs.frame

    r7939 r7953  
    3030  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis.Views", "3.4")]
    3131  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")]
     32  [PluginDependency("HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm", "3.3")]
     33  [PluginDependency("HeuristicLab.Clients.Hive", "3.3")]
     34  [PluginDependency("HeuristicLab.Clients.HiveJobManager", "3.3")]
    3235  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3336  [PluginDependency("HeuristicLab.Common", "3.3")]
     
    3841  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
    3942  [PluginDependency("HeuristicLab.Encodings.ParameterConfigurationTreeEncoding", "3.3")]
     43  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
    4044  [PluginDependency("HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard", "3.3")]
     45  [PluginDependency("HeuristicLab.Hive", "3.3")]
    4146  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    4247  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
     48  [PluginDependency("HeuristicLab.Operators", "3.3")]
    4349  [PluginDependency("HeuristicLab.Optimization", "3.3")]
    4450  [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
     
    4753  [PluginDependency("HeuristicLab.Parameters.Views", "3.3")]
    4854  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
     55  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
     56  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Regression", "3.4")]
    4957  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Views", "3.4")]
    5058  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    5159  [PluginDependency("HeuristicLab.Problems.Instances.DataAnalysis", "3.3")]
     60  [PluginDependency("HeuristicLab.Selection", "3.3")]
    5261  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions", "3.3")]
    5362  public class HeuristicLabExperimentGenerationDataAnalysisExperimentWizardPlugin : PluginBase {
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/ProblemDataPage.Designer.cs

    r7939 r7953  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       this.problemView = new HeuristicLab.Optimization.Views.ProblemView();
     26      this.label1 = new System.Windows.Forms.Label();
     27      this.txtFilePath = new System.Windows.Forms.TextBox();
     28      this.btnChooseFile = new System.Windows.Forms.Button();
     29      this.label2 = new System.Windows.Forms.Label();
     30      this.stringConvertibleMatrixView = new HeuristicLab.Data.Views.StringConvertibleMatrixView();
    2731      this.SuspendLayout();
    2832      //
     
    3034      //
    3135      this.wizardBanner.Size = new System.Drawing.Size(640, 81);
     36      this.wizardBanner.Subtitle = "Select the CSV file containing the data.";
     37      this.wizardBanner.Title = "Data File";
    3238      //
    33       // problemView
     39      // label1
    3440      //
    35       this.problemView.Caption = "Problem View";
    36       this.problemView.Content = null;
    37       this.problemView.Dock = System.Windows.Forms.DockStyle.Fill;
    38       this.problemView.Location = new System.Drawing.Point(0, 81);
    39       this.problemView.Name = "problemView";
    40       this.problemView.ReadOnly = false;
    41       this.problemView.Size = new System.Drawing.Size(640, 399);
    42       this.problemView.TabIndex = 1;
     41      this.label1.AutoSize = true;
     42      this.label1.Location = new System.Drawing.Point(3, 90);
     43      this.label1.Name = "label1";
     44      this.label1.Size = new System.Drawing.Size(95, 13);
     45      this.label1.TabIndex = 2;
     46      this.label1.Text = "Choose a CSV file:";
     47      //
     48      // txtFilePath
     49      //
     50      this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     51            | System.Windows.Forms.AnchorStyles.Right)));
     52      this.txtFilePath.Enabled = false;
     53      this.txtFilePath.Location = new System.Drawing.Point(104, 87);
     54      this.txtFilePath.Name = "txtFilePath";
     55      this.txtFilePath.Size = new System.Drawing.Size(501, 20);
     56      this.txtFilePath.TabIndex = 3;
     57      //
     58      // btnChooseFile
     59      //
     60      this.btnChooseFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     61      this.btnChooseFile.Location = new System.Drawing.Point(611, 85);
     62      this.btnChooseFile.Name = "btnChooseFile";
     63      this.btnChooseFile.Size = new System.Drawing.Size(26, 23);
     64      this.btnChooseFile.TabIndex = 4;
     65      this.btnChooseFile.Text = "...";
     66      this.btnChooseFile.UseVisualStyleBackColor = true;
     67      this.btnChooseFile.Click += new System.EventHandler(this.btnChooseFile_Click);
     68      //
     69      // label2
     70      //
     71      this.label2.AutoSize = true;
     72      this.label2.Location = new System.Drawing.Point(3, 124);
     73      this.label2.Name = "label2";
     74      this.label2.Size = new System.Drawing.Size(72, 13);
     75      this.label2.TabIndex = 5;
     76      this.label2.Text = "Preview data:";
     77      //
     78      // stringConvertibleMatrixView
     79      //
     80      this.stringConvertibleMatrixView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     81            | System.Windows.Forms.AnchorStyles.Left)
     82            | System.Windows.Forms.AnchorStyles.Right)));
     83      this.stringConvertibleMatrixView.Caption = "StringConvertibleMatrix View";
     84      this.stringConvertibleMatrixView.Content = null;
     85      this.stringConvertibleMatrixView.Location = new System.Drawing.Point(6, 140);
     86      this.stringConvertibleMatrixView.Name = "stringConvertibleMatrixView";
     87      this.stringConvertibleMatrixView.ReadOnly = false;
     88      this.stringConvertibleMatrixView.ShowRowsAndColumnsTextBox = true;
     89      this.stringConvertibleMatrixView.ShowStatisticalInformation = true;
     90      this.stringConvertibleMatrixView.Size = new System.Drawing.Size(631, 337);
     91      this.stringConvertibleMatrixView.TabIndex = 6;
    4392      //
    4493      // ProblemDataPage
     
    4695      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    4796      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    48       this.Controls.Add(this.problemView);
     97      this.Controls.Add(this.stringConvertibleMatrixView);
     98      this.Controls.Add(this.label2);
     99      this.Controls.Add(this.btnChooseFile);
     100      this.Controls.Add(this.txtFilePath);
     101      this.Controls.Add(this.label1);
    49102      this.Name = "ProblemDataPage";
    50103      this.Size = new System.Drawing.Size(640, 480);
     
    52105      this.WizardNext += new HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPageEventHandler(this.ProblemDataPage_WizardNext);
    53106      this.Controls.SetChildIndex(this.wizardBanner, 0);
    54       this.Controls.SetChildIndex(this.problemView, 0);
     107      this.Controls.SetChildIndex(this.label1, 0);
     108      this.Controls.SetChildIndex(this.txtFilePath, 0);
     109      this.Controls.SetChildIndex(this.btnChooseFile, 0);
     110      this.Controls.SetChildIndex(this.label2, 0);
     111      this.Controls.SetChildIndex(this.stringConvertibleMatrixView, 0);
    55112      this.ResumeLayout(false);
     113      this.PerformLayout();
    56114
    57115    }
     
    59117    #endregion
    60118
    61     private Optimization.Views.ProblemView problemView;
     119    private System.Windows.Forms.Label label1;
     120    private System.Windows.Forms.TextBox txtFilePath;
     121    private System.Windows.Forms.Button btnChooseFile;
     122    private System.Windows.Forms.Label label2;
     123    private Data.Views.StringConvertibleMatrixView stringConvertibleMatrixView;
    62124
    63125  }
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/ProblemDataPage.cs

    r7939 r7953  
    1 using System.ComponentModel;
     1using System;
     2using System.ComponentModel;
     3using System.Windows.Forms;
    24using HeuristicLab.Problems.DataAnalysis;
     5using HeuristicLab.Problems.Instances.DataAnalysis;
    36
    47namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard {
    58  public partial class ProblemDataPage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage {
     9    private RegressionProblem problem;
     10    private RegressionCSVInstanceProvider instanceProvider;
     11
    612    private DataAnalysisWizardContext context;
    713    public DataAnalysisWizardContext Context {
     
    1218      InitializeComponent();
    1319      this.context = context;
    14       problemView.Content = new RegressionProblem();
     20      stringConvertibleMatrixView.ReadOnly = true;
     21      problem = new RegressionProblem();
     22      instanceProvider = new RegressionCSVInstanceProvider();
    1523    }
    1624
     
    2028
    2129    private void ProblemDataPage_WizardNext(object sender, Wizard.WizardPageEventArgs e) {
    22       context.Problem = (IDataAnalysisProblem)problemView.Content;
     30      context.Problem = problem;
     31    }
     32
     33    private void btnChooseFile_Click(object sender, System.EventArgs e) {
     34      OpenFileDialog fileDialog = new OpenFileDialog();
     35      fileDialog.Filter = "csv files (*.csv)|*.csv|All files (*.*)|*.*";
     36      if (fileDialog.ShowDialog() == DialogResult.OK) {
     37        try {
     38          txtFilePath.Text = fileDialog.FileName;
     39          IRegressionProblemData problemData = instanceProvider.LoadData(fileDialog.FileName);
     40          problem.Load(problemData);
     41          stringConvertibleMatrixView.Content = problem.ProblemData.Dataset;
     42        }
     43        catch (Exception ex) {
     44          MessageBox.Show(String.Format("There was an error parsing the file: {0}", Environment.NewLine + ex.Message), "Error while parsing", MessageBoxButtons.OK, MessageBoxIcon.Error);
     45        }
     46      }
    2347    }
    2448  }
Note: See TracChangeset for help on using the changeset viewer.