Whitebox-ifying ML models #I : Permutation Importance

Whitebox-ifying ML models #I : Permutation Importance

Machine Learning is all the rage today and universities are churning out data science graduates who can use black box models leveraging packages like scikit-learn and others. However most of these models are not very useful if they cant be easily interpreted for several reasons

  1. Humans inherently don’t trust black box models, our inherent curiosity wants us to understand why something works the way it works
  2. In some industries e.g. insurance, one is required to explain to regulatory bodies why something works the way it does or convince that certain factors are not in play (e.g. gender is not affecting the models or models are not race or age biased etc)
  3. Being able to interpret models increases their value because it enables conversations about the model and its value among a larger non technical audience
  4. Model interpretability makes the data scientist more comfortable that what they are building actually makes sense

In the following series of articles, i will share three simple ways to whitebox-ify your black box models. Let us start by understanding the types of questions people typically ask when they are trying to interpret models first

A) Which features/variables have the biggest impact or are most important for prediction?

B) How does the feature impact predictions? E.g. what is the impact on prediction of various values of feature A holding everything else constant?

C) How does the model work for an individual prediction? E.g if i have a model that predicts whether i should make a loan to an individual or not, what factors are driving my prediction for this individual and by how much?

A) can be answered by calculating “Permutation Importance”. The logic behind this approach is relatively straightforward: Let us say feature A is more important than feature B. In order to apply this approach, we will use our final model and the validation dataset. We know the performance (e.g. accuracy) of our model on the validation dataset which we will use as the benchmark to compare against. Let us conduct the following two exercises in your validation dataset:

  • Randomly shuffle the values for feature A. Apply model and calculate the performance metric. Calculate the deterioration relative to benchmark
  • Randomly shuffle the values for feature B. Apply model and calculate the performance metric. Calculate the deterioration relative to benchmark

If feature A is more important than feature B, then the deterioration in performance for A will be > for B. The amount of deterioration can be used to calculate the relative importance of each variable. A handy library to do this is eli. Give it a try

The next article will talk about how to address B). Enjoy!!

要查看或添加评论,请登录

Niren Sirohi, MBA, PhD的更多文章

  • Advanced People Analytics: New Opportunities (I)

    Advanced People Analytics: New Opportunities (I)

    People analytics has finally come of age. There is growing interest in applying big data and advanced analytic…

  • Whitebox-ifying ML models #5: LIME

    Whitebox-ifying ML models #5: LIME

    Another approach for better interpretation of black box models involves building surrogate models that are easily…

  • Whitebox-ifying ML models #4: Additional uses of SHAP values

    Whitebox-ifying ML models #4: Additional uses of SHAP values

    In my last post I talked about SHAP values and how they are really helpful to break down an individual prediction and…

    1 条评论
  • Whitebox-ifying ML models #3: SHAP values

    Whitebox-ifying ML models #3: SHAP values

    In the last post on this topic, we had answered the second of three questions folks ask when interpreting Machine…

  • Whitebox-ifying ML models #2: Partial Dependence Plots

    Whitebox-ifying ML models #2: Partial Dependence Plots

    In the last post on this topic, we had identified three questions people typically ask when trying to interpret Machine…

  • Offline Data meets Online: CRM Retargeting

    Offline Data meets Online: CRM Retargeting

    One of the most effective ways to improve marketing ROI is through CRM Targeting - finding the right customers at the…

  • Hazard Modeling: Timing is everything in marketing

    Hazard Modeling: Timing is everything in marketing

    The use of predictive analytics in marketing is critical for understanding and predicting the “time” dimension…the holy…

    2 条评论
  • Do you know your customer's engagement pattern?

    Do you know your customer's engagement pattern?

    Customer engagement is an important indicator of marketing and value proposition performance. And it takes on increased…

    1 条评论
  • Insights for a successful Big Data Strategy

    Insights for a successful Big Data Strategy

    Although Big Data is all around us, the reality is that only a small fraction of CIOs are successfully tackling it…

  • Key Ingredients for VOC success

    Key Ingredients for VOC success

    As mentioned in one of my previous posts, VoC is not a new term; instead it has been re-ignited as a differentiator due…

    1 条评论

社区洞察

其他会员也浏览了