Free cookie consent management tool by TermsFeed Policy Generator

Changeset 9999


Ignore:
Timestamp:
09/23/13 08:08:55 (11 years ago)
Author:
gkronber
Message:

#2102 merged r9973:9975 and r9994 from trunk to stable

Location:
stable
Files:
1 deleted
18 edited
2 copied

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.DataAnalysis

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicClassificationSolutionView.Designer.cs

    r9456 r9999  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SymbolicDiscriminantFunctionClassificationSolutionView));
    4847      this.btnSimplify = new System.Windows.Forms.Button();
    4948      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
     
    5453      this.detailsGroupBox.SuspendLayout();
    5554      this.SuspendLayout();
     55      exportButton.Visible = false;
    5656      //
    5757      // splitContainer
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification.Views/3.4/SymbolicDiscriminantFunctionClassificationSolutionView.Designer.cs

    r9456 r9999  
    5454      this.detailsGroupBox.SuspendLayout();
    5555      this.SuspendLayout();
     56      exportButton.Visible = false;
    5657      //
    5758      // splitContainer
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionView.Designer.cs

    r9456 r9999  
    6060      //
    6161      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
    62       this.splitContainer.Size = new System.Drawing.Size(480, 275);
    63       this.splitContainer.SplitterDistance = 255;
    64       //
    65       // itemsGroupBox
    66       //
    67       this.itemsGroupBox.Size = new System.Drawing.Size(486, 294);
    68       //
    69       // itemsListView
    70       //
    71       this.itemsListView.Size = new System.Drawing.Size(249, 238);
    72       //
    73       // detailsGroupBox
    74       //
    75       this.detailsGroupBox.Size = new System.Drawing.Size(215, 246);
    7662      //
    7763      // addButton
     
    8369      this.toolTip.SetToolTip(this.removeButton, "Remove");
    8470      //
    85       // viewHost
    86       //
    87       this.viewHost.Size = new System.Drawing.Size(203, 221);
    88       //
    8971      // btnSimplify
    9072      //
    9173      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    92       this.btnSimplify.Location = new System.Drawing.Point(177, 4);
     74      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
    9375      this.btnSimplify.Name = "btnSimplify";
    9476      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
     
    10082      // SymbolicRegressionSolutionView
    10183      //
    102       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    10384      this.Name = "SymbolicRegressionSolutionView";
    10485      this.Size = new System.Drawing.Size(486, 294);
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis.Views/3.4/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs

    r9456 r9999  
    5454      this.SuspendLayout();
    5555      //
     56      // exportButton
     57      //
     58      this.exportButton.Visible = false;
     59      //
    5660      // splitContainer
    5761      //
     
    6064      //
    6165      this.splitContainer.Panel1.Controls.Add(this.btnSimplify);
    62       this.splitContainer.Size = new System.Drawing.Size(480, 275);
    63       this.splitContainer.SplitterDistance = 255;
    64       //
    65       // itemsGroupBox
    66       //
    67       this.itemsGroupBox.Size = new System.Drawing.Size(486, 294);
    68       //
    69       // itemsListView
    70       //
    71       this.itemsListView.Size = new System.Drawing.Size(249, 238);
    72       //
    73       // detailsGroupBox
    74       //
    75       this.detailsGroupBox.Size = new System.Drawing.Size(215, 246);
    7666      //
    7767      // addButton
     
    8373      this.toolTip.SetToolTip(this.removeButton, "Remove");
    8474      //
    85       // viewHost
    86       //
    87       this.viewHost.Size = new System.Drawing.Size(203, 221);
    88       //
    8975      // btnSimplify
    9076      //
    9177      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
    92       this.btnSimplify.Location = new System.Drawing.Point(177, 4);
     78      this.btnSimplify.Location = new System.Drawing.Point(172, 4);
    9379      this.btnSimplify.Name = "btnSimplify";
    9480      this.btnSimplify.Size = new System.Drawing.Size(75, 23);
     
    10086      // SymbolicTimeSeriesPrognosisSolutionView
    10187      //
    102       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    10388      this.Name = "SymbolicTimeSeriesPrognosisSolutionView";
    104       this.Size = new System.Drawing.Size(486, 294);
    10589      this.splitContainer.Panel1.ResumeLayout(false);
    10690      this.splitContainer.Panel2.ResumeLayout(false);
     
    11094      this.detailsGroupBox.ResumeLayout(false);
    11195      this.ResumeLayout(false);
     96
    11297    }
    11398
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Exporters/SymbolicSolutionExcelExporter.cs

    r9975 r9999  
    105105
    106106      modelWorksheet.Cells[row, 1].Value = "Estimation Limits Lower";
    107       modelWorksheet.Cells[row, 2].Value = solution.Model.LowerEstimationLimit;
     107      modelWorksheet.Cells[row, 2].Value = Math.Max(solution.Model.LowerEstimationLimit, -9.99999999999999E+307); // minimal value supported by excel
    108108      modelWorksheet.Names.Add("EstimationLimitLower", modelWorksheet.Cells[row, 2]);
    109       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     109      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    110110      row++;
    111111
    112112      modelWorksheet.Cells[row, 1].Value = "Estimation Limits Upper";
    113       modelWorksheet.Cells[row, 2].Value = solution.Model.UpperEstimationLimit;
     113      modelWorksheet.Cells[row, 2].Value = Math.Min(solution.Model.UpperEstimationLimit, 9.99999999999999E+307);  // maximal value supported by excel
    114114      modelWorksheet.Names.Add("EstimationLimitUpper", modelWorksheet.Cells[row, 2]);
    115       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     115      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    116116      row += 2;
    117117
     
    163163      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMSE);
    164164      modelWorksheet.Names.Add("TrainingMSE", modelWorksheet.Cells[row, 2]);
    165       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     165      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    166166      row++;
    167167
     
    169169      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMSE);
    170170      modelWorksheet.Names.Add("TestMSE", modelWorksheet.Cells[row, 2]);
    171       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     171      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    172172      row++;
    173173
    174174      modelWorksheet.Cells[row, 1].Value = "Mean absolute error (training)";
    175175      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingAbsoluteError);
    176       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     176      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    177177      row++;
    178178
    179179      modelWorksheet.Cells[row, 1].Value = "Mean absolute error (test)";
    180180      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestAbsoluteError);
    181       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     181      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    182182      row++;
    183183
    184184      modelWorksheet.Cells[row, 1].Value = "Mean error (training)";
    185185      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMeanError);
    186       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     186      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    187187      row++;
    188188
    189189      modelWorksheet.Cells[row, 1].Value = "Mean error (test)";
    190190      modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMeanError);
    191       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     191      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    192192      row++;
    193193
     
    204204      modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (training)";
    205205      modelWorksheet.Cells[row, 2].Formula = string.Format("TrainingMSE / VAR({0})", excelTrainingTarget);
    206       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     206      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    207207      row++;
    208208
    209209      modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error  (test)";
    210210      modelWorksheet.Cells[row, 2].Formula = string.Format("TestMSE / VAR({0})", excelTestTarget);
    211       modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000";
     211      modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000E+00";
    212212
    213213      modelWorksheet.Cells["A1:B" + row].AutoFitColumns();
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj

    r9931 r9999  
    108108    <Reference Include="System.Drawing" />
    109109    <Reference Include="System.Windows.Forms" />
    110     <Reference Include="System.Windows.Forms.DataVisualization" />
    111     <Reference Include="System.Xml.Linq">
    112       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    113     </Reference>
    114     <Reference Include="System.Data.DataSetExtensions">
    115       <RequiredTargetFramework>3.5</RequiredTargetFramework>
    116     </Reference>
    117     <Reference Include="System.Data" />
    118     <Reference Include="System.Xml" />
    119   </ItemGroup>
    120   <ItemGroup>
     110  </ItemGroup>
     111  <ItemGroup>
     112    <Compile Include="Exporters\SymbolicSolutionExcelExporter.cs" />
    121113    <Compile Include="InteractiveSymbolicExpressionTreeChart.cs">
    122114      <SubType>UserControl</SubType>
     
    131123      <DependentUpon>MathSymbolicDataAnalysisModelView.cs</DependentUpon>
    132124    </Compile>
    133     <Compile Include="MenuItems\ExportSymbolicSolutionToExcelMenuItem.cs" />
    134125    <Compile Include="Plugin.cs" />
    135126    <Compile Include="TextualSymbolicDataAnalysisModelView.cs">
     
    216207      <Private>False</Private>
    217208    </ProjectReference>
    218     <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
    219       <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
    220       <Name>HeuristicLab.Common.Resources-3.3</Name>
    221       <Private>False</Private>
    222     </ProjectReference>
    223209    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
    224210      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     
    266252      <Private>False</Private>
    267253    </ProjectReference>
    268     <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
    269       <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
    270       <Name>HeuristicLab.Operators-3.3</Name>
    271       <Private>False</Private>
    272     </ProjectReference>
    273     <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
    274       <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
    275       <Name>HeuristicLab.Optimization.Views-3.3</Name>
    276       <Private>False</Private>
    277     </ProjectReference>
    278254    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
    279255      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
     
    281257      <Private>False</Private>
    282258    </ProjectReference>
    283     <ProjectReference Include="..\..\HeuristicLab.Optimizer\3.3\HeuristicLab.Optimizer-3.3.csproj">
    284       <Project>{c664305e-497c-4533-a140-967dedb05c19}</Project>
    285       <Name>HeuristicLab.Optimizer-3.3</Name>
    286     </ProjectReference>
    287     <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
    288       <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
    289       <Name>HeuristicLab.Parameters-3.3</Name>
    290       <Private>False</Private>
    291     </ProjectReference>
    292     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
    293       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
    294       <Name>HeuristicLab.Persistence-3.3</Name>
    295       <Private>False</Private>
    296     </ProjectReference>
    297259    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    298260      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
     
    308270      <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
    309271      <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
    310       <Private>False</Private>
    311     </ProjectReference>
    312     <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj">
    313       <Project>{315BDA09-3F4F-49B3-9790-B37CFC1C5750}</Project>
    314       <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name>
    315272      <Private>False</Private>
    316273    </ProjectReference>
  • stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame

    r9931 r9999  
    4343  [PluginDependency("HeuristicLab.MathJax", "1.1")]
    4444  [PluginDependency("HeuristicLab.Optimization","3.3")]
    45   [PluginDependency("HeuristicLab.Optimizer","3.3")]
    4645  [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")]
    4746  [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")]
  • stable/HeuristicLab.Problems.DataAnalysis.Views

  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/CreateEnsembleMenuItem.cs

    r9932 r9999  
    3737    }
    3838    public override IEnumerable<string> Structure {
    39       get { return new string[] { "&Data Analysis" }; }
     39      get { return new string[] { "&Edit", "&Data Analysis" }; }
    4040    }
    4141    public override int Position {
  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/ShrinkDataAnalysisRunsMenuItem.cs

    r9933 r9999  
    4141    }
    4242    public override IEnumerable<string> Structure {
    43       get { return new string[] { "&Data Analysis" }; }
     43      get { return new string[] { "&Edit", "&Data Analysis" }; }
    4444    }
    4545    public override int Position {
  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.Designer.cs

    r9456 r9999  
    4444    /// </summary>
    4545    private void InitializeComponent() {
     46      this.exportButton = new System.Windows.Forms.Button();
     47      this.exportFileDialog = new System.Windows.Forms.SaveFileDialog();
    4648      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    4749      this.splitContainer.Panel1.SuspendLayout();
     
    5456      // splitContainer
    5557      //
     58      //
     59      // splitContainer.Panel2
     60      //
     61      this.splitContainer.Panel2.Controls.Add(this.exportButton);
    5662      //
    5763      // itemsGroupBox
     
    6773      this.toolTip.SetToolTip(this.removeButton, "Remove");
    6874      //
     75      // exportButton
     76      //
     77      this.exportButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     78      this.exportButton.Location = new System.Drawing.Point(215, 4);
     79      this.exportButton.Name = "exportButton";
     80      this.exportButton.Size = new System.Drawing.Size(54, 23);
     81      this.exportButton.TabIndex = 6;
     82      this.exportButton.Text = "Export";
     83      this.exportButton.UseVisualStyleBackColor = true;
     84      this.exportButton.Click += new System.EventHandler(this.exportButton_Click);
     85      //
    6986      // DataAnalysisSolutionView
    7087      //
    71       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    7288      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    7389      this.Name = "DataAnalysisSolutionView";
     
    84100    #endregion
    85101
     102    private System.Windows.Forms.SaveFileDialog exportFileDialog;
     103    protected System.Windows.Forms.Button exportButton;
     104
    86105  }
    87106}
  • stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/DataAnalysisSolutionView.cs

    r9456 r9999  
    2222using System;
    2323using System.Collections.Generic;
     24using System.ComponentModel;
    2425using System.Drawing;
    2526using System.Linq;
     
    3031using HeuristicLab.Optimization;
    3132using HeuristicLab.Optimization.Views;
     33using HeuristicLab.PluginInfrastructure;
    3234
    3335namespace HeuristicLab.Problems.DataAnalysis.Views {
     36
    3437  [View("DataAnalysisSolution View")]
    3538  [Content(typeof(DataAnalysisSolution), false)]
     
    4952      addButton.Enabled = false;
    5053      removeButton.Enabled = false;
     54      if (Content == null) {
     55        exportButton.Enabled = false;
     56      } else {
     57        exportButton.Enabled = !Locked;
     58      }
    5159    }
    5260
     
    117125      } else
    118126        base.itemsListView_SelectedIndexChanged(sender, e);
     127    }
     128
     129
     130    private void exportButton_Click(object sender, EventArgs e) {
     131      var exporters = ApplicationManager.Manager.GetInstances<IDataAnalysisSolutionExporter>()
     132        .Where(exporter => exporter.Supports(Content)).ToArray();
     133      exportFileDialog.Filter = exporters.Skip(1)
     134        .Aggregate(exporters.First().FileTypeFilter, (s, exporter) => s + "|" + exporter.FileTypeFilter);
     135      var result = exportFileDialog.ShowDialog();
     136      if (result == DialogResult.OK) {
     137
     138        var name = exportFileDialog.FileName;
     139        var selectedExporter = exporters.Single(exporter => exporter.FileTypeFilter == exportFileDialog.Filter);
     140
     141        using (BackgroundWorker bg = new BackgroundWorker()) {
     142          MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(this, "Exportion solution to " + name + ".");
     143          bg.DoWork += (_, __) => selectedExporter.Export(Content, name);
     144          bg.RunWorkerCompleted += (_, __) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(this);
     145          bg.RunWorkerAsync();
     146        }
     147      }
    119148    }
    120149
  • stable/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r9856 r9999  
    148148    </Compile>
    149149    <Compile Include="Interfaces\Classification\IDiscriminantFunctionThresholdCalculator.cs" />
     150    <Compile Include="Interfaces\IDataAnalysisSolutionExporter.cs" />
    150151    <Compile Include="Interfaces\IDependencyCalculator.cs" />
    151152    <Compile Include="Interfaces\Regression\IRegressionEnsembleModel.cs">
Note: See TracChangeset for help on using the changeset viewer.