0
$\begingroup$

Lets say nontechnical C-suite wants you to predict what the revenue would be for a certain customer base. And so you train a random forest model and it achieves high accuracy. You want to figure out what the most predictive variable is so you run feature_importances_ and then rank them to see which one is the most predictive:

feature_importance = rf_model.feature_importances_

# Create a list of (feature, importance) pairs
feature_importance_list = list(zip(feature_names, feature_importance))

# Sort the list by importance in descending order
feature_importance_list.sort(key=lambda x: x[1], reverse=True)

most_predictive_variable, importance_score = feature_importance_list[0]

Lets say the most predictive variable = Customer Age, and the importance score = 0.32.

How would I translate/explain this into "useable terms" for stakeholders? Eg. Age has the highest weighting (32%) out of all variables in the model? To get to the correct revenue number, the variable Age has a weight of 32% (out of 100%)?

$\endgroup$
2
  • $\begingroup$ Be aware of the Simpson Paradoxon. Blackbox models can be good but still misleading $\endgroup$
    – Ggjj11
    Commented Oct 12, 2023 at 7:09
  • $\begingroup$ Feature importance can be estimated in many different ways and each way has its particular shortcomings. Have you looked at the documentation of your black box function, how it defines "feature importance"? If yes, please add this information to the question. $\endgroup$
    – cdalitz
    Commented Oct 12, 2023 at 8:21

0

Your Answer

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