SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
Arthur Charpentier, SIDE Summer School, July 2019
# 12 Interpretability & Explainability
Arthur Charpentier (Universit´e du Qu´ebec `a Montr´eal)
Machine Learning & Econometrics
SIDE Summer School - July 2019
@freakonometrics freakonometrics freakonometrics.hypotheses.org 1
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Machine Learning
Consider a regression model
yi = β0 + β1x1,i + β2x2,i + εi
With Woodridge (2009, Introductory
Econometrics) notations, holding x2 fixed
(Ceteris Paribus interpretation),
β1 =
∂y
∂x1
assuming E[ε|x1, x2] = 0, or with notions
used so far
β1 =
∂m(x)
∂x1
(= constant)
(source Randall Munroe (xkcd, 2016))
@freakonometrics freakonometrics freakonometrics.hypotheses.org 2
Arthur Charpentier, SIDE Summer School, July 2019
Linear Models
Ceteris paribus can be translated into “all other things being equal” or “holding
other factors constant.”
In a loglinear regression, log yi = β0 + β1x1,i + β2x2,i + εi
β1 =
∂∆y
y∂x1
In a logistic linear regression, logit(pi) = β0 + β1x1,i + β2x2,i
exp[β1] =
∂y
y∂x1
Mutatis mutandis approximately translates as “allowing other things to change
accordingly” or “the necessary changes having been made.”
@freakonometrics freakonometrics freakonometrics.hypotheses.org 3
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Machine Learning
What do we mean by interpreting a machine learning model, and why do we
need it? Is it to trust the model? Or try to find causal relationships in the
analyzed phenomenon? Or to visualize it? see Lipton (2017, Mythos of Model
Interpretability), Lakkaraju et al. (2019, Faithful and Customizable Explanations
of Black Box Models) Molnar (2019. Interpretable Machine Learning: A Guide for
Making Black Box Models Explainable), Guidotti et al. (2018, A Survey of Methods
for Explaining Black Box Models) Gilpin et al. (2019, Explaining Explanations: An
Overview of Interpretability of Machine Learning) Lundberg & Lee (2017, A Unified
Approach to Interpreting Model Predictions), etc.
@freakonometrics freakonometrics freakonometrics.hypotheses.org 4
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
E.g. classifier on labeled pictures {(xi, yi)}
Given a new picture (x) we want a label y = label(x)
@freakonometrics freakonometrics freakonometrics.hypotheses.org 5
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
There were neither yellow zucchini nor blue banana in the training dataset
why did label(x) recognize a claw and a screwdriver (56% and 53% chances)
@freakonometrics freakonometrics freakonometrics.hypotheses.org 6
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models y = “ski” and “car”
@freakonometrics freakonometrics freakonometrics.hypotheses.org 7
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
For works that describe machine learning models as black boxes, transparency
and interpretability are closely related, if not the same concept.
We can open the black box either
• by explaining the model,
• by explaining the outcome
• by inspecting the black box internally
• by providing a transparent solution.
@freakonometrics freakonometrics freakonometrics.hypotheses.org 8
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
Neural nets and random forests are considered as black boxes, Ribeiro et al.
(2016, “Why Should I Trust You?”: Explaining the Predictions of Any Classifier).
Following Guidotti et al. (2018, A Survey of Methods for Explaining Black Box
Models) In this general setting, a (black box) model is m : X → Y (neural nets,
SVM, etc), explanators will be described after (Features Importance,
Sensitivity Analysis, Partial Dependence Plot, etc).
• Black-box model explanation
Given a black box predictor m and a dataset Dn = {(xi, yi)} ∈ (X × Y)n
, the
black box model explanation problem consists in finding a function
f : (X → Y) × (X × Y)n
→ (X → Y) that returns a comprehensible global
predictor cg, i.e., f(m, Dn) = cg, such that cg is able to mimic the behavior of m,
and exists a global explanator function g : (X → Y) → E that can derive from cg
a set of explanations E ∈ E modeling in a human understandable way the logic
behind cg, i.e., (cg) = E.
@freakonometrics freakonometrics freakonometrics.hypotheses.org 9
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Black-box outcome explanation
Given a black box predictor b and a dataset Dn = {(xi, yi)}, the black box
outcome explanation problem consists in finding a function
f : (X → Y) × (X × Y)n
→ (X → Y ) that returns a comprehensible local
predictor c , i.e., f(m, Dn) = c , such that c is able to mimic the behavior of m,
and exists a local explanator function : (X → Y) × (X → Y) × X → E that can
derive from the black box model m, the comprehensible local predictor c , and a
data record x, a human understandable explanation e ∈ E for the data record x,
i.e., (m, c , x) = e
@freakonometrics freakonometrics freakonometrics.hypotheses.org 10
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Black box inspection explanation
Given a black box predictor b and a dataset Dn = {(xi, yi)}, the black box
inspection problem consists in finding a function f : (X → Y) × (X × Y)n
→ V
that returns a visual representation of the behavior of the black box,
f(m, Dn) = v with V being the set of all possible representations.
@freakonometrics freakonometrics freakonometrics.hypotheses.org 11
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
The transparent box design problem consists in providing a model which is
locally or globally interpretable on its own,
• Transparent box design problem
Given a dataset Dn = {(xi, yi)}, the transparent box design problem consists in
finding a learning function L : (X × Y)n
→ (X → Y) that returns a (locally or
globally) comprehensible predictor c, i.e., L(Dn) = c. This implies that there
exists an explanator function, local or global g, that takes as input the
comprehensible predictor c and returns a human understandable explanation
e ∈ E, or a set of explanations E.
@freakonometrics freakonometrics freakonometrics.hypotheses.org 12
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Partial Dependence Plot
Introduced in Friedman (2001, Greedy function approximation: A gradient boosting
machine). Let x be splited in two parts : xs (variable(s) of interest) and xc the
complementary, x = (xs, xc). Partial dependence of xs is
p(xs) = E m(xs, Sc) and p(xs) =
1
n
n
i=1
m(xs, xi,c)
See pdp R package and pdp::partial(model, pred.var = "REPUL", plot = TRUE)
Consider a (standard) linear model on the myocarde dataset
@freakonometrics freakonometrics freakonometrics.hypotheses.org 13
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
Consider an additive model (GAM) on the myocarde dataset
or a classification tree
@freakonometrics freakonometrics freakonometrics.hypotheses.org 14
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
Consider an random forest model on the myocarde dataset
or the smooth version with plotPartial(smooth = TRUE, ...)
@freakonometrics freakonometrics freakonometrics.hypotheses.org 15
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Individual Conditional Expectation
Extention of Partial Dependence Plots, introduced in Goldstein et al. (2013,
Peeking inside the black box: Visualizing statistical learning with plots of individual
conditional expectation), “Visually, ICE plots disaggregate the output of classical
PDPs. Rather than plot the target covariates’average partial effect on the
predicted response, we instead plot the n estimated conditional expectation curves”
See ICEbox package and ICEbox::ice . Here m is a random forest,
@freakonometrics freakonometrics freakonometrics.hypotheses.org 16
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
@freakonometrics freakonometrics freakonometrics.hypotheses.org 17
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Accumulated Local Effects
Introduced in Apley (2016, Visualizing the effects of predictor variables in black box
supervised learning models). Partial dependence of xs is
p(xs) = E m(xs, Sc) and p(xs) =
1
n
n
i=1
m(xs, xi,c)
Here, we focus on
a(xs) =
xs
−∞
E
∂m(zs, Sc)
∂xs
dzs
See DALEX package, see https://pbiecek.github.io and function
DALEX::single variable(explain(), variable = x, type = "ale") - as there is a
DALEX::single variable(explain(), variable = x, type = "pdp")
@freakonometrics freakonometrics freakonometrics.hypotheses.org 18
Arthur Charpentier, SIDE Summer School, July 2019
Partial Dependence Plot (on top) and Accumulated Local Effects (below)
@freakonometrics freakonometrics freakonometrics.hypotheses.org 19
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Feature Interaction
Friedman & Popescu (2008, (Predictive learning via rule ensembles), see Greenwell
et al. (A simple and effective model-based variable importance measure)
iml::Interaction
@freakonometrics freakonometrics freakonometrics.hypotheses.org 20
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Feature (Variable) Importance
Breiman (2001, Random Forests)
iml::FeatureImp or DALEX::variable importance
@freakonometrics freakonometrics freakonometrics.hypotheses.org 21
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Local Surrogate (LIME) - Local Interpretable Model-Agnostic Explanations
Alvarez-Melis & Jaakkola (2018, On the robustness of interpretability methods)
lime::explain (see the vignette or the ceterisParibus package (and the what-if plot)
@freakonometrics freakonometrics freakonometrics.hypotheses.org 22
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
• Shapley Value
Owen & Prieur (2016, On Shapley value for measuring importance of dependent
inputs)
The value of covariates {xu}, with u ⊂ {1, 2, · · · , p} in a model m is
val(u) = Var E m(x)|xu
going from 0 when u =, σ2
when u = {1, 2, · · · , p}.
We wish to define contributions ϕk satisfying
• efficiency:
p
k=1
ϕk = val({1, 2, · · · , p})
• symmetry: if val(u ∪ {k1}) = val(u ∪ {k2}) where k1, k2 /∈ u, then ϕk1 = ϕk2
• dummy: if val(u ∪ {k}) = val(u) then ϕk = 0
• additivity: if we consider two value functions val1 and val2, with contributions
ϕ1 and ϕ2, then value val = val1 + val2 has contributions ϕ = ϕ1 + ϕ2
@freakonometrics freakonometrics freakonometrics.hypotheses.org 23
Arthur Charpentier, SIDE Summer School, July 2019
Interpretability of Predictive Models
Shapley Value
Shapley (1953, A Value for n-person Game) proved that the only solution is
ϕk =
u∈{1,··· ,p}{k}
p − 1
|u|
−1
val(u ∪ {k}) − val(u)
For a linear model m,
ϕk =
u∈{1,··· ,p}{k}
p − 1
|u|
−1
R2
u∪{k} − R2
u
see iml::Shapley
Calculating the Shapley Value is computationally expensive.
Molnar (2019, Interpretable Machine Learning) about what-if tools
@freakonometrics freakonometrics freakonometrics.hypotheses.org 24

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Side 2019, part 1
Side 2019, part 1Side 2019, part 1
Side 2019, part 1
 
Slides econometrics-2018-graduate-3
Slides econometrics-2018-graduate-3Slides econometrics-2018-graduate-3
Slides econometrics-2018-graduate-3
 
Lausanne 2019 #4
Lausanne 2019 #4Lausanne 2019 #4
Lausanne 2019 #4
 
Side 2019 #6
Side 2019 #6Side 2019 #6
Side 2019 #6
 
Side 2019 #5
Side 2019 #5Side 2019 #5
Side 2019 #5
 
Hands-On Algorithms for Predictive Modeling
Hands-On Algorithms for Predictive ModelingHands-On Algorithms for Predictive Modeling
Hands-On Algorithms for Predictive Modeling
 
Reinforcement Learning in Economics and Finance
Reinforcement Learning in Economics and FinanceReinforcement Learning in Economics and Finance
Reinforcement Learning in Economics and Finance
 
Lausanne 2019 #1
Lausanne 2019 #1Lausanne 2019 #1
Lausanne 2019 #1
 
Side 2019 #3
Side 2019 #3Side 2019 #3
Side 2019 #3
 
Varese italie #2
Varese italie #2Varese italie #2
Varese italie #2
 
transformations and nonparametric inference
transformations and nonparametric inferencetransformations and nonparametric inference
transformations and nonparametric inference
 
Varese italie seminar
Varese italie seminarVarese italie seminar
Varese italie seminar
 
Predictive Modeling in Insurance in the context of (possibly) big data
Predictive Modeling in Insurance in the context of (possibly) big dataPredictive Modeling in Insurance in the context of (possibly) big data
Predictive Modeling in Insurance in the context of (possibly) big data
 
Machine Learning for Actuaries
Machine Learning for ActuariesMachine Learning for Actuaries
Machine Learning for Actuaries
 
Side 2019 #10
Side 2019 #10Side 2019 #10
Side 2019 #10
 
Slides lln-risques
Slides lln-risquesSlides lln-risques
Slides lln-risques
 
Slides ub-7
Slides ub-7Slides ub-7
Slides ub-7
 
Varese italie #2
Varese italie #2Varese italie #2
Varese italie #2
 
Side 2019 #8
Side 2019 #8Side 2019 #8
Side 2019 #8
 
Econ. Seminar Uqam
Econ. Seminar UqamEcon. Seminar Uqam
Econ. Seminar Uqam
 

Ähnlich wie Side 2019 #12

Equational axioms for probability calculus and modelling of Likelihood ratio ...
Equational axioms for probability calculus and modelling of Likelihood ratio ...Equational axioms for probability calculus and modelling of Likelihood ratio ...
Equational axioms for probability calculus and modelling of Likelihood ratio ...
Advanced-Concepts-Team
 

Ähnlich wie Side 2019 #12 (20)

Lesson 26
Lesson 26Lesson 26
Lesson 26
 
AI Lesson 26
AI Lesson 26AI Lesson 26
AI Lesson 26
 
Slides ub-1
Slides ub-1Slides ub-1
Slides ub-1
 
Equational axioms for probability calculus and modelling of Likelihood ratio ...
Equational axioms for probability calculus and modelling of Likelihood ratio ...Equational axioms for probability calculus and modelling of Likelihood ratio ...
Equational axioms for probability calculus and modelling of Likelihood ratio ...
 
A Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium ProblemsA Family Of Extragradient Methods For Solving Equilibrium Problems
A Family Of Extragradient Methods For Solving Equilibrium Problems
 
2018 MUMS Fall Course - Issue Arising in Several Working Groups: Probabilisti...
2018 MUMS Fall Course - Issue Arising in Several Working Groups: Probabilisti...2018 MUMS Fall Course - Issue Arising in Several Working Groups: Probabilisti...
2018 MUMS Fall Course - Issue Arising in Several Working Groups: Probabilisti...
 
A Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational CalculusA Coq Library for the Theory of Relational Calculus
A Coq Library for the Theory of Relational Calculus
 
Information topology, Deep Network generalization and Consciousness quantific...
Information topology, Deep Network generalization and Consciousness quantific...Information topology, Deep Network generalization and Consciousness quantific...
Information topology, Deep Network generalization and Consciousness quantific...
 
Theory of Relational Calculus and its Formalization
Theory of Relational Calculus and its FormalizationTheory of Relational Calculus and its Formalization
Theory of Relational Calculus and its Formalization
 
Slides ub-3
Slides ub-3Slides ub-3
Slides ub-3
 
Econometrics 2017-graduate-3
Econometrics 2017-graduate-3Econometrics 2017-graduate-3
Econometrics 2017-graduate-3
 
3-worlds-calculus.pdf
3-worlds-calculus.pdf3-worlds-calculus.pdf
3-worlds-calculus.pdf
 
Mutualisation et Segmentation
Mutualisation et SegmentationMutualisation et Segmentation
Mutualisation et Segmentation
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
Chapter1p2.pptx
Chapter1p2.pptxChapter1p2.pptx
Chapter1p2.pptx
 
A basic introduction to learning
A basic introduction to learningA basic introduction to learning
A basic introduction to learning
 
Arts revealed in calculus and its extension
Arts revealed in calculus and its extensionArts revealed in calculus and its extension
Arts revealed in calculus and its extension
 
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
An Importance Sampling Approach to Integrate Expert Knowledge When Learning B...
 
5.3 Basic functions. A handout.
5.3 Basic functions. A handout.5.3 Basic functions. A handout.
5.3 Basic functions. A handout.
 
An Approach to Automated Learning of Conceptual Graphs from Text
An Approach to Automated Learning of Conceptual Graphs from TextAn Approach to Automated Learning of Conceptual Graphs from Text
An Approach to Automated Learning of Conceptual Graphs from Text
 

Mehr von Arthur Charpentier

Mehr von Arthur Charpentier (11)

Family History and Life Insurance
Family History and Life InsuranceFamily History and Life Insurance
Family History and Life Insurance
 
ACT6100 introduction
ACT6100 introductionACT6100 introduction
ACT6100 introduction
 
Family History and Life Insurance (UConn actuarial seminar)
Family History and Life Insurance (UConn actuarial seminar)Family History and Life Insurance (UConn actuarial seminar)
Family History and Life Insurance (UConn actuarial seminar)
 
Control epidemics
Control epidemics Control epidemics
Control epidemics
 
STT5100 Automne 2020, introduction
STT5100 Automne 2020, introductionSTT5100 Automne 2020, introduction
STT5100 Automne 2020, introduction
 
Family History and Life Insurance
Family History and Life InsuranceFamily History and Life Insurance
Family History and Life Insurance
 
Optimal Control and COVID-19
Optimal Control and COVID-19Optimal Control and COVID-19
Optimal Control and COVID-19
 
Slides OICA 2020
Slides OICA 2020Slides OICA 2020
Slides OICA 2020
 
Lausanne 2019 #3
Lausanne 2019 #3Lausanne 2019 #3
Lausanne 2019 #3
 
Side 2019 #11
Side 2019 #11Side 2019 #11
Side 2019 #11
 
Pareto Models, Slides EQUINEQ
Pareto Models, Slides EQUINEQPareto Models, Slides EQUINEQ
Pareto Models, Slides EQUINEQ
 

Kürzlich hochgeladen

VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
Adnet Communications
 
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
dipikadinghjn ( Why You Choose Us? ) Escorts
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
dipikadinghjn ( Why You Choose Us? ) Escorts
 

Kürzlich hochgeladen (20)

VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
VIP Call Girl in Mumbai 💧 9920725232 ( Call Me ) Get A New Crush Everyday Wit...
 
03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx03_Emmanuel Ndiaye_Degroof Petercam.pptx
03_Emmanuel Ndiaye_Degroof Petercam.pptx
 
Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...Top Rated  Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
Top Rated Pune Call Girls Sinhagad Road ⟟ 6297143586 ⟟ Call Me For Genuine S...
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdf
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdfShrambal_Distributors_Newsletter_Apr-2024 (1).pdf
Shrambal_Distributors_Newsletter_Apr-2024 (1).pdf
 
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure serviceWhatsApp 📞 Call : 9892124323  ✅Call Girls In Chembur ( Mumbai ) secure service
WhatsApp 📞 Call : 9892124323 ✅Call Girls In Chembur ( Mumbai ) secure service
 
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
VIP Call Girl in Mira Road 💧 9920725232 ( Call Me ) Get A New Crush Everyday ...
 
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
Call Girls in New Ashok Nagar, (delhi) call me [9953056974] escort service 24X7
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
TEST BANK For Corporate Finance, 13th Edition By Stephen Ross, Randolph Weste...
 
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
Mira Road Memorable Call Grls Number-9833754194-Bhayandar Speciallty Call Gir...
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
 
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
(Vedika) Low Rate Call Girls in Pune Call Now 8250077686 Pune Escorts 24x7
 
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...Top Rated  Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
Top Rated Pune Call Girls Viman Nagar ⟟ 6297143586 ⟟ Call Me For Genuine Sex...
 
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbai
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbaiVasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbai
Vasai-Virar Fantastic Call Girls-9833754194-Call Girls MUmbai
 
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
( Jasmin ) Top VIP Escorts Service Dindigul 💧 7737669865 💧 by Dindigul Call G...
 
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
Vip Call US 📞 7738631006 ✅Call Girls In Sakinaka ( Mumbai )
 
Call Girls in New Friends Colony Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escort...
Call Girls in New Friends Colony Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escort...Call Girls in New Friends Colony Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escort...
Call Girls in New Friends Colony Delhi 💯 Call Us 🔝9205541914 🔝( Delhi) Escort...
 
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
Mira Road Awesome 100% Independent Call Girls NUmber-9833754194-Dahisar Inter...
 
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
VIP Independent Call Girls in Bandra West 🌹 9920725232 ( Call Me ) Mumbai Esc...
 

Side 2019 #12

  • 1. Arthur Charpentier, SIDE Summer School, July 2019 # 12 Interpretability & Explainability Arthur Charpentier (Universit´e du Qu´ebec `a Montr´eal) Machine Learning & Econometrics SIDE Summer School - July 2019 @freakonometrics freakonometrics freakonometrics.hypotheses.org 1
  • 2. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Machine Learning Consider a regression model yi = β0 + β1x1,i + β2x2,i + εi With Woodridge (2009, Introductory Econometrics) notations, holding x2 fixed (Ceteris Paribus interpretation), β1 = ∂y ∂x1 assuming E[ε|x1, x2] = 0, or with notions used so far β1 = ∂m(x) ∂x1 (= constant) (source Randall Munroe (xkcd, 2016)) @freakonometrics freakonometrics freakonometrics.hypotheses.org 2
  • 3. Arthur Charpentier, SIDE Summer School, July 2019 Linear Models Ceteris paribus can be translated into “all other things being equal” or “holding other factors constant.” In a loglinear regression, log yi = β0 + β1x1,i + β2x2,i + εi β1 = ∂∆y y∂x1 In a logistic linear regression, logit(pi) = β0 + β1x1,i + β2x2,i exp[β1] = ∂y y∂x1 Mutatis mutandis approximately translates as “allowing other things to change accordingly” or “the necessary changes having been made.” @freakonometrics freakonometrics freakonometrics.hypotheses.org 3
  • 4. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Machine Learning What do we mean by interpreting a machine learning model, and why do we need it? Is it to trust the model? Or try to find causal relationships in the analyzed phenomenon? Or to visualize it? see Lipton (2017, Mythos of Model Interpretability), Lakkaraju et al. (2019, Faithful and Customizable Explanations of Black Box Models) Molnar (2019. Interpretable Machine Learning: A Guide for Making Black Box Models Explainable), Guidotti et al. (2018, A Survey of Methods for Explaining Black Box Models) Gilpin et al. (2019, Explaining Explanations: An Overview of Interpretability of Machine Learning) Lundberg & Lee (2017, A Unified Approach to Interpreting Model Predictions), etc. @freakonometrics freakonometrics freakonometrics.hypotheses.org 4
  • 5. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models E.g. classifier on labeled pictures {(xi, yi)} Given a new picture (x) we want a label y = label(x) @freakonometrics freakonometrics freakonometrics.hypotheses.org 5
  • 6. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models There were neither yellow zucchini nor blue banana in the training dataset why did label(x) recognize a claw and a screwdriver (56% and 53% chances) @freakonometrics freakonometrics freakonometrics.hypotheses.org 6
  • 7. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models y = “ski” and “car” @freakonometrics freakonometrics freakonometrics.hypotheses.org 7
  • 8. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models For works that describe machine learning models as black boxes, transparency and interpretability are closely related, if not the same concept. We can open the black box either • by explaining the model, • by explaining the outcome • by inspecting the black box internally • by providing a transparent solution. @freakonometrics freakonometrics freakonometrics.hypotheses.org 8
  • 9. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models Neural nets and random forests are considered as black boxes, Ribeiro et al. (2016, “Why Should I Trust You?”: Explaining the Predictions of Any Classifier). Following Guidotti et al. (2018, A Survey of Methods for Explaining Black Box Models) In this general setting, a (black box) model is m : X → Y (neural nets, SVM, etc), explanators will be described after (Features Importance, Sensitivity Analysis, Partial Dependence Plot, etc). • Black-box model explanation Given a black box predictor m and a dataset Dn = {(xi, yi)} ∈ (X × Y)n , the black box model explanation problem consists in finding a function f : (X → Y) × (X × Y)n → (X → Y) that returns a comprehensible global predictor cg, i.e., f(m, Dn) = cg, such that cg is able to mimic the behavior of m, and exists a global explanator function g : (X → Y) → E that can derive from cg a set of explanations E ∈ E modeling in a human understandable way the logic behind cg, i.e., (cg) = E. @freakonometrics freakonometrics freakonometrics.hypotheses.org 9
  • 10. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Black-box outcome explanation Given a black box predictor b and a dataset Dn = {(xi, yi)}, the black box outcome explanation problem consists in finding a function f : (X → Y) × (X × Y)n → (X → Y ) that returns a comprehensible local predictor c , i.e., f(m, Dn) = c , such that c is able to mimic the behavior of m, and exists a local explanator function : (X → Y) × (X → Y) × X → E that can derive from the black box model m, the comprehensible local predictor c , and a data record x, a human understandable explanation e ∈ E for the data record x, i.e., (m, c , x) = e @freakonometrics freakonometrics freakonometrics.hypotheses.org 10
  • 11. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Black box inspection explanation Given a black box predictor b and a dataset Dn = {(xi, yi)}, the black box inspection problem consists in finding a function f : (X → Y) × (X × Y)n → V that returns a visual representation of the behavior of the black box, f(m, Dn) = v with V being the set of all possible representations. @freakonometrics freakonometrics freakonometrics.hypotheses.org 11
  • 12. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models The transparent box design problem consists in providing a model which is locally or globally interpretable on its own, • Transparent box design problem Given a dataset Dn = {(xi, yi)}, the transparent box design problem consists in finding a learning function L : (X × Y)n → (X → Y) that returns a (locally or globally) comprehensible predictor c, i.e., L(Dn) = c. This implies that there exists an explanator function, local or global g, that takes as input the comprehensible predictor c and returns a human understandable explanation e ∈ E, or a set of explanations E. @freakonometrics freakonometrics freakonometrics.hypotheses.org 12
  • 13. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Partial Dependence Plot Introduced in Friedman (2001, Greedy function approximation: A gradient boosting machine). Let x be splited in two parts : xs (variable(s) of interest) and xc the complementary, x = (xs, xc). Partial dependence of xs is p(xs) = E m(xs, Sc) and p(xs) = 1 n n i=1 m(xs, xi,c) See pdp R package and pdp::partial(model, pred.var = "REPUL", plot = TRUE) Consider a (standard) linear model on the myocarde dataset @freakonometrics freakonometrics freakonometrics.hypotheses.org 13
  • 14. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models Consider an additive model (GAM) on the myocarde dataset or a classification tree @freakonometrics freakonometrics freakonometrics.hypotheses.org 14
  • 15. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models Consider an random forest model on the myocarde dataset or the smooth version with plotPartial(smooth = TRUE, ...) @freakonometrics freakonometrics freakonometrics.hypotheses.org 15
  • 16. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Individual Conditional Expectation Extention of Partial Dependence Plots, introduced in Goldstein et al. (2013, Peeking inside the black box: Visualizing statistical learning with plots of individual conditional expectation), “Visually, ICE plots disaggregate the output of classical PDPs. Rather than plot the target covariates’average partial effect on the predicted response, we instead plot the n estimated conditional expectation curves” See ICEbox package and ICEbox::ice . Here m is a random forest, @freakonometrics freakonometrics freakonometrics.hypotheses.org 16
  • 17. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models @freakonometrics freakonometrics freakonometrics.hypotheses.org 17
  • 18. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Accumulated Local Effects Introduced in Apley (2016, Visualizing the effects of predictor variables in black box supervised learning models). Partial dependence of xs is p(xs) = E m(xs, Sc) and p(xs) = 1 n n i=1 m(xs, xi,c) Here, we focus on a(xs) = xs −∞ E ∂m(zs, Sc) ∂xs dzs See DALEX package, see https://pbiecek.github.io and function DALEX::single variable(explain(), variable = x, type = "ale") - as there is a DALEX::single variable(explain(), variable = x, type = "pdp") @freakonometrics freakonometrics freakonometrics.hypotheses.org 18
  • 19. Arthur Charpentier, SIDE Summer School, July 2019 Partial Dependence Plot (on top) and Accumulated Local Effects (below) @freakonometrics freakonometrics freakonometrics.hypotheses.org 19
  • 20. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Feature Interaction Friedman & Popescu (2008, (Predictive learning via rule ensembles), see Greenwell et al. (A simple and effective model-based variable importance measure) iml::Interaction @freakonometrics freakonometrics freakonometrics.hypotheses.org 20
  • 21. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Feature (Variable) Importance Breiman (2001, Random Forests) iml::FeatureImp or DALEX::variable importance @freakonometrics freakonometrics freakonometrics.hypotheses.org 21
  • 22. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Local Surrogate (LIME) - Local Interpretable Model-Agnostic Explanations Alvarez-Melis & Jaakkola (2018, On the robustness of interpretability methods) lime::explain (see the vignette or the ceterisParibus package (and the what-if plot) @freakonometrics freakonometrics freakonometrics.hypotheses.org 22
  • 23. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models • Shapley Value Owen & Prieur (2016, On Shapley value for measuring importance of dependent inputs) The value of covariates {xu}, with u ⊂ {1, 2, · · · , p} in a model m is val(u) = Var E m(x)|xu going from 0 when u =, σ2 when u = {1, 2, · · · , p}. We wish to define contributions ϕk satisfying • efficiency: p k=1 ϕk = val({1, 2, · · · , p}) • symmetry: if val(u ∪ {k1}) = val(u ∪ {k2}) where k1, k2 /∈ u, then ϕk1 = ϕk2 • dummy: if val(u ∪ {k}) = val(u) then ϕk = 0 • additivity: if we consider two value functions val1 and val2, with contributions ϕ1 and ϕ2, then value val = val1 + val2 has contributions ϕ = ϕ1 + ϕ2 @freakonometrics freakonometrics freakonometrics.hypotheses.org 23
  • 24. Arthur Charpentier, SIDE Summer School, July 2019 Interpretability of Predictive Models Shapley Value Shapley (1953, A Value for n-person Game) proved that the only solution is ϕk = u∈{1,··· ,p}{k} p − 1 |u| −1 val(u ∪ {k}) − val(u) For a linear model m, ϕk = u∈{1,··· ,p}{k} p − 1 |u| −1 R2 u∪{k} − R2 u see iml::Shapley Calculating the Shapley Value is computationally expensive. Molnar (2019, Interpretable Machine Learning) about what-if tools @freakonometrics freakonometrics freakonometrics.hypotheses.org 24