Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/16 12:51:31 (8 years ago)
Author:
gkronber
Message:

#2612: added NaN handling for the evaluation of regression tree models (GBT)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs

    r14000 r14015  
    170170        if (node.VarName == TreeNode.NO_VARIABLE)
    171171          return node.Val;
    172         if (columnCache[nodeIdx] == null) {
     172        if (columnCache[nodeIdx] == null || double.IsNaN(columnCache[nodeIdx][row])) {
    173173          if (node.WeightLeft.IsAlmost(-1.0)) throw new InvalidOperationException("Cannot calculate partial dependence for trees loaded from older versions of HeuristicLab.");
    174174          // weighted average for partial dependence plot (recursive here because we need to calculate both sub-trees)
Note: See TracChangeset for help on using the changeset viewer.