How to measure variable contribution to an observation in a non-linear model?

Based on my model, if I decline someone due to their score, it should be able to provide some reasoning as to which variables mainly contributed to the decision to decline.

Typically in Logistic Regression models, this is a simple exercise where you calculate (Beta * X) for each variable and pick 1 or 2 variables which caused the biggest score drop.

However, this isn't very straightforward for non-linear models. I would appreciate any ideas on handling something like this. Thanks.

Topic collinearity score machine-learning

Category Data Science


Try Eli5

from eli5 import show_weights,show_prediction
show_weights(model)

show_prediction(model,data_point)

Another ways are Lime and SHAP


Try LIME. In other words, compute local representation of your global highly nonlinear model for a given observation. This local proxy should be simple enough to be explainable as well. Decision trees or simple linear regressions are good choices.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.