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 try to get neighbors of observation to get samples for local explainability and get SHAP values with a bootstrap estimator. But I get this error message: AttributeError: 'XGBSEBootstrapEstimator' object has no attribute 'get_neighbors'.
Expected behavior
Since your documentation states that BaseEstimator is the Base class for all estimators in xgbse, I would expect .get_neigbors to work with all estimators in XGBSE.
Possible solutions
In your documentation, I can see that you never tested .get_neighbors with BootstrapEstimator. That would be a good place to start.
Also, if I have misunderstood something about your BootstrapEstimator please let me know :)
The text was updated successfully, but these errors were encountered:
Hey @gustavjandrup! Currently there is not support for . get_neighbors() in BoostrapEstimator. To do that we would have to devise a strategy for combining neighbors of all underlying estimators.
My recommendation would be to access each estimator via .estimators_ separately, and devise a score function to combine all neighbors. One idea is to count the number of times two samples were neighbors in each estimator, and rank them, with the closest neighbor being the one that showed up as a neighbor in most estimators.
Code sample
Problem description
I try to get neighbors of observation to get samples for local explainability and get SHAP values with a bootstrap estimator. But I get this error message: AttributeError: 'XGBSEBootstrapEstimator' object has no attribute 'get_neighbors'.
Expected behavior
Since your documentation states that BaseEstimator is the Base class for all estimators in xgbse, I would expect .get_neigbors to work with all estimators in XGBSE.
Possible solutions
In your documentation, I can see that you never tested .get_neighbors with BootstrapEstimator. That would be a good place to start.
Also, if I have misunderstood something about your BootstrapEstimator please let me know :)
The text was updated successfully, but these errors were encountered: