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've tracked down this error. The problem actually occurs in the xgboost package. When calling the buildExplainer function (xgboostExplainer package), the xgb.model.dt.tree function (xgboost package) is called, which in turn calls the xgb.dump function (xgboost package).
The output from the xgb.dump function CAN create records like 2140:[f5<inf] yes=2487,no=2488,missing=2488
When the xgb.model.dt.tree function parses this record, the "[f5<inf]" part creates a NA value as the function is looking for a numerical value and not an inf or NaN value.
The proper way to fix this would be to have the xgboost package fix the regex code used in the xgb.model.dt.tree function and it appears that this has been corrected in version 0.6.4.6 and beyound. However, xgboostExplainer will not work with xgboost later than 0.6.4.1.
Until the xgboostExplainer package is updated to the new version of xgboost, I hacked together an alternative xgb.model.dt.tree function that does a find and replace for "inf" values and changes it to a significantly large value (for my dataset) so as to accomplish the same thing.
When I build the explainer, the following error is thrown in
findPath(tree, leaf):
Error in while (currentnode >0) {: argument is of length zero
.Somehow currentnode seems to be zero. The problem only occurs for some trees making it more difficult to pin down.
The text was updated successfully, but these errors were encountered: