Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/09/15 16:39:37 (9 years ago)
Author:
gkronber
Message:

#2261 removed line search closure (binding y.ToArray(), and pred.ToArray())

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs

    r12696 r12697  
    8181        activeIdx = Enumerable.Range(0, nRows).ToArray();
    8282
    83         var zeros = Enumerable.Repeat(0.0, nRows);
    84         double f0 = lossFunction.GetLineSearchFunc(y, zeros)(activeIdx, 0, nRows - 1); // initial constant value (mean for squared errors)
     83        var zeros = Enumerable.Repeat(0.0, nRows).ToArray();
     84        double f0 = lossFunction.LineSearch(y, zeros, activeIdx, 0, nRows - 1); // initial constant value (mean for squared errors)
    8585        pred = Enumerable.Repeat(f0, nRows).ToArray();
    8686        predTest = Enumerable.Repeat(f0, problemData.TestIndices.Count()).ToArray();
     
    166166      }
    167167
    168       var tree = treeBuilder.CreateRegressionTreeForGradientBoosting(pseudoRes, maxSize, activeIdx, lossFunction.GetLineSearchFunc(y, yPred), r, m);
     168      var tree = treeBuilder.CreateRegressionTreeForGradientBoosting(pseudoRes, yPred, maxSize, activeIdx, lossFunction, r, m);
    169169
    170170      int i = 0;
Note: See TracChangeset for help on using the changeset viewer.