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
I just observed that in the example code given on the medium.com blog, you calculated individual weights by simply calling rowSums(pred.breakdown) on the data set containing the feature contributions.
I think this is not correct because adding negative and positive feature contributions may cancel out effects.
I just observed that in the example code given on the medium.com blog, you calculated individual weights by simply calling rowSums(pred.breakdown) on the data set containing the feature contributions.
I think this is not correct because adding negative and positive feature contributions may cancel out effects.
Shouldn't it be s.th like:
weights = apply(pred.breakdown,1,function(x) sum(abs(x)))
I was referring to this blog:
https://medium.com/applied-data-science/new-r-package-the-xgboost-explainer-51dd7d1aa211
The text was updated successfully, but these errors were encountered: