Changeset 14017


Ignore:
Timestamp:
07/07/16 13:18:28 (5 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

    r14016 r14017  
    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.