Comparative SHAP Analysis on SVM and K-NN: Impacts of Hyperparameter Tuning on Model Explainability

Ikhlass Boukrouh, Faouzi Tayalati, Abdellah Azmani · 2024

Exploring the interpretability of machine learning models is important for establishing trust and facilitating their adoption in practical applications. This study utilizes the Shapley Additive Explanations (SHAP) framework to conduct a comparative analysis of the explainability of Support Vector Machines (SVM) and K-Nearest Neighbors (KNN) models. It focuses on how hyperparameters tuning affects these models. A case study on customer churn within the e-commerce sector, involving data from 5,630 customers and 20 descriptive features, demonstrates the impact of fine-tuning on model accuracy and feature importance. The results show significant improvements in accuracy after tuning, with SVM improving from an accuracy of 88.8987% before tuning to 94.1385% post-tuning. K-NN also showed enhanced performance, with accuracy increasing from 84.8135% to 92.7176% after tuning. The SHAP analysis reveals that while all models initially identify the same feature as the most important, subsequent shifts in the importance of other features underscore the distinct characteristics of each algorithm in predictive performance.

Read the paper · More papers on PaperTik