0
$\begingroup$

when looking at a single observation in a ML model, what is the best way to find which variables to change to make the biggest impact on the target variable?

Example 1: in a house price prediction model (say tree based), if you own a home and wanted to increase the price of your home, what you do? Add space, add a floor, add a solar roof? What would be the highest ROI combination of the three?

Example 2: in a sentiment detection model (say BERT based), if you wanted to sound more positive, which words should you change to what?

Is it just variable importance? Shap values? Partial dependence plots? If any of these, how to practically use that information to make an actionable recommendation? Or do I need to use a causalML model instead?

For example 2, Shap does text explanations but I'm not sure that gives me the best lift? I guess you could change the words with the most negative impact? If a word is neutral, what would be the best word to replace it with to have the most positive impact?

Perhaps something like tensorflow LIT?

Saw this question which is quite similar in nature but doesn't have a practical answer. How to identify the most impactful features in a ML model, i.e. the predictor variables that can drive the biggest change in the target variable?

$\endgroup$
3
  • 1
    $\begingroup$ To turn this into a question which can be answered in a clear way, you would need to define what you mean by "the best way", "to change" and "biggest impact". $\endgroup$
    – g g
    Commented Dec 21, 2023 at 22:58
  • $\begingroup$ perhaps putting in in math terms helps. y_i + delta_y_i = f(x_i + delta_x_i), i'm looking for the delta_x_i [could be delta in one variable only or a combination] that results in max(delta_y_i). i guess you can get it by taking the variable with the highest importance and changing it a lot... $\endgroup$
    – citynorman
    Commented Dec 22, 2023 at 16:24
  • $\begingroup$ Just fit a smooth model and take the gradient. Autodiff is your friend. Oh and you still need to think about the scaling of the inputs... $\endgroup$
    – g g
    Commented Dec 22, 2023 at 18:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.