Changeset 12591
- Timestamp:
- 07/05/15 19:41:18 (9 years ago)
- Location:
- branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs
r12590 r12591 187 187 // init 188 188 var problemData = Problem.ProblemData; 189 var lossFunction = ApplicationManager.Manager.GetInstances<ILossFunction>().Single(l => l.ToString() == LossFunctionParameter.Value.Value); 189 var lossFunction = ApplicationManager.Manager.GetInstances<ILossFunction>() 190 .Single(l => l.ToString() == LossFunctionParameter.Value.Value); 190 191 var state = GradientBoostedTreesAlgorithmStatic.CreateGbmState(problemData, lossFunction, (uint)Seed, MaxDepth, R, M, Nu); 191 192 … … 213 214 214 215 // produce variable relevance 215 // update variable impacts matrix216 216 var orderedImpacts = state.GetVariableRelevance().Select(t => new { name = t.Key, impact = t.Value }).ToList(); 217 217 -
branches/GBT-trunkintegration/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesModel.cs
r12590 r12591 64 64 // allocate target array go over all models and add up weighted estimation for each row 65 65 var res = new double[rows.Count()]; 66 if (res.Length == 0) return res; // return immediately if rows is empty. This prevents multiple iteration over lazy rows enumerable. 67 // (which essentially looks up indexes in a dictionary) 66 68 for (int i = 0; i < models.Count; i++) { 67 69 var w = weights[i];
Note: See TracChangeset
for help on using the changeset viewer.