Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/05/16 19:41:24 (8 years ago)
Author:
gkronber
Message:

#2581:

  • removed simplification of trees (temporarily for better debugging)
  • renamed MaxSize parameter
  • fixed a small bug in MCTS
  • changed SymbolicExpressionGenerator to produce trees in the correct order
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionStatic.cs

    r13651 r13652  
    175175          var treeGen = new SymbolicExpressionTreeGenerator(problemData.AllowedInputVariables.ToArray());
    176176          var interpreter = new SymbolicDataAnalysisExpressionTreeLinearInterpreter();
    177           var simplifier = new SymbolicDataAnalysisExpressionTreeSimplifier();
    178177
    179178          var t = new SymbolicExpressionTree(treeGen.Exec(bestCode, bestConsts, bestNParams, scalingFactor, scalingOffset));
    180           var simpleT = simplifier.Simplify(t);
    181           var model = new SymbolicRegressionModel(simpleT, interpreter, lowerEstimationLimit, upperEstimationLimit);
     179          var model = new SymbolicRegressionModel(t, interpreter, lowerEstimationLimit, upperEstimationLimit);
    182180
    183181          // model has already been scaled linearly in Eval
     
    264262        alglib.minlmstate state;
    265263        alglib.minlmreport rep = null;
    266         alglib.minlmcreatevj(y.Length, optConsts, out state);
     264        alglib.minlmcreatevj(y.Length, optConsts, out state);       
    267265        alglib.minlmsetcond(state, 0.0, epsF, 0.0, nIters);
    268266        //alglib.minlmsetgradientcheck(state, 0.000001);
     
    281279
    282280      private void Func(double[] arg, double[] fi, object obj) {
    283         // 0.5 * MSE and gradient
    284281        var code = (byte[])obj;
    285282        evaluator.Exec(code, x, arg, predBuf); // gradients are nParams x vLen
     
    376373            tree.done = true;
    377374            tree.children = null;
     375            tree.visits = 1;
    378376            return false;
    379377          }
     
    436434        }
    437435      }
    438       return bestChildrenBuf.Count > 0 ? bestChildrenBuf[rand.Next(bestChildrenBuf.Count)] : bestChildrenBuf[0];
     436      return bestChildrenBuf[rand.Next(bestChildrenBuf.Count)];
    439437    }
    440438
Note: See TracChangeset for help on using the changeset viewer.