Synopsis of model interpretability (Part 1) — Seeing your data and applying ML
Recently my colleagues (Patrick Hall, Wen Phan and Sri) at H2O.ai written a great article on “Ideas on interpreting machine learning” which provides thorough detailed on what is best available and what can be done to improve understanding of models and their predictions.
Original Article: https://www.oreilly.com/ideas/ideas-on-interpreting-machine-learning
I studies their very long article and while studying it, I made my notes and those notes are here as synopsis for readers to get the gist of their article and a quick overview. This is the 1st part of the article and for the 2nd part visit here.
What is the main question:
- Do I understand the model and answers my machine learning algorithm is giving me? And do I trust these answers?
And what is the main problem:
- Results, Models -> hard to understand, and maybe even hard to trust
- Relationship of the variables and the model/results/predictions is event harder to explain.
Finally what the essential quest is which every one is looking for:
- Model interpretability is a serious legal mandate in the regulated verticals of banking, insurance, healthcare, fraud detection and other industries.
- Business analysts, doctors, and industry researchers simply must understand and trust their models and modeling results.
Lets start with Response Function Complexity
- Linear monotonic functions: A simple or complex linear relationship among independent variables to define the outcome. An example could be, if a lender rejects your credit card application, they can tell you why because their probability-of-default model often assumes your credit score, your account balances, and the length of your credit history are monotonically related to your ability to pay your credit card bill.
- Nonlinear monotonic functions: Most machine learning response function are nonlinear, however monotonic with respect to given independent variable. Nonlinear and monotonic functions do always change in one direction as a single input variable changes so have ability to understand
- Nonlinear non-monotonic functions: Very hard to interpret because changes into positive and negative directions. You can consider these models as extremely complex models
Scope of interpretability
- Global interpretability: It helps us understand the entire conditional distribution modeled by the trained response function, however could be approximate or based on average values.
- Local interpretability: It promotes understanding of small regions of the conditional distribution, mostly linear, monotonic, well behaved, so local explanation could be more accurate then global
Understanding and trust:
- Know your algorithms, how it works, its limitation and interpretation of data,
- Understand the process through model-agnostic vs model-specific view
Part 1: Seeing your data
- Using glyphs, correlation graphs, 2D projections, Partial Dependency Plots (PDP), Residual Analysis
- Common 2/3-D projections
- Principal Component Analysis (PCA)
- Multidimensional Scaling (MDS)
- t-distributed Stochastic Neighbor Embedding (t-SNE)
- Autoencoder networks
Part 2: Using Machine learning in regulated industry
- Newer types of linear models or models using machine learning to augment traditional, linear modeling methods, producing linear, monotonic response functions (or at least monotonic ones) with globally interpretable results with a boost in predictive accuracy. The common types are:
- OLS (Ordinary least squares) regression alternatives:
- Penalized regression, Generalized Additive Models (GAMs), Quantile Regression
- What these alternatives regression can do:
- Often produce globally interpretable linear, monotonic functions that can be interpreted using coefficient values or other traditional regression measures and statistics.
- Generally linear, monotonic functions. However, GAM approaches can create quite complex nonlinear functions
- These techniques are trusted linear models and trust could be increased further if these techniques lead to more accurate results for your application.
- With caution, testing, and restraint, building toward machine learning benchmarks can preserve the linearity and monotonicity of traditional linear models.
- However, adding many interactions or piecewise components will result in extremely complex response functions.
- How analytics process can be augmented with machine learning:
- Introduce complex predictors into traditional linear models
- Use multiple gated liner models
- Predict linear model degradation
- Small Interpretable ensembles:
- Provide increased accuracy, but may decrease overall global interpretability, resulting ensemble model could be hard to interpret, could create complex response function
- Boost the accuracy of traditional trustworthy models without sacrificing too much interpretability. Increased accuracy is an indication that the pertinent phenomena in the data have been modeled in a more trustworthy, dependable fashion.
- Monotonicity Constraints:
- Creates globally interpretable nonlinear and monotonic response functions
- Can turn difficult-to-interpret nonlinear, non-monotonic models into highly interpretable, and possibly regulator-approved, nonlinear, monotonic models, import for 2 reasons: [1] Expected by regulators [2] Enables consistent reason code generation, which is considered a gold standard of model interpretability
- Trust is increased when monotonic relationships, reason codes, and detected interactions are parsimonious with domain expertise or reasonable expectations
Please continue to part 2 where we will see “how to understand these complex machine learning models”…..