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 Learning models. In this article I will focus on answering the second question

A) Which features/variables have the biggest impact or are most important for prediction? (answered in a previous article)

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?

As one thinks about B), I am sure many of you are thinking of coefficients in models can be used to answer this. That is correct, but coefficient interpretation can be pretty gnarly even in the simplest of models. I will highlight another approach that provides clarity, namely “Partial Dependence Plots (PDP)”. Let us say you have a model with three features, A, B, and C. You want to understand what the impact each of the levels of A (thre are 10 of them from L1-L10) is on the prediction. As before, in order to apply this approach, we will use our final model and the validation dataset. Let us understand how this approach works by taking a look at one observation in the validation dataset which has L1 of feature A and some other levels for features B and C. The following steps can then be used to build our partial dependence plot

  • For the single observation, vary the levels of feature A leaving the other features at their current levels and use the model to make a prediction. Plot the levels of feature A on the x-axis and the predictions on the y-axis. This is the PDP for that one observation
  • How do we define the PDP across all observations. Repeat the same exercise as above for each observation and show the average prediction for the various levels on the y-axis.

Earlier you determined the relative importance of A vs B vs C. The PDP in addition gives you information on how the prediction varies for each level of A and so on. A handy library to do this is PDP Box Library. Give it a try

As a note, one can also draw 2D PDP’s which will give us insight on interactions between variables (at least between 2 variables)

The next article will talk about how to address C). 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 #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…

  • 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 条评论

社区洞察

其他会员也浏览了