Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated the pdp_model_inference task to use the "New Shap Explanation API" and plotted using beeswarm function.
The changes were required because some methods used with the old API are getting deprecated and Shap documentation pointed to the new API.
Changes
1. Removed the custom code to create shap values
Replaced with the new explanation API
2. Removed the plot function
replaced with beeswarm utils function
Context
Per documentation:
"The new-style plotting functions like shap.plot.bar and shap.plots.beeswarm accept these Explanation objections rather than numpy arrays."
Questions/Inputs
The performance was similar to the custom spark function with synthetic datasets, but it should be tested with bigger datasets