Closed freddyaboulton closed 3 years ago
@freddyaboulton I think we should simply raise a known exception when a user tries to generate prediction explanations for an ensemble. Does that sound good to you?
@dsherry That sounds good to me!
I think it would be cool if we could eventually do prediction explanations for ensembles but it looks like that's a heavy lift given what we can do with shap at the moment. I think that might be a good project for a future blitz 😄 hehe
Passing a stacked ensemble pipeline into our prediction explanations function will result in a stack trace
This is trickier than just getting rid of the
check_array
calls in_compute_shap_values
.Shap will convert the data you pass it into it's own DenseData format, which is basically a numpy array.
Since the
StackedEnsembleClassifier
component has pipelines inside, we need the dataframe/datatable representation for the internal pipeline components to work properly.AFAIK, shap can really only handle sklearn/catboost/lgbm/xgboost estimators and numpy arrays. When we first designed this, we got around this limitation by extracting the features for the final estimator and passing the
_component_obj
(not the evalml component) to the shap algorithm.However, this doesn't really work for our ensembles.