Changeset 11594 for branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Exporters
- Timestamp:
- 11/27/14 11:23:37 (10 years ago)
- Location:
- branches/Breadcrumbs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests23 Google.ProtocolBuffers-2.4.1.473.dll
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
-
branches/Breadcrumbs/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Exporters/SymbolicSolutionExcelExporter.cs
r9994 r11594 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views { 31 31 public class SymbolicSolutionExcelExporter : IDataAnalysisSolutionExporter { 32 pr ivateconst string TRAININGSTART = "TrainingStart";33 pr ivateconst string TRAININGEND = "TrainingEnd";34 pr ivateconst string TESTSTART = "TestStart";35 pr ivateconst string TESTEND = "TestEnd";32 protected const string TRAININGSTART = "TrainingStart"; 33 protected const string TRAININGEND = "TrainingEnd"; 34 protected const string TESTSTART = "TestStart"; 35 protected const string TESTEND = "TestEnd"; 36 36 37 37 … … 44 44 } 45 45 46 public v oid Export(IDataAnalysisSolution solution, string fileName) {46 public virtual void Export(IDataAnalysisSolution solution, string fileName) { 47 47 var symbSolution = solution as ISymbolicDataAnalysisSolution; 48 48 if (symbSolution == null) throw new NotSupportedException("This solution cannot be exported to Excel"); … … 216 216 } 217 217 218 pr ivatestring Indirect(string column, bool training) {218 protected string Indirect(string column, bool training) { 219 219 if (training) { 220 220 return string.Format("INDIRECT(\"'Estimated Values'!{0}\"&{1}+2&\":{0}\"&{2}+1)", column, TRAININGSTART, TRAININGEND); … … 260 260 } 261 261 262 pr ivatevoid AddModelTreePicture(ExcelWorksheet modelWorksheet, ISymbolicDataAnalysisModel model) {262 protected void AddModelTreePicture(ExcelWorksheet modelWorksheet, ISymbolicDataAnalysisModel model) { 263 263 SymbolicExpressionTreeChart modelTreePicture = new SymbolicExpressionTreeChart(); 264 264 modelTreePicture.Tree = model.SymbolicExpressionTree; … … 289 289 estimatedWorksheet.Cells[1, 1, 1, 10].AutoFitColumns(); 290 290 291 // fill in id, target variable and unbounded estimated values 291 292 int targetIndex = solution.ProblemData.Dataset.VariableNames.ToList().FindIndex(x => x.Equals(solution.ProblemData.TargetVariable)) + 1; 292 293 for (int i = 0; i < rows; i++) { 293 estimatedWorksheet.Cells[i + 2, 1].Value = i; 294 estimatedWorksheet.Cells[i + 2, 2].Formula = datasetWorksheet.Cells[i + 2, targetIndex].FullAddress; 295 estimatedWorksheet.Cells[i + 2, 9].Formula = string.Format(preparedFormula, i + 2); 294 estimatedWorksheet.Cells[i + 2, 1].Value = i; // id 295 estimatedWorksheet.Cells[i + 2, 2].Formula = datasetWorksheet.Cells[i + 2, targetIndex].FullAddress; // target variable 296 estimatedWorksheet.Cells[i + 2, 9].Formula = string.Format(preparedFormula, i + 2); // unbounded estimated values 296 297 } 297 298 estimatedWorksheet.Cells["B2:B" + (rows + 1)].Style.Numberformat.Format = "0.000"; … … 313 314 } 314 315 315 pr ivatestring PrepareFormula(string[] formulaParts) {316 protected string PrepareFormula(string[] formulaParts) { 316 317 string preparedFormula = formulaParts[0]; 317 318 foreach (var part in formulaParts.Skip(2)) { … … 323 324 } 324 325 325 pr ivatevoid WriteInputSheet(ExcelWorksheet inputsWorksheet, ExcelWorksheet datasetWorksheet, IEnumerable<string> list, Dataset dataset) {326 protected void WriteInputSheet(ExcelWorksheet inputsWorksheet, ExcelWorksheet datasetWorksheet, IEnumerable<string> list, Dataset dataset) { 326 327 //remark the performance of EPPlus drops dramatically 327 328 //if the data is not written row wise (from left to right) due the internal indices used. … … 337 338 } 338 339 339 pr ivatevoid WriteDatasetToExcel(ExcelWorksheet datasetWorksheet, IDataAnalysisProblemData problemData) {340 protected void WriteDatasetToExcel(ExcelWorksheet datasetWorksheet, IDataAnalysisProblemData problemData) { 340 341 //remark the performance of EPPlus drops dramatically 341 342 //if the data is not written row wise (from left to right) due the internal indices used.
Note: See TracChangeset
for help on using the changeset viewer.