Changeset 12607 for branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
- Timestamp:
- 07/06/15 15:20:28 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r12597 r12607 84 84 activeIdx = Enumerable.Range(0, nRows).ToArray(); 85 85 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) 88 89 pred = Enumerable.Repeat(f0, nRows).ToArray(); 89 90 predTest = Enumerable.Repeat(f0, problemData.TestIndices.Count()).ToArray();
Note: See TracChangeset
for help on using the changeset viewer.