Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/15 17:58:01 (9 years ago)
Author:
gkronber
Message:

#2261: regression tree builder should not be used from outside (made internal)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GBT-trunkintegration/Tests/Test.cs

    r12658 r12661  
    7676          {-1.5, 20,  1},
    7777          {-1.5, 20, -1},
    78           {0.5, 20, -1},
     78          {-0.5, 20, -1},
    7979          {0.5, 10, -1},
    8080          {1.5, 10, -1},
     
    257257
    258258    #region helper
    259     private void BuildTree(double[,] xy, string[] allVariables, int maxDepth) {
     259    private void BuildTree(double[,] xy, string[] allVariables, int maxSize) {
    260260      int nRows = xy.GetLength(0);
    261261      var allowedInputs = allVariables.Skip(1);
     
    266266      problemData.TestPartition.Start = nRows;
    267267      problemData.TestPartition.End = nRows;
    268       var rand = new MersenneTwister(31415);
    269       var builder = new RegressionTreeBuilder(problemData, rand);
    270       var model = (GradientBoostedTreesModel)builder.CreateRegressionTree(maxDepth, 1, 1); // maximal depth and use all rows and cols
     268      var solution = GradientBoostedTreesAlgorithmStatic.TrainGbm(problemData, new SquaredErrorLoss(), maxSize, nu: 1, r: 1, m: 1, maxIterations: 1, randSeed: 31415);
     269      var model = (GradientBoostedTreesModel)solution.Model;
    271270      var treeM = model.Models.Skip(1).First() as RegressionTreeModel;
    272271
Note: See TracChangeset for help on using the changeset viewer.