- Timestamp:
- 09/03/13 15:46:01 (11 years ago)
- Location:
- stable
- Files:
-
- 24 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 9587,9590,9600,9607,9626,9658-9659,9699,9906
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs
r9456 r9931 376 376 } 377 377 378 p rivatevoid SaveImageAsBitmap(string filename) {378 public void SaveImageAsBitmap(string filename) { 379 379 if (tree == null) return; 380 380 Image image = new Bitmap(Width, Height); … … 386 386 } 387 387 388 p rivatevoid SaveImageAsEmf(string filename) {388 public void SaveImageAsEmf(string filename) { 389 389 if (tree == null) return; 390 390 using (Graphics g = CreateGraphics()) { -
stable/HeuristicLab.ExtLibs
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/ExportSymbolicDataAnalysisSolutions/HeuristicLab.ExtLibs merged eligible /trunk/sources/HeuristicLab.ExtLibs merged eligible /branches/Algorithms.GradientDescent/HeuristicLab.ExtLibs 5516-5520 /branches/Benchmarking/sources/HeuristicLab.ExtLibs 6917-7005 /branches/CloningRefactoring/HeuristicLab.ExtLibs 4656-4721 /branches/DataAnalysis Refactoring/HeuristicLab.ExtLibs 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.ExtLibs 5815-6180 /branches/DataAnalysis/HeuristicLab.ExtLibs 4458-4459,4462,4464 /branches/GP.Grammar.Editor/HeuristicLab.ExtLibs 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.ExtLibs 5060 /branches/NET40/sources/HeuristicLab.ExtLibs 5138-5162 /branches/ParallelEngine/HeuristicLab.ExtLibs 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.ExtLibs 7568-7810 /branches/QAPAlgorithms/HeuristicLab.ExtLibs 6350-6627 /branches/Restructure trunk solution/HeuristicLab.ExtLibs 6828 /branches/RuntimeOptimizer/HeuristicLab.ExtLibs 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.ExtLibs 7787-8333 /branches/SlaveShutdown/HeuristicLab.ExtLibs 8944-8956 /branches/SuccessProgressAnalysis/HeuristicLab.ExtLibs 5370-5682 /branches/Trunk/HeuristicLab.ExtLibs 6829-6865 /branches/UnloadJobs/HeuristicLab.ExtLibs 9168-9215 /branches/VNS/HeuristicLab.ExtLibs 5594-5752 /branches/histogram/HeuristicLab.ExtLibs 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
stable/HeuristicLab.ExtLibs.sln
r9856 r9931 40 40 EndProject 41 41 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.ALGLIB-3.7.0", "HeuristicLab.ExtLibs\HeuristicLab.ALGLIB\3.7.0\HeuristicLab.ALGLIB-3.7.0\HeuristicLab.ALGLIB-3.7.0.csproj", "{6F1D7847-D610-4E52-A184-405DAEFA41A9}" 42 EndProject 43 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EPPlus-3.1.3", "HeuristicLab.ExtLibs\HeuristicLab.EPPlus\3.1.3\EPPlus-3.1.3\EPPlus-3.1.3.csproj", "{7B288026-5502-4A39-BF41-77E086F3E4A3}" 44 EndProject 45 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EPPlus-3.1.3", "HeuristicLab.ExtLibs\HeuristicLab.EPPlus\3.1.3\HeuristicLab.EPPlus-3.1.3\HeuristicLab.EPPlus-3.1.3.csproj", "{B8B9E73B-18DE-4781-8F31-D3472BA9DB66}" 42 46 EndProject 43 47 Global … … 255 259 {6F1D7847-D610-4E52-A184-405DAEFA41A9}.Release|x86.ActiveCfg = Release|x86 256 260 {6F1D7847-D610-4E52-A184-405DAEFA41A9}.Release|x86.Build.0 = Release|x86 261 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 262 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|Any CPU.Build.0 = Debug|Any CPU 263 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|x64.ActiveCfg = Debug|x64 264 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|x64.Build.0 = Debug|x64 265 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|x86.ActiveCfg = Debug|x86 266 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Debug|x86.Build.0 = Debug|x86 267 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|Any CPU.ActiveCfg = Release|Any CPU 268 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|Any CPU.Build.0 = Release|Any CPU 269 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|x64.ActiveCfg = Release|x64 270 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|x64.Build.0 = Release|x64 271 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|x86.ActiveCfg = Release|x86 272 {7B288026-5502-4A39-BF41-77E086F3E4A3}.Release|x86.Build.0 = Release|x86 273 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 274 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|Any CPU.Build.0 = Debug|Any CPU 275 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|x64.ActiveCfg = Debug|x64 276 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|x64.Build.0 = Debug|x64 277 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|x86.ActiveCfg = Debug|x86 278 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Debug|x86.Build.0 = Debug|x86 279 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|Any CPU.ActiveCfg = Release|Any CPU 280 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|Any CPU.Build.0 = Release|Any CPU 281 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x64.ActiveCfg = Release|x64 282 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x64.Build.0 = Release|x64 283 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x86.ActiveCfg = Release|x86 284 {B8B9E73B-18DE-4781-8F31-D3472BA9DB66}.Release|x86.Build.0 = Release|x86 257 285 EndGlobalSection 258 286 GlobalSection(SolutionProperties) = preSolution -
stable/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/EPPlus-3.1.3/EPPlus-3.1.3.csproj
r9587 r9931 48 48 <DebugType>full</DebugType> 49 49 <Optimize>false</Optimize> 50 <OutputPath> ..\..\..\..\..\..\trunk\sources\bin\</OutputPath>50 <OutputPath>$(SolutionDir)\bin\</OutputPath> 51 51 <DefineConstants>DEBUG;TRACE</DefineConstants> 52 52 <ErrorReport>prompt</ErrorReport> … … 59 59 <DebugType>pdbonly</DebugType> 60 60 <Optimize>true</Optimize> 61 <OutputPath> ..\..\..\..\..\..\trunk\sources\bin\</OutputPath>61 <OutputPath>$(SolutionDir)\bin\</OutputPath> 62 62 <DefineConstants>TRACE</DefineConstants> 63 63 <ErrorReport>prompt</ErrorReport> … … 70 70 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> 71 71 <DebugSymbols>true</DebugSymbols> 72 <OutputPath> ..\..\..\..\bin\</OutputPath>72 <OutputPath>$(SolutionDir)\bin\</OutputPath> 73 73 <DefineConstants>DEBUG;TRACE</DefineConstants> 74 74 <DocumentationFile> … … 80 80 </PropertyGroup> 81 81 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> 82 <OutputPath> ..\..\..\..\bin\</OutputPath>82 <OutputPath>$(SolutionDir)\bin\</OutputPath> 83 83 <DefineConstants>TRACE</DefineConstants> 84 84 <DocumentationFile> … … 92 92 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> 93 93 <DebugSymbols>true</DebugSymbols> 94 <OutputPath> ..\..\..\..\bin\</OutputPath>94 <OutputPath>$(SolutionDir)\bin\</OutputPath> 95 95 <DefineConstants>DEBUG;TRACE</DefineConstants> 96 96 <DocumentationFile> … … 102 102 </PropertyGroup> 103 103 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> 104 <OutputPath> ..\..\..\..\bin\</OutputPath>104 <OutputPath>$(SolutionDir)\bin\</OutputPath> 105 105 <DefineConstants>TRACE</DefineConstants> 106 106 <DocumentationFile> … … 167 167 <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithStdDev.cs" /> 168 168 <Compile Include="ConditionalFormatting\Contracts\IExcelConditionalFormattingWithText.cs" /> 169 <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconData BarValue.cs" />169 <Compile Include="ConditionalFormatting\ExcelConditionalFormattingIconDatabarValue.cs" /> 170 170 <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingDataBar.cs" /> 171 171 <Compile Include="ConditionalFormatting\Rules\ExcelConditionalFormattingFiveIconSet.cs" /> … … 321 321 <Compile Include="VBA\ExcelVbaModule.cs" /> 322 322 <Compile Include="VBA\ExcelVbaModuleAttribute.cs" /> 323 <Compile Include="VBA\ExcelV baModuleCollection.cs" />324 <Compile Include="VBA\ExcelV baProject.cs" />323 <Compile Include="VBA\ExcelVBAModuleCollection.cs" /> 324 <Compile Include="VBA\ExcelVBAProject.cs" /> 325 325 <Compile Include="ExcelWorkbookView.cs" /> 326 326 <Compile Include="ExcelWorksheetView.cs" /> … … 372 372 <Compile Include="Utils\SqRefUtility.cs" /> 373 373 <Compile Include="VBA\ExcelVbaProtection.cs" /> 374 <Compile Include="VBA\ExcelV baReference.cs" />375 <Compile Include="VBA\ExcelV baSignature.cs" />374 <Compile Include="VBA\ExcelVBAReference.cs" /> 375 <Compile Include="VBA\ExcelVBASignature.cs" /> 376 376 <Compile Include="XmlHelper.cs" /> 377 377 <Compile Include="XmlHelperFactory.cs" /> -
stable/HeuristicLab.ExtLibs/HeuristicLab.EPPlus/3.1.3/HeuristicLab.EPPlus-3.1.3/HeuristicLab.EPPlus-3.1.3.csproj
r9587 r9931 18 18 <DebugType>full</DebugType> 19 19 <Optimize>false</Optimize> 20 <OutputPath>..\..\..\..\ ..\..\trunk\sources\bin\</OutputPath>20 <OutputPath>..\..\..\..\bin\</OutputPath> 21 21 <DefineConstants>DEBUG;TRACE</DefineConstants> 22 22 <ErrorReport>prompt</ErrorReport> … … 26 26 <DebugType>pdbonly</DebugType> 27 27 <Optimize>true</Optimize> 28 <OutputPath>..\..\..\..\ ..\..\trunk\sources\bin\</OutputPath>28 <OutputPath>..\..\..\..\bin\</OutputPath> 29 29 <DefineConstants>TRACE</DefineConstants> 30 30 <ErrorReport>prompt</ErrorReport> … … 92 92 <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project> 93 93 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 94 <Private>False</Private> 94 95 </ProjectReference> 95 96 <ProjectReference Include="..\EPPlus-3.1.3\EPPlus-3.1.3.csproj"> … … 105 106 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 106 107 <PropertyGroup> 107 <PreBuildEvent >set Path=%25Path%25;$(ProjectDir);$(SolutionDir)108 <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir) 108 109 set ProjectDir=$(ProjectDir) 109 110 set SolutionDir=$(SolutionDir) 110 111 set Outdir=$(Outdir) 111 112 112 call PreBuildEvent.cmd</PreBuildEvent> 113 call PreBuildEvent.cmd 114 </PreBuildEvent> 115 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' "> 116 export ProjectDir=$(ProjectDir) 117 export SolutionDir=$(SolutionDir) 118 119 $SolutionDir/PreBuildEvent.sh 120 </PreBuildEvent> 113 121 </PropertyGroup> 114 122 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
stable/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ControlExtensions.cs
r9456 r9931 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Runtime.InteropServices; 24 25 using System.Windows.Forms; … … 45 46 } 46 47 } 48 49 public static IEnumerable<Control> GetNestedControls(this Control control, Func<Control, bool> condition = null) { 50 if (control == null) yield break; 51 if (condition == null) condition = (c) => true; 52 53 Queue<Control> unprocessed = new Queue<Control>(); 54 unprocessed.Enqueue(control); 55 56 while (unprocessed.Count > 0) { 57 Control c = unprocessed.Dequeue(); 58 if (condition(c)) yield return c; 59 foreach (Control child in c.Controls) 60 unprocessed.Enqueue(child); 61 } 62 } 47 63 } 48 64 } -
stable/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.cs
r9456 r9931 386 386 ToolStripMenuItem item = new ToolStripMenuItem(); 387 387 this.SetToolStripItemProperties(item, menuItem); 388 this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items); 388 389 if (menuItem is MenuItem) { 389 390 MenuItem menuItemBase = (MenuItem)menuItem; … … 392 393 item.DisplayStyle = menuItemBase.ToolStripItemDisplayStyle; 393 394 } 394 this.InsertItem(menuItem.Structure, typeof(ToolStripMenuItem), item, menuStrip.Items);395 395 } 396 396 -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification (added) merged: 9587
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/Interfaces/ISymbolicClassificationModel.cs
r9456 r9931 23 23 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Classification { 24 24 public interface ISymbolicClassificationModel : IClassificationModel, ISymbolicDataAnalysisModel { 25 double LowerEstimationLimit { get; }26 double UpperEstimationLimit { get; }27 25 void RecalculateModelParameters(IClassificationProblemData problemData, IEnumerable<int> rows); 28 26 new ISymbolicClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData); -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Classification/3.4/SymbolicClassificationModel.cs
r9456 r9931 32 32 [StorableClass] 33 33 [Item(Name = "SymbolicClassificationModel", Description = "Represents a symbolic classification model.")] 34 public abstract class 35 SymbolicClassificationModel : SymbolicDataAnalysisModel, ISymbolicClassificationModel { 36 [Storable] 37 private double lowerEstimationLimit; 38 public double LowerEstimationLimit { get { return lowerEstimationLimit; } } 39 [Storable] 40 private double upperEstimationLimit; 41 public double UpperEstimationLimit { get { return upperEstimationLimit; } } 34 public abstract class SymbolicClassificationModel : SymbolicDataAnalysisModel, ISymbolicClassificationModel { 42 35 43 36 [StorableConstructor] 44 37 protected SymbolicClassificationModel(bool deserializing) : base(deserializing) { } 45 protected SymbolicClassificationModel(SymbolicClassificationModel original, Cloner cloner) 46 : base(original, cloner) { 47 lowerEstimationLimit = original.lowerEstimationLimit; 48 upperEstimationLimit = original.upperEstimationLimit; 49 } 50 protected SymbolicClassificationModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) 51 : base(tree, interpreter) { 52 this.lowerEstimationLimit = lowerEstimationLimit; 53 this.upperEstimationLimit = upperEstimationLimit; 54 } 38 protected SymbolicClassificationModel(SymbolicClassificationModel original, Cloner cloner) : base(original, cloner) { } 39 protected SymbolicClassificationModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, 40 double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) 41 : base(tree, interpreter, lowerEstimationLimit, upperEstimationLimit) { } 55 42 56 43 public abstract IEnumerable<double> GetEstimatedClassValues(Dataset dataset, IEnumerable<int> rows); -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression (added) merged: 9587
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/Interfaces/ISymbolicRegressionModel.cs
r9456 r9931 22 22 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression { 23 23 public interface ISymbolicRegressionModel : IRegressionModel, ISymbolicDataAnalysisModel { 24 double LowerEstimationLimit { get; }25 double UpperEstimationLimit { get; }26 27 24 void Scale(IRegressionProblemData problemData); 28 25 } -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionModel.cs
r9456 r9931 33 33 [Item(Name = "Symbolic Regression Model", Description = "Represents a symbolic regression model.")] 34 34 public class SymbolicRegressionModel : SymbolicDataAnalysisModel, ISymbolicRegressionModel { 35 [Storable] 36 private double lowerEstimationLimit; 37 public double LowerEstimationLimit { get { return lowerEstimationLimit; } } 38 [Storable] 39 private double upperEstimationLimit; 40 public double UpperEstimationLimit { get { return upperEstimationLimit; } } 35 41 36 42 37 [StorableConstructor] 43 38 protected SymbolicRegressionModel(bool deserializing) : base(deserializing) { } 44 protected SymbolicRegressionModel(SymbolicRegressionModel original, Cloner cloner) 45 : base(original, cloner) { 46 this.lowerEstimationLimit = original.lowerEstimationLimit; 47 this.upperEstimationLimit = original.upperEstimationLimit; 48 } 39 protected SymbolicRegressionModel(SymbolicRegressionModel original, Cloner cloner) : base(original, cloner) { } 40 49 41 public SymbolicRegressionModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, 50 42 double lowerEstimationLimit = double.MinValue, double upperEstimationLimit = double.MaxValue) 51 : base(tree, interpreter) { 52 this.lowerEstimationLimit = lowerEstimationLimit; 53 this.upperEstimationLimit = upperEstimationLimit; 54 } 43 : base(tree, interpreter, lowerEstimationLimit, upperEstimationLimit) { } 55 44 56 45 public override IDeepCloneable Clone(Cloner cloner) { … … 60 49 public IEnumerable<double> GetEstimatedValues(Dataset dataset, IEnumerable<int> rows) { 61 50 return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows) 62 .LimitToRange( lowerEstimationLimit, upperEstimationLimit);51 .LimitToRange(LowerEstimationLimit, UpperEstimationLimit); 63 52 } 64 53 -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisModel.cs
r9462 r9931 23 23 public interface ISymbolicTimeSeriesPrognosisModel : ITimeSeriesPrognosisModel, ISymbolicDataAnalysisModel { 24 24 new ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter Interpreter { get; } 25 double LowerEstimationLimit { get; }26 double UpperEstimationLimit { get; }27 25 } 28 26 } -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Views-3.4.csproj
r9288 r9931 97 97 <Private>False</Private> 98 98 </Reference> 99 <Reference Include="EPPlus-3.1.3, Version=3.1.3.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL"> 100 <SpecificVersion>False</SpecificVersion> 101 <HintPath>..\..\bin\EPPlus-3.1.3.dll</HintPath> 102 <Private>False</Private> 103 </Reference> 99 104 <Reference Include="System" /> 100 105 <Reference Include="System.Core"> … … 126 131 <DependentUpon>MathSymbolicDataAnalysisModelView.cs</DependentUpon> 127 132 </Compile> 133 <Compile Include="MenuItems\ExportSymbolicSolutionToExcelMenuItem.cs" /> 128 134 <Compile Include="Plugin.cs" /> 129 135 <Compile Include="TextualSymbolicDataAnalysisModelView.cs"> … … 274 280 <Name>HeuristicLab.Optimization-3.3</Name> 275 281 <Private>False</Private> 282 </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> 276 286 </ProjectReference> 277 287 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj"> -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MenuItems/ExportSymbolicSolutionToExcelMenuItem.cs
r9587 r9931 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.ComponentModel; 24 25 using System.IO; 25 26 using System.Linq; … … 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 28 29 using HeuristicLab.MainForm; 30 using HeuristicLab.MainForm.WindowsForms; 29 31 using HeuristicLab.Optimizer; 30 32 using OfficeOpenXml; … … 52 54 53 55 protected override void OnToolStripItemSet(EventArgs e) { 56 base.OnToolStripItemSet(e); 54 57 ToolStripItem.Enabled = false; 55 } 56 protected override void OnActiveViewChanged(object sender, EventArgs e) { 58 var menuItem = ToolStripItem.OwnerItem as ToolStripMenuItem; 59 if (menuItem != null) 60 menuItem.DropDownOpening += menuItem_DropDownOpening; 61 } 62 63 private void menuItem_DropDownOpening(object sender, EventArgs e) { 57 64 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 58 ToolStripItem.Enabled = activeView != null && activeView.Content is ISymbolicDataAnalysisSolution; 65 Control control = activeView as Control; 66 activeView = control.GetNestedControls((c) => c.Visible) 67 .OfType<IContentView>().FirstOrDefault(v => v.Content is ISymbolicDataAnalysisSolution && v.Content is IRegressionSolution); 68 ToolStripItem.Enabled = activeView != null; 59 69 } 60 70 61 71 public override void Execute() { 62 var activeView = (IContentView)MainFormManager.MainForm.ActiveView; 72 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 73 Control control = activeView as Control; 74 activeView = control.GetNestedControls((c) => c.Visible) 75 .OfType<IContentView>().First(v => v.Content is ISymbolicDataAnalysisSolution && v.Content is IRegressionSolution); 63 76 var solution = (ISymbolicDataAnalysisSolution)activeView.Content; 64 77 var formatter = new SymbolicDataAnalysisExpressionExcelFormatter(); 65 var formula = formatter.Format(solution.Model.SymbolicExpressionTree); 66 var formulaParts = formula.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); 78 var formula = formatter.Format(solution.Model.SymbolicExpressionTree, solution.ProblemData.Dataset); 79 control = (Control)activeView; 80 67 81 68 82 SaveFileDialog saveFileDialog = new SaveFileDialog(); … … 71 85 if (saveFileDialog.ShowDialog() == DialogResult.OK) { 72 86 string fileName = saveFileDialog.FileName; 73 FileInfo newFile = new FileInfo(fileName); 74 if (newFile.Exists) { 75 newFile.Delete(); 76 newFile = new FileInfo(fileName); 87 using (BackgroundWorker bg = new BackgroundWorker()) { 88 MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().AddOperationProgressToView(control, "Exportion solution to " + fileName + "."); 89 bg.DoWork += (b, e) => ExportChart(fileName, solution, formula); 90 bg.RunWorkerCompleted += (o, e) => MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>().RemoveOperationProgressFromView(control); 91 bg.RunWorkerAsync(); 77 92 } 78 using (ExcelPackage package = new ExcelPackage(newFile)) { 79 ExcelWorksheet modelWorksheet = package.Workbook.Worksheets.Add("Model"); 80 FormatModelSheet(modelWorksheet, solution, formulaParts); 81 82 ExcelWorksheet datasetWorksheet = package.Workbook.Worksheets.Add("Dataset"); 83 WriteDatasetToExcel(datasetWorksheet, solution.ProblemData); 84 85 ExcelWorksheet inputsWorksheet = package.Workbook.Worksheets.Add("Inputs"); 86 WriteInputSheet(inputsWorksheet, datasetWorksheet, formulaParts.Skip(2), solution.ProblemData.Dataset); 87 88 if (solution is IRegressionSolution) { 89 ExcelWorksheet estimatedWorksheet = package.Workbook.Worksheets.Add("Estimated Values"); 90 WriteEstimatedWorksheet(estimatedWorksheet, datasetWorksheet, formulaParts, solution as IRegressionSolution); 91 92 ExcelWorksheet chartsWorksheet = package.Workbook.Worksheets.Add("Charts"); 93 AddCharts(chartsWorksheet); 94 } 95 package.Workbook.Properties.Title = "Excel Export"; 96 package.Workbook.Properties.Author = "HEAL"; 97 package.Workbook.Properties.Comments = "Excel export of a symbolic data analysis solution from HeuristicLab"; 98 99 package.Save(); 93 } 94 } 95 96 private void ExportChart(string fileName, ISymbolicDataAnalysisSolution solution, string formula) { 97 FileInfo newFile = new FileInfo(fileName); 98 if (newFile.Exists) { 99 newFile.Delete(); 100 newFile = new FileInfo(fileName); 101 } 102 var formulaParts = formula.Split(new string[] { Environment.NewLine }, StringSplitOptions.None); 103 104 using (ExcelPackage package = new ExcelPackage(newFile)) { 105 ExcelWorksheet modelWorksheet = package.Workbook.Worksheets.Add("Model"); 106 FormatModelSheet(modelWorksheet, solution, formulaParts); 107 108 ExcelWorksheet datasetWorksheet = package.Workbook.Worksheets.Add("Dataset"); 109 WriteDatasetToExcel(datasetWorksheet, solution.ProblemData); 110 111 ExcelWorksheet inputsWorksheet = package.Workbook.Worksheets.Add("Inputs"); 112 WriteInputSheet(inputsWorksheet, datasetWorksheet, formulaParts.Skip(2), solution.ProblemData.Dataset); 113 114 if (solution is IRegressionSolution) { 115 ExcelWorksheet estimatedWorksheet = package.Workbook.Worksheets.Add("Estimated Values"); 116 WriteEstimatedWorksheet(estimatedWorksheet, datasetWorksheet, formulaParts, solution as IRegressionSolution); 117 118 ExcelWorksheet chartsWorksheet = package.Workbook.Worksheets.Add("Charts"); 119 AddCharts(chartsWorksheet); 100 120 } 121 package.Workbook.Properties.Title = "Excel Export"; 122 package.Workbook.Properties.Author = "HEAL"; 123 package.Workbook.Properties.Comments = "Excel export of a symbolic data analysis solution from HeuristicLab"; 124 125 package.Save(); 101 126 } 102 127 } … … 124 149 modelWorksheet.Cells[row, 2].Value = solution.Model.LowerEstimationLimit; 125 150 modelWorksheet.Names.Add("EstimationLimitLower", modelWorksheet.Cells[row, 2]); 151 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 126 152 row++; 127 153 … … 129 155 modelWorksheet.Cells[row, 2].Value = solution.Model.UpperEstimationLimit; 130 156 modelWorksheet.Names.Add("EstimationLimitUpper", modelWorksheet.Cells[row, 2]); 157 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 131 158 row += 2; 132 159 … … 167 194 modelWorksheet.Cells[row, 1].Value = "Pearson's R² (training)"; 168 195 modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTrainingTarget, excelTrainingEstimated); 196 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 169 197 row++; 170 198 171 199 modelWorksheet.Cells[row, 1].Value = "Pearson's R² (test)"; 172 200 modelWorksheet.Cells[row, 2].Formula = string.Format("POWER(PEARSON({0},{1}),2)", excelTestTarget, excelTestEstimated); 201 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 173 202 row++; 174 203 … … 176 205 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMSE); 177 206 modelWorksheet.Names.Add("TrainingMSE", modelWorksheet.Cells[row, 2]); 207 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 178 208 row++; 179 209 … … 181 211 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMSE); 182 212 modelWorksheet.Names.Add("TestMSE", modelWorksheet.Cells[row, 2]); 213 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 183 214 row++; 184 215 185 216 modelWorksheet.Cells[row, 1].Value = "Mean absolute error (training)"; 186 217 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingAbsoluteError); 218 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 187 219 row++; 188 220 189 221 modelWorksheet.Cells[row, 1].Value = "Mean absolute error (test)"; 190 222 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestAbsoluteError); 223 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 191 224 row++; 192 225 193 226 modelWorksheet.Cells[row, 1].Value = "Mean error (training)"; 194 227 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTrainingMeanError); 228 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 195 229 row++; 196 230 197 231 modelWorksheet.Cells[row, 1].Value = "Mean error (test)"; 198 232 modelWorksheet.Cells[row, 2].Formula = string.Format("AVERAGE({0})", excelTestMeanError); 233 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 199 234 row++; 200 235 … … 211 246 modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (training)"; 212 247 modelWorksheet.Cells[row, 2].Formula = string.Format("TrainingMSE / VAR({0})", excelTrainingTarget); 248 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 213 249 row++; 214 250 215 251 modelWorksheet.Cells[row, 1].Value = "Normalized Mean Squared error (test)"; 216 252 modelWorksheet.Cells[row, 2].Formula = string.Format("TestMSE / VAR({0})", excelTestTarget); 253 modelWorksheet.Cells[row, 2].Style.Numberformat.Format = "0.000"; 217 254 218 255 modelWorksheet.Cells["A1:B" + row].AutoFitColumns(); … … 300 337 estimatedWorksheet.Cells[i + 2, 9].Formula = string.Format(preparedFormula, i + 2); 301 338 } 339 estimatedWorksheet.Cells["B2:B" + (rows + 1)].Style.Numberformat.Format = "0.000"; 302 340 303 341 estimatedWorksheet.Cells["C2:C" + (rows + 1)].Formula = "J2"; 304 342 estimatedWorksheet.Cells["C2:C" + (rows + 1)].Style.Numberformat.Format = "0.000"; 305 343 estimatedWorksheet.Cells["D2:D" + (rows + 1)].Formula = "ABS(B2 - C2)"; 306 estimatedWorksheet.Cells["E2:E" + (rows + 1)].Formula = "D2 / B2"; 344 estimatedWorksheet.Cells["D2:D" + (rows + 1)].Style.Numberformat.Format = "0.000"; 345 estimatedWorksheet.Cells["E2:E" + (rows + 1)].Formula = "ABS(D2 / B2)"; 346 estimatedWorksheet.Cells["E2:E" + (rows + 1)].Style.Numberformat.Format = "0.000"; 307 347 estimatedWorksheet.Cells["F2:F" + (rows + 1)].Formula = "C2 - B2"; 348 estimatedWorksheet.Cells["F2:F" + (rows + 1)].Style.Numberformat.Format = "0.000"; 308 349 estimatedWorksheet.Cells["G2:G" + (rows + 1)].Formula = "POWER(F2, 2)"; 309 350 estimatedWorksheet.Cells["G2:G" + (rows + 1)].Style.Numberformat.Format = "0.000"; 351 352 estimatedWorksheet.Cells["I2:I" + (rows + 1)].Style.Numberformat.Format = "0.000"; 310 353 estimatedWorksheet.Cells["J2:J" + (rows + 1)].Formula = "IFERROR(IF(I2 > Model!EstimationLimitUpper, Model!EstimationLimitUpper, IF(I2 < Model!EstimationLimitLower, Model!EstimationLimitLower, I2)), AVERAGE(Model!EstimationLimitLower, Model!EstimationLimitUpper))"; 354 estimatedWorksheet.Cells["J2:J" + (rows + 1)].Style.Numberformat.Format = "0.000"; 311 355 } 312 356 … … 322 366 323 367 private void WriteInputSheet(ExcelWorksheet inputsWorksheet, ExcelWorksheet datasetWorksheet, IEnumerable<string> list, Dataset dataset) { 324 int rows = dataset.Rows; 325 var variableNames = dataset.VariableNames.ToList(); 326 int cur = 1; 327 foreach (var variableMapping in list) { 328 var varMap = variableMapping.Split(new string[] { " = " }, StringSplitOptions.None); 329 if (varMap.Count() != 2) throw new ArgumentException("variableMapping is not correct"); 330 int column = variableNames.FindIndex(x => x.Equals(varMap[0])) + 1; 331 inputsWorksheet.Cells[1, cur].Value = varMap[0]; 332 for (int i = 2; i <= rows + 1; i++) { 333 inputsWorksheet.Cells[i, cur].Formula = datasetWorksheet.Cells[i, column].FullAddress; 368 //remark the performance of EPPlus drops dramatically 369 //if the data is not written row wise (from left to right) due the internal indices used. 370 var variableNames = dataset.VariableNames.Select((v, i) => new { variable = v, index = i + 1 }).ToDictionary(v => v.variable, v => v.index); 371 var nameMapping = list.Select(x => x.Split('=')[0].Trim()).ToArray(); 372 373 for (int row = 1; row <= dataset.Rows + 1; row++) { 374 for (int column = 1; column < nameMapping.Length + 1; column++) { 375 int variableIndex = variableNames[nameMapping[column - 1]]; 376 inputsWorksheet.Cells[row, column].Formula = datasetWorksheet.Cells[row, variableIndex].FullAddress; 334 377 } 335 cur++;336 378 } 337 379 } 338 380 339 381 private void WriteDatasetToExcel(ExcelWorksheet datasetWorksheet, IDataAnalysisProblemData problemData) { 382 //remark the performance of EPPlus drops dramatically 383 //if the data is not written row wise (from left to right) due the internal indices used. 340 384 Dataset dataset = problemData.Dataset; 341 385 var variableNames = dataset.VariableNames.ToList(); 342 for (int col = 1; col <= variableNames.Count; col++) { 386 var doubleVariables = new HashSet<string>(dataset.DoubleVariables); 387 388 for (int col = 1; col <= variableNames.Count; col++) 343 389 datasetWorksheet.Cells[1, col].Value = variableNames[col - 1]; 344 if (dataset.DoubleVariables.Contains(variableNames[col - 1])) { 345 datasetWorksheet.Cells[2, col].LoadFromCollection(dataset.GetDoubleValues(variableNames[col - 1])); 346 } else { 347 var coll = Enumerable.Range(0, dataset.Rows).Select(x => dataset.GetValue(x, col - 1)); 348 datasetWorksheet.Cells[2, col].LoadFromCollection(coll); 390 391 for (int row = 0; row < dataset.Rows; row++) { 392 for (int col = 0; col < variableNames.Count; col++) { 393 if (doubleVariables.Contains(variableNames[col])) 394 datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetDoubleValue(variableNames[col], row); 395 else 396 datasetWorksheet.Cells[row + 2, col + 1].Value = dataset.GetValue(row, col); 349 397 } 350 398 } -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Plugin.cs.frame
r9462 r9931 36 36 [PluginDependency("HeuristicLab.Data", "3.3")] 37 37 [PluginDependency("HeuristicLab.Data.Views", "3.3")] 38 [PluginDependency("HeuristicLab.EPPlus", "3.1")] 38 39 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")] 39 40 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")] … … 42 43 [PluginDependency("HeuristicLab.MathJax", "1.1")] 43 44 [PluginDependency("HeuristicLab.Optimization","3.3")] 45 [PluginDependency("HeuristicLab.Optimizer","3.3")] 44 46 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 45 47 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Formatters/SymbolicDataAnalysisExpressionExcelFormatter.cs
r9587 r9931 23 23 using System.Collections.Generic; 24 24 using System.Globalization; 25 using System.Linq; 25 26 using System.Text; 26 27 using HeuristicLab.Common; … … 66 67 return string.Format("${0}1", variableNameMapping[variabelName]); 67 68 } 68 69 69 public string Format(ISymbolicExpressionTree symbolicExpressionTree) { 70 return Format(symbolicExpressionTree, null); 71 } 72 73 public string Format(ISymbolicExpressionTree symbolicExpressionTree, Dataset dataset) { 70 74 var stringBuilder = new StringBuilder(); 75 if (dataset != null) CalculateVariableMapping(symbolicExpressionTree, dataset); 76 71 77 stringBuilder.Append("="); 72 78 stringBuilder.Append(FormatRecursively(symbolicExpressionTree.Root)); 79 73 80 foreach (var variable in variableNameMapping) { 74 81 stringBuilder.AppendLine(); … … 76 83 } 77 84 return stringBuilder.ToString(); 85 } 86 87 private void CalculateVariableMapping(ISymbolicExpressionTree tree, Dataset dataset) { 88 int columnIndex = 0; 89 int inputIndex = 0; 90 var usedVariables = tree.IterateNodesPrefix().OfType<VariableTreeNode>().Select(v => v.VariableName).Distinct(); 91 foreach (var variable in dataset.VariableNames) { 92 columnIndex++; 93 if (!usedVariables.Contains(variable)) continue; 94 inputIndex++; 95 variableNameMapping[variable] = GetExcelColumnName(inputIndex); 96 } 78 97 } 79 98 … … 137 156 stringBuilder.Append(")"); 138 157 } else if (symbol is Logarithm) { 139 stringBuilder.Append("L OG(");140 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 141 stringBuilder.Append(" , EXP(1))"); // Excel does not use the natural logarithm, therefor the base has to be set158 stringBuilder.Append("LN("); 159 stringBuilder.Append(FormatRecursively(node.GetSubtree(0))); 160 stringBuilder.Append(")"); 142 161 } else if (symbol is Multiplication) { 143 162 for (int i = 0; i < node.SubtreeCount; i++) { -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r9862 r9931 139 139 <Compile Include="Crossovers\SymbolicDataAnalysisExpressionProbabilisticFunctionalCrossover.cs" /> 140 140 <Compile Include="Crossovers\SymbolicDataAnalysisExpressionSemanticSimilarityCrossover.cs" /> 141 <Compile Include="Formatters\SymbolicDataAnalysisExpressionSmalltalkFormatter.cs" /> 141 <Compile Include="Formatters\SymbolicDataAnalysisExpressionExcelFormatter.cs" /> 142 <Compile Include="Formatters\SymbolicDataAnalysisExpressionSmalltalkFormatter.cs" /> 142 143 <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionCrossover.cs" /> 143 144 <Compile Include="Interfaces\ISymbolicDataAnalysisImpactValuesCalculator.cs" /> -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interfaces/ISymbolicDataAnalysisModel.cs
r9456 r9931 25 25 ISymbolicExpressionTree SymbolicExpressionTree { get; } 26 26 ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter { get; } 27 28 double LowerEstimationLimit { get; } 29 double UpperEstimationLimit { get; } 27 30 } 28 31 } -
stable/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisModel.cs
r9456 r9931 38 38 39 39 #region properties 40 [Storable] 41 private double lowerEstimationLimit; 42 public double LowerEstimationLimit { get { return lowerEstimationLimit; } } 43 [Storable] 44 private double upperEstimationLimit; 45 public double UpperEstimationLimit { get { return upperEstimationLimit; } } 40 46 41 47 [Storable] … … 50 56 get { return interpreter; } 51 57 } 52 53 58 #endregion 54 59 … … 59 64 this.symbolicExpressionTree = cloner.Clone(original.symbolicExpressionTree); 60 65 this.interpreter = cloner.Clone(original.interpreter); 66 this.lowerEstimationLimit = original.lowerEstimationLimit; 67 this.upperEstimationLimit = original.upperEstimationLimit; 61 68 } 62 public SymbolicDataAnalysisModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter) 69 protected SymbolicDataAnalysisModel(ISymbolicExpressionTree tree, ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, 70 double lowerEstimationLimit, double upperEstimationLimit) 63 71 : base() { 64 72 this.name = ItemName; … … 66 74 this.symbolicExpressionTree = tree; 67 75 this.interpreter = interpreter; 76 this.lowerEstimationLimit = lowerEstimationLimit; 77 this.upperEstimationLimit = upperEstimationLimit; 68 78 } 69 79
Note: See TracChangeset
for help on using the changeset viewer.