Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/25/12 17:42:12 (13 years ago)
Author:
spimming
Message:

#1807:

  • adapted plugin frame
  • added new wizard page to view generated experiment
  • generate experiments in backgroundworker
Location:
branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3
Files:
6 edited

Legend:

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

    r7824 r7912  
    1414      wizard.AddPage(new SelectAnalysisPage(context));
    1515      wizard.AddPage(new WizardPage());
    16       wizard.AddPage(new MediumAnalysisPage());
     16      wizard.AddPage(new MediumAnalysisPage(context));
     17      wizard.AddPage(new ExperimentViewPage(context));
    1718
    1819    }
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/DataAnalysisWizardContext.cs

    r7824 r7912  
    11
     2using HeuristicLab.Optimization;
    23using HeuristicLab.Problems.DataAnalysis;
    34namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard {
     
    56    public IDataAnalysisProblem Problem { get; set; }
    67    public string SelectedAnalysis { get; set; }
     8    public Experiment Experiment { get; set; }
    79  }
    810}
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard.csproj

    r7824 r7912  
    3838  </PropertyGroup>
    3939  <ItemGroup>
     40    <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    4041    <Reference Include="HeuristicLab.Algorithms.DataAnalysis.Views-3.4">
    4142      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis.Views-3.4.dll</HintPath>
     
    108109    <Compile Include="DataAnalysisExperimentWizard.cs" />
    109110    <Compile Include="DataAnalysisWizardContext.cs" />
     111    <Compile Include="ExperimentViewPage.cs">
     112      <SubType>UserControl</SubType>
     113    </Compile>
     114    <Compile Include="ExperimentViewPage.Designer.cs">
     115      <DependentUpon>ExperimentViewPage.cs</DependentUpon>
     116    </Compile>
    110117    <Compile Include="ExperimentWizardMenuItem.cs" />
    111118    <Compile Include="MediumAnalysisPage.cs">
     
    142149  </ItemGroup>
    143150  <ItemGroup>
     151    <EmbeddedResource Include="ExperimentViewPage.resx">
     152      <DependentUpon>ExperimentViewPage.cs</DependentUpon>
     153    </EmbeddedResource>
    144154    <EmbeddedResource Include="MediumAnalysisPage.resx">
    145155      <DependentUpon>MediumAnalysisPage.cs</DependentUpon>
     
    156166  </ItemGroup>
    157167  <ItemGroup>
     168    <ProjectReference Include="..\..\HeuristicLab.Encodings.ParameterConfigurationTreeEncoding\3.3\HeuristicLab.Encodings.ParameterConfigurationTreeEncoding.csproj">
     169      <Project>{8BF5F8CB-C876-4EA6-B6D7-F0D8B14DDF6E}</Project>
     170      <Name>HeuristicLab.Encodings.ParameterConfigurationTreeEncoding</Name>
     171    </ProjectReference>
    158172    <ProjectReference Include="..\..\HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard\3.3\HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.csproj">
    159173      <Project>{77169FE1-C48A-49AE-A0DD-67921D7835AB}</Project>
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/MediumAnalysisPage.Designer.cs

    r7824 r7912  
    2424    /// </summary>
    2525    private void InitializeComponent() {
     26      this.progressBar1 = new System.Windows.Forms.ProgressBar();
    2627      this.label1 = new System.Windows.Forms.Label();
    2728      this.SuspendLayout();
     
    3233      this.wizardBanner.Title = "Medium Analysis";
    3334      //
     35      // progressBar1
     36      //
     37      this.progressBar1.Anchor = System.Windows.Forms.AnchorStyles.None;
     38      this.progressBar1.Location = new System.Drawing.Point(0, 143);
     39      this.progressBar1.Name = "progressBar1";
     40      this.progressBar1.Size = new System.Drawing.Size(320, 23);
     41      this.progressBar1.TabIndex = 2;
     42      //
    3443      // label1
    3544      //
    3645      this.label1.AutoSize = true;
    37       this.label1.Location = new System.Drawing.Point(106, 124);
     46      this.label1.Location = new System.Drawing.Point(0, 124);
    3847      this.label1.Name = "label1";
    3948      this.label1.Size = new System.Drawing.Size(35, 13);
    40       this.label1.TabIndex = 1;
     49      this.label1.TabIndex = 3;
    4150      this.label1.Text = "label1";
    4251      //
     
    4554      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    4655      this.Controls.Add(this.label1);
     56      this.Controls.Add(this.progressBar1);
    4757      this.Name = "MediumAnalysisPage";
     58      this.SetActive += new System.ComponentModel.CancelEventHandler(this.MediumAnalysisPage_SetActive);
    4859      this.WizardBack += new HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPageEventHandler(this.MediumAnalysisPage_WizardBack);
     60      this.Controls.SetChildIndex(this.progressBar1, 0);
    4961      this.Controls.SetChildIndex(this.label1, 0);
    5062      this.Controls.SetChildIndex(this.wizardBanner, 0);
     
    5668    #endregion
    5769
     70    private System.Windows.Forms.ProgressBar progressBar1;
    5871    private System.Windows.Forms.Label label1;
     72
    5973  }
    6074}
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/MediumAnalysisPage.cs

    r7824 r7912  
    11
     2using System.ComponentModel;
     3using System.Linq;
     4using HeuristicLab.Algorithms.DataAnalysis;
     5using HeuristicLab.Data;
     6using HeuristicLab.Encodings.ParameterConfigurationTreeEncoding;
     7using HeuristicLab.Optimization;
     8using HeuristicLab.Problems.DataAnalysis;
    29namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard {
    310  public partial class MediumAnalysisPage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage {
    4     public MediumAnalysisPage() {
     11    private BackgroundWorker worker;
     12
     13    private DataAnalysisWizardContext context;
     14    public DataAnalysisWizardContext Context {
     15      get { return context; }
     16    }
     17
     18    public MediumAnalysisPage(DataAnalysisWizardContext context) {
    519      InitializeComponent();
     20      this.context = context;
     21      worker = new BackgroundWorker();
     22      worker.DoWork += new DoWorkEventHandler(GenerateExperimentsTask);
     23      worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkerCompleted);
     24
     25    }
     26
     27    private void GenerateExperimentsTask(object sender, DoWorkEventArgs e) {
     28      DataAnalysisWizardContext c = e.Argument as DataAnalysisWizardContext;
     29      IProblem problem = c.Problem;
     30      SupportVectorRegression svr = new SupportVectorRegression();
     31      svr.Problem = (IRegressionProblem)problem;
     32      ParameterConfigurationTree vc = new ParameterConfigurationTree(svr, problem);
     33      var nuPc = vc.AlgorithmConfiguration.ParameterConfigurations.Where(x => x.ParameterName == "Nu").SingleOrDefault();
     34      nuPc.Optimize = true;
     35      var nuVc = (RangeValueConfiguration)nuPc.ValueConfigurations.First();
     36      nuVc.Optimize = true;
     37      nuVc.RangeConstraint = new DoubleValueRange(new DoubleValue(0.1), new DoubleValue(0.9), new DoubleValue(0.1));
     38
     39      var costPc = vc.AlgorithmConfiguration.ParameterConfigurations.Where(x => x.ParameterName == "Cost").SingleOrDefault();
     40      costPc.Optimize = true;
     41      var costVc = (RangeValueConfiguration)costPc.ValueConfigurations.First();
     42      costVc.Optimize = true;
     43      costVc.RangeConstraint = new DoubleValueFactorRange(new DoubleValue(0.03125), new DoubleValue(32768), new DoubleValue(4));
     44
     45      var gammaPc = vc.AlgorithmConfiguration.ParameterConfigurations.Where(x => x.ParameterName == "Gamma").SingleOrDefault();
     46      gammaPc.Optimize = true;
     47      var gammaVc = (RangeValueConfiguration)gammaPc.ValueConfigurations.First();
     48      gammaVc.Optimize = true;
     49      gammaVc.RangeConstraint = new DoubleValueFactorRange(new DoubleValue(6.10352E-05), new DoubleValue(64), new DoubleValue(4));
     50
     51      Experiment experiment = vc.GenerateExperiment(svr);
     52      e.Result = experiment;
     53    }
     54
     55    private void WorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
     56      SetWizardButton(Wizard.WizardButtons.Next);
     57      Experiment experiment = (Experiment)e.Result;
     58      context.Experiment = experiment;
    659    }
    760
     
    962      e.NewPage = "SelectAnalysisPage";
    1063    }
     64
     65    private void MediumAnalysisPage_SetActive(object sender, System.ComponentModel.CancelEventArgs e) {
     66      SetWizardButton(Wizard.WizardButtons.None);
     67      worker.RunWorkerAsync(context);
     68    }
    1169  }
    1270}
  • branches/DataAnalysisService/HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard/3.3/Plugin.cs.frame

    r7808 r7912  
    2929  [PluginFile("HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis.Views", "3.4")]
     31  [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")]
    3132  [PluginDependency("HeuristicLab.Collections", "3.3")]
    3233  [PluginDependency("HeuristicLab.Common", "3.3")]
     
    3637  [PluginDependency("HeuristicLab.Data", "3.3")]
    3738  [PluginDependency("HeuristicLab.Data.Views", "3.3")]
     39  [PluginDependency("HeuristicLab.Encodings.ParameterConfigurationTreeEncoding", "3.3")]
    3840  [PluginDependency("HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard", "3.3")]
    3941  [PluginDependency("HeuristicLab.MainForm", "3.3")]
Note: See TracChangeset for help on using the changeset viewer.