Changeset 15606 for branches/MCTS-SymbReg-2796/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionStatic.cs
- Timestamp:
- 01/12/18 16:27:39 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MCTS-SymbReg-2796/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionStatic.cs
r15441 r15606 48 48 // - standardization of variables is possible (or might be necessary) as we adjust numeric parameters of the expression anyway 49 49 // - to simplify the problem we can restrict the set of functions e.g. we assume which functions are necessary for the problem instance 50 // -> several steps: (a) poly inomials, (b) rational polynomials, (c) exponential or logarithmic functions, rational functions with exponential and logarithmic parts50 // -> several steps: (a) polynomials, (b) rational polynomials, (c) exponential or logarithmic functions, rational functions with exponential and logarithmic parts 51 51 // 3) efficiency and effectiveness for real-world problems 52 52 // - e.g. Tower problem … … 56 56 // TODO: The samples of x1*... or x2*... do not give any information about the relevance of the interaction term x1*x2 in general! 57 57 // --> E.g. if x1, x2 ~ N(0, 1) or U(-1, 1) this is trivial to show 58 // --> Therefore, looking at roll out statistics for arm selectionis useless in the general case!58 // --> Therefore, looking at roll-out statistics for arm selection (MCTS-style) is useless in the general case! 59 59 // --> It is necessary to rely on other features for the arm selection. 60 60 // --> TODO: Which heuristics can we apply? … … 64 64 // and later we find the a longer form x1 + x1 + x2 where the number of variable references 65 65 // exceeds the maximum in the automaton this leads to an error (see unit tests) 66 // ~~obsolete TODO: After state unification the recursive backpropagation of results takes a lot of time. How can this be improved?67 // ~~obsolete TODO: Why is the algorithm so slow for rather greedy policies (e.g. low C value in UCB)?68 // ~~obsolete TODO: check if we can use a quality measure with range [-1..1] in policies69 66 // TODO: unit tests for benchmark problems which contain log / exp / x^-1 but without numeric constants 70 67 // TODO: check if transformation of y is correct and works (Obj 2) … … 77 74 // TODO: analyze / improve perf of ExprHashing (canonical form for expressions) 78 75 // TODO: support empty test partition 79 // TODO: the algorithm should be invariant to linear transformations of the space (y = f(x') = f( Ax ) ) for invertible transformations A --> unit tests76 // TODO: the algorithm should be invariant to linear transformations of the space (y = f(x') = f( Ax ) ) for invertible transformations A --> see unit tests 80 77 #region static API 81 78 … … 102 99 internal readonly Tree tree; 103 100 internal readonly Func<byte[], int, double> evalFun; 104 // MCTS might get stuck. Track statistics on the number of effective roll outs101 // MCTS might get stuck. Track statistics on the number of effective roll-outs 105 102 internal int totalRollouts; 106 103 internal int effectiveRollouts; … … 228 225 } 229 226 230 // takes the code of the best solution and creates and equivalent symbolic regression model 227 // takes the code of the best solution and creates and equivalent symbolic regression models 231 228 public ISymbolicRegressionModel BestModel { 232 229 get { … … 539 536 // State equivalence is checked through ExprHash (based on the generated code through the path). 540 537 541 // We switch between rollout-mode and expansion mode 542 // Rollout-mode means we are navigating an existing path through the tree (using a rollout policy, e.g. UCB) 543 // Expansion mode means we expand the graph, creating new nodes and edges (using an expansion policy, e.g. shortest route to a complete expression) 544 // In expansion mode we might re-enter the graph and switch back to rollout-mode 545 // We do this until we reach a complete expression (final state) 546 547 // Loops in the graph are prevented by checking that the level of a child must be larger than the level of the parent 538 // We switch between rollout-mode and expansion mode. 539 // Rollout-mode means we are navigating an existing path through the tree (using a rollout policy, e.g. UCB). 540 // Expansion mode means we expand the graph, creating new nodes and edges (using an expansion policy, e.g. shortest route to a complete expression). 541 // In expansion mode we might re-enter the graph and switch back to rollout-mode. 542 // We do this until we reach a complete expression (final state). 543 544 // Loops in the graph are prevented by checking that the level of a child must be larger than the level of the parent. 548 545 // Sub-graphs which have been completely searched are marked as done. 549 546 // Roll-out could lead to a state where all follow-states are done. In this case we call the rollout ineffective. … … 806 803 807 804 // for debugging only 808 805 #region debugging 809 806 810 807 private static string TraceTree(Tree tree, State state) { … … 894 891 return sb.ToString(); 895 892 } 893 #endregion 896 894 } 897 895 }
Note: See TracChangeset
for help on using the changeset viewer.