heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
36 stars 16 forks source link

Refactor certain parts for data-based modeling #2697

Closed HeuristicLab-Trac-Bot closed 7 years ago

HeuristicLab-Trac-Bot commented 7 years ago

Issue migrated from trac ticket # 2697

milestone: HeuristicLab 3.3.15 | component: Problems.DataAnalysis | priority: medium | resolution: done

2016-11-09 09:43:49: @gkronber created the issue


  • Move translation to AutoDiff out of evaluator
  • Create ISymbolicExpressionTree for linear model from vector of coefficients
  • Create two-dimensional array from ProblemData
HeuristicLab-Trac-Bot commented 7 years ago

2016-11-09 09:44:19: @gkronber changed status from new to accepted

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-09 09:44:19: @gkronber set owner to @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-09 10:50:09: @gkronber commented


r14378:

  • created a folder for all classes related to transformation from and to trees
  • created a transformator which takes a tree and uses AutoDiff to produce a function and gradient function for the tree.
  • moved code from SymbolicRegressionConstantOptimizationEvaluator to TreeToAutoDiffTermTransformator to make AutoDiff for trees more accessible
HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 20:09:56: @gkronber commented


r14390:

  • renaming of folder "Transformation" to "Converters" to distinguish between transformations for variables (from data preprocessing) and classes for transformation of trees.
  • renamed SymbolicDataAnalysisExpressionTreeSimplifier -> TreeSimplifier
  • Implemented a converter to create a linar model as a symbolic expression tree
HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 20:23:25: @gkronber commented


r14391:

  • extended converter for linear models to support lagged variables and changed AR(k) to use this method
HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 21:04:48: @gkronber commented


Todo: remove class scaling (needs persistence backwards compat in GPR)

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 21:23:55: @gkronber commented


r14393:

  • removed AlglibUtil.cs and added an extension method .ToArray(names, rows) to IDataset instead.
  • refactored transformation so that it is possible to apply an transformation without resetting the parameters
  • Used transformations instead of Scaling as far as possible.
  • Moved TakeEvery extension method to HL.Common
HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 21:30:43: @gkronber commented


r14394: renamed TreeSimplifier in unit test

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-15 22:06:59: @gkronber commented


r14396: added methods to get training and test input matrices from ProblemData

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-17 15:42:31: @gkronber commented


r14400: reverse merge of r14378, r14390, r14391, r14393, r14394, r14396 because the changes cannot be merged over to the #2650 branch

HeuristicLab-Trac-Bot commented 7 years ago

2016-11-26 21:56:51: @gkronber commented


This is needed by #745.

However, #2650 should be merged to the trunk first before we apply the changes reverted in r14400 because there are many conflicting changes.

HeuristicLab-Trac-Bot commented 7 years ago

2016-12-20 10:55:43: @mkommend commented


r14507: Added caching of parameters and removed resetting of training and test partition in AdjustProblemDataProperties (used for changing the problem data of a solution) in DataAnalysisProblemData.

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 14:13:24: @gkronber commented


r14840: applied changes from r14378 again

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 15:55:59: @gkronber commented


r14843: applied r14390, r14391, r14393, r14394, r14396 again (resolving conflicts)

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 16:19:13: @gkronber commented


r14845: fixed build fail of test solution

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 16:19:13: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 18:26:24: @gkronber changed status from accepted to reviewing

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 18:26:24: @gkronber changed owner from @gkronber to @mkommend

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-11 18:26:24: @gkronber commented


r14851: removed unnecessary variables

HeuristicLab-Trac-Bot commented 7 years ago

2017-04-12 10:32:00: @gkronber commented


r14854: introduced original code for scaling from AlglibUtil into GaussianProcessModel to guarantee backwards compatibility regarding unit test results

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 17:56:20: @mkommend commented


2697: Made symbol fields readonly in TreeSimplifier.

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @mkommend commented


Review comments

Enumerable Extensions

  • ~~ Why has the ext. method TakeEvery been added, although it is never used? ~~ \ gkronber: Good question. I traced this back to r7154. Seems we never needed this. Can be removed.\ mkommend: Addressed with comment:19.

HL.Problems.DataAnalysis.Symbolic

  • ~~ Delete empty and unused folder Transformation ~~ \ mkommend: Addressed with comment:20.

HeuristicLab.Problems.DataAnalysis Transformations

  • Why do we need transformations?!?!
  • Can't we delete all of them?
  • If not, why don't we move them to the DataPreprocessing and forget about them?

gkronber: They are used in DataPreprocessing. After the changes in this ticket they are also used for scaling of input variables (instead of the Scaling class). Any symbolic regression model can have transformations. If we want to keep support for this at least the interface is necessary in the symbolic namespace.

Edit: After discussion we decided to move all transformations to the DataPreprocessing namespace and remove support for transformations from symbolic models.

Converters

  • I don't really get the benefit of the Convert class, besides listing somehow related conversion operations. \ gkronber: addressed with comment:22
  • AFAIK the TreeSimplifier is stateless? If that's the case why don't we provide a static method for simplification. e.g. var simplifiedTree = TreeSimplifier.Simplify(originalTree);. \ gkronber: addressed with comment:23
  • TreeToAutoDiffTermConverter encapsulates the functionality nicely. This new refactoring would also enable to use exception for control flow handling in TryConvertToAutoDiff(node,term) instead of always checking the transformation result (true or false). \ gkronber: addressed with comment:24

Finished reviewing the changes in this tickets.

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @mkommend

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @mkommend

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @mkommend

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-05 18:12:48: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 11:08:05: @mkommend commented


Replying to [comment:18 mkommend]:

Enumerable Extensions

  • Why has the ext. method TakeEvery been added, although it is never used? gkronber: Good question. I traced this back to r7154. Seems we never needed this. Can be removed.

r14944: Removed TakeEvery methods from EnumerableExtensions.cs

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 11:10:05: @mkommend commented


Replying to [comment:18 mkommend]:

HL.Problems.DataAnalysis.Symbolic

  • Delete empty and unused folder Transformation r14945: Removed empty folder HL.Problems.DataAnalysis.Symbolic\Transformation.
HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 17:24:22: @mkommend changed owner from @mkommend to @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 19:45:25: @gkronber commented


r14948: removed static Convert class

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 19:54:41: @gkronber commented


r14949: made TreeSimplifier static

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-09 20:08:24: @gkronber commented


r14950: code improvement in TreeToAutoDiffTermConverter

HeuristicLab-Trac-Bot commented 7 years ago

2017-05-20 07:28:18: @gkronber changed status from reviewing to readytorelease

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:05:34: @gkronber commented


Since MCTS has been removed (already merged to stable #2581) there are conflicts when merging this ticket to stable.

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:06:34: @gkronber commented


r15140: merged r14507 from trunk to stable

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:08:24: @gkronber commented


r15141: merged r14840 from trunk to stable

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:12:29: @gkronber commented


r15142: merged r14843 (resolving conflicts in csproj file for HL.Algorithms.DataAnalysis because MCTS has been removed)

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:14:01: @gkronber commented


r15143: merged r14845, r14851, r14854 from trunk to stable

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:14:01: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:16:33: @gkronber commented


r15144: merged r14944, r14945, r14948 from trunk to stable

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:16:33: @gkronber

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:18:23: @gkronber commented


r14938 also belongs to this ticket

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-06 11:19:42: @gkronber commented


r15145: merged r14938,r14949,r14950 from trunk to stable (all changesets merged)

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-07 09:39:57: @gkronber changed status from readytorelease to closed

HeuristicLab-Trac-Bot commented 7 years ago

2017-07-07 09:39:57: @gkronber set resolution to done