Changeset 12635
- Timestamp:
- 07/07/15 12:37:11 (9 years ago)
- Location:
- branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r12632 r12635 180 180 181 181 int i = 0; 182 // TODO: slow because of multiple calls to GetDoubleValue for each row index 182 183 foreach (var pred in tree.GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices)) { 183 184 yPred[i] = yPred[i] + nu * pred; -
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/AbsoluteErrorLoss.cs
r12607 r12635 84 84 res[i - startIdx] = targetArr[row] - predArr[row]; 85 85 } 86 return res.Median(); 86 return res.Median(); // TODO: improve efficiency 87 87 }; 88 88 return lineSearch; -
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs
r12607 r12635 100 100 totalWeight += w; 101 101 } 102 // TODO: improve efficiency (find median without sort) 102 103 res_w.StableSort((a, b) => Math.Sign(a.Key - b.Key)); 103 104 -
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs
r12632 r12635 36 36 public struct TreeNode { 37 37 public readonly static string NO_VARIABLE = string.Empty; 38 public string VarName { get; set; } // name of the variable for splitting or -1if terminal node38 public string VarName { get; set; } // name of the variable for splitting or NO_VARIABLE if terminal node 39 39 public double Val { get; set; } // threshold 40 40 public int LeftIdx { get; set; } … … 66 66 if (node.VarName == TreeNode.NO_VARIABLE) 67 67 return node.Val; 68 // TODO: many calls to GetDoubleValue are slow because of the dictionary lookup in Dataset (see ticket #2417) 68 69 else if (ds.GetDoubleValue(node.VarName, row) <= node.Val) 69 70 return GetPredictionForRow(t, node.LeftIdx, ds, row);
Note: See TracChangeset
for help on using the changeset viewer.