Changeset 12597 for branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
- Timestamp:
- 07/06/15 13:02:19 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r12590 r12597 58 58 internal double[] y; 59 59 internal int[] activeIdx; 60 internal double[] rim;60 internal double[] pseudoRes; 61 61 62 62 internal IList<IRegressionModel> models; … … 88 88 pred = Enumerable.Repeat(f0, nRows).ToArray(); 89 89 predTest = Enumerable.Repeat(f0, problemData.TestIndices.Count()).ToArray(); 90 rim= new double[nRows];90 pseudoRes = new double[nRows]; 91 91 92 92 models = new List<IRegressionModel>(); … … 168 168 var y = gbmState.y; 169 169 var activeIdx = gbmState.activeIdx; 170 var rim = gbmState.rim;170 var pseudoRes = gbmState.pseudoRes; 171 171 172 172 // copy output of gradient function to pre-allocated rim array (pseudo-residuals) 173 173 int rimIdx = 0; 174 174 foreach (var g in lossFunction.GetLossGradient(y, yPred, w)) { 175 rim[rimIdx++] = g;175 pseudoRes[rimIdx++] = g; 176 176 } 177 177 178 var tree = treeBuilder.CreateRegressionTreeForGradientBoosting( rim, maxDepth, activeIdx, lossFunction.GetLineSearchFunc(y, yPred, w), r, m);178 var tree = treeBuilder.CreateRegressionTreeForGradientBoosting(pseudoRes, maxDepth, activeIdx, lossFunction.GetLineSearchFunc(y, yPred, w), r, m); 179 179 180 180 int i = 0;
Note: See TracChangeset
for help on using the changeset viewer.