Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/15 15:20:28 (9 years ago)
Author:
gkronber
Message:

#2261: also use line search function for the initial estimation f0, changed logistic regression loss function to match description in GBM paper, comments and code improvements

File:
1 edited

Legend:

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

    r12597 r12607  
    8484        activeIdx = Enumerable.Range(0, nRows).ToArray();
    8585
    86         // prepare arrays (allocate only once)
    87         double f0 = y.Average(); // default prediction (constant)
     86        var zeros = Enumerable.Repeat(0.0, nRows);
     87        var ones = Enumerable.Repeat(1.0, nRows);
     88        double f0 = lossFunction.GetLineSearchFunc(y, zeros, ones)(activeIdx, 0, nRows - 1); // initial constant value (mean for squared errors)
    8889        pred = Enumerable.Repeat(f0, nRows).ToArray();
    8990        predTest = Enumerable.Repeat(f0, problemData.TestIndices.Count()).ToArray();
Note: See TracChangeset for help on using the changeset viewer.