You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi David and thank you for this useful explainer. I must point out that I stepped into an issue with explainPredictions function.
The number of iterations of for loop is defined by lines
54: nodes = predict(xgb.model,data,predleaf =TRUE)
and
61: num_trees = ncol(nodes)
None of this lines takes into account the number of trees used to built the explainer variable and so num_trees is always equal to the total number of trees present into the model, even thou when I called buildExplainer I set the input variable n_first_tree to a lower value. In this case, after n_first_tree iterations the for loop start adding NAs to preds_breakdown producing a NAs-Only output.
The text was updated successfully, but these errors were encountered:
ChoGit
changed the title
explainPredictions always use maximum number of trees
explainPredictions always uses maximum number of trees
Jan 14, 2018
Hi David and thank you for this useful explainer. I must point out that I stepped into an issue with
explainPredictions
function.The number of iterations of
for
loop is defined by lines54:
nodes = predict(xgb.model,data,predleaf =TRUE)
and
61:
num_trees = ncol(nodes)
None of this lines takes into account the number of trees used to built the
explainer
variable and sonum_trees
is always equal to the total number of trees present into the model, even thou when I calledbuildExplainer
I set the input variablen_first_tree
to a lower value. In this case, aftern_first_tree
iterations thefor
loop start addingNAs
topreds_breakdown
producing a NAs-Only output.The text was updated successfully, but these errors were encountered: