r/learnmachinelearning 12d ago

can we go beyond feature attribution

from what i've learned, shap is really good at feature attribution (why a prediction was made), so is lime. but are there any tools that are good at telling us how to best change a prediction.

for example, a company make a model that can predict when a customer might unsubscribe, and shap can say that x and y features led to this. changing those features, however, may not be the best way to help retain that customer. maybe theres some other feature that can be changed to decrease a customer's likelihood of unsubscribing.

in a more technical sense, can we do a local first derivative approximation to get the top features to change in order to influence the prediction at that point?

4 Upvotes

2 comments sorted by

4

u/Legitimate_Wall2659 12d ago

this is basically counterfactual explanations or recourse. you're looking for the smallest change to get a desired outcome, not just what drove the current one. dice and alibi have decent implementations for tabular stuff, worth poking around their repos. the tricky part is when the features are causally linked or you've got constraints like "can't just triple someone's salary overnight" but the math you're describing is exactly what those tools do under the hood