Fluidity Through Customer Journey Maps

Customer journey maps help you understand how customers move through the buying process - uncovering ways to engage along the way. The problem with journey maps is that they don't consider the fluid…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Know your Machine Learning Models Better With Model Interpretability

Machine learning has become a solution to many data-driven problems. Be it identifying fraudulent transactions in a banking system, loan prediction, prediction of early stages of a certain disease or predicting customer churn.

With automation replacing many of the repetitive processes and the use of the ML models raises an array of questions.

To better understand the trade off between complexity and interpretability lets first understand the process of training a ML model.

Every ML model training process consists of following -

To achieve more accuracy we often try to apply more complex equation (component 1) to learn from the training data. It does not mean that we should not use a complex model with a complex data. We can try different methods like ensembling and even train deep learning models to get a better scoring model. But keep in mind that a highly complex may be very accurate but it will be less interpretable.

Refer to the graph provided above, we can se that a linear regression may be less accurate than a decision tree but its highly interpretable and deep neural networks may be highly accurate but less interpretable.

But, how do we use complex modelling techniques and still be able to interpret those model?

That’s exactly what is discussed in the following section.

Starting with exploratory data analysis, followed by feature engineering and experiment with different ensemble models. Advanced modelling method like stacking has also been used so as to increase the model complexity for demonstration.

This show that the target variable is not balanced. We use oversampling to make the data balanced.

Next we perform feature engineering like scaling the numerical features.

Once the data preparation is complete we can start with the modelling part. Let’s begin experimenting with different models.

2. Gradient Boosting model

3. Stacked Ensemble Model

We tried different modelling techniques, starting from a simple KNN model and different model with increasing complexity. Let’s suppose, the stacked ensemble model gave out the best prediction results and we want to use it for inference. In the next section, we demonstrate the use of machine learning interpretability to understand the ensemble models.

Looking at the above plot, we can have some basic understanding of the features which are driving the model in the decision making. We can add/drop some features according to our domain knowledge and then look the plot again.

2. Decision Tree Surrogate

Another method for model interpretation is surrogate models. A surrogate model can be used when the decision making of current model is complex, we use the outcome provided by our model to train another highly interpretable model. In this case, we pick a decision tree as it is easier to interpret by plotting the tree. One thing to note is that the target variable used for training the decision tree is going to be the prediction output of our stacked ensemble model and not the actual targets.

3. LIME Explainer

LIME stands for Locally Interpretable Model Agnostic Explanations. As the name suggest this explanation output a range of values given a single row of data as an input to the model. It helps us understand the features driving the model towards a particular decision making. LIME is model agnostic, meaning it can be applied to any kind of ML model possible.

4. SHAP Explainer

SHAP stands for SHapley Additive exPlanation. It gives out model explanations based on shapley values of each feature. It provides both local and global explanation.

This article gives us the basic idea behind machine learning interpretability and explains how to use different methods to interpret ML models.

Add a comment

Related posts:

Game Pass Sale Coming Soon!

The Game Pass sale is just a week or so away and we’d like to talk about how to buy them and how they’ll work. World Eternal Online is a sandbox MMORPG involving Factions, PvP, raiding, dungeons…