SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Learning to Learn Model Behavior: How to use “human in
the loop” ?
Learn more at datascience.com  |  Empower Your Data Scientists
PREDICTIVE MODELING: FUN OR MISERY?
2
Only an expert can survive
Learn more at datascience.com  |  Empower Your Data Scientists 3
PREDICTIONS OFTEN GO WRONG
Learn more at datascience.com  |  Empower Your Data Scientists 4
WHEN AN ERROR OCCURS
Learn more at datascience.com  |  Empower Your Data Scientists 5
ABOUT ME
I am a Lead data scientist at DataScience.com. I enjoy applying and optimizing classical (Machine
Learning) and Bayesian design strategy to solve real-world problems. Currently, I am exploring on
better ways to evaluate and explain Model learned decision policies. I am also a member of AAAI
and organizer of PyData So Cal meet-up group.
Pramit Choudhary
@MaverickPramit
https://www.linkedin.com/in/pramitc/
https://github.com/pramitchoudhary
Learn more at datascience.com  |  Empower Your Data Scientists 6
AGENDA
• DEFINE MODEL INTERPRETATION
• UNDERSTAND THE NEED FOR MODEL INTERPRETATION
• DISCUSS DICHOTOMY BETWEEN PERFORMANCE AND
INTERPRETATION
• INTRODUCE SKATER
• UNDERSTANDING ANALYTICAL WORKFLOW
• DEMO
• Q&A
Learn more at datascience.com  |  Empower Your Data Scientists
DEFINE INTERPRETATION
7
● Definition is subjective - Data Exploration to build domain knowledge
Learn more at datascience.com  |  Empower Your Data Scientists
DEFINE INTERPRETATION
8
● Definition is subjective - overlaps with Model Evaluation
Learn more at datascience.com  |  Empower Your Data Scientists 9
WHAT IS MODEL INTERPRETATION?
● Model interpretation is an extension of Model Evaluation to help us understand machine learning/statistical
modeling behavior better if possible in a human interpretable way
● With model interpretation, one should be able to answer the following questions:
○ Why did the model behave in a certain way? What are the relevant variables driving a model’s outcome
- e.g. Customer's Lifetime Value, Fraud detection, Image Classification, Spam Detection ?
○ What other information can a model provide to avoid prediction errors ? What was the reason for a
false positive ?
○ How can we trust the predictions of a “black box” model ? Is the predictive model biased ?
● Focus: is in-regards to Supervised learning problems
Learn more at datascience.com  |  Empower Your Data Scientists
ACCURACY VS MODEL COMPLEXITY
10
Error(x) = Bias2
+ Variance + Irreducible Error
**Reference: Scott Fortmann-Roe
Learn more at datascience.com  |  Empower Your Data Scientists
Predictive Optimism
11
overfitting
underfitting
**Reference: Scott Fortmann-Roe
sweet-spot
Learn more at datascience.com  |  Empower Your Data Scientists 12
WHY DO WE NEED MODEL INTERPRETATION?
● Helps in exploring and discovering latent or hidden feature interactions (useful for feature
engineering/selection)
● Helps in understanding model variability as the environment changes (once the model is operationalized
and is functional in a non-stationary environment)
● Helps in model comparison
● Helps an analyst or data scientist build domain knowledge about a particular use case by providing an
understanding of interactions
Learn more at datascience.com  |  Empower Your Data Scientists 13
WHY MODEL INTERPRETATION?
● Brings transparency to decision making to enable trust
○ Fair Credit Reporting Act (FCRA) U.S. Code § 1681
Mandate by U.S. government on Fair and
Accurate Credit reporting. Predictive
models should not be discriminative
(biased) toward any group.
Learn more at datascience.com  |  Empower Your Data Scientists 14
Are all predictive models interpretable?
Does an interpretable model always provides the best model ?
Learn more at datascience.com  |  Empower Your Data Scientists
PERFORMANCE VS. INTERPRETABILITY
Variable B
Variable A
Simple decision boundary
(Linear Monotonic)
Complex decision
boundary(
NonLinear
Non-Monotonic )
Credit card approved
Credit card denied
Non-linear decision
boundary (nonlinear
Monotonic)
Learn more at datascience.com  |  Empower Your Data Scientists
HOW ABOUT A MORE DIFFICULT RELATIONSHIP?
Data Learned decision boundaries
Learn more at datascience.com  |  Empower Your Data Scientists 17
Local Interpretation
Being able to explain the conditional
interaction between dependent(response)
variables and independent(predictor, or
explanatory) variables wrt to a single
prediction
SCOPE OF INTERPRETATION
Global Interpretation
Being able to explain the conditional interaction
between dependent(response) variables and
independent(predictor, or explanatory) variables
based on the complete dataset
Global
Interpretation
Local Interpretation
Learn more at datascience.com  |  Empower Your Data Scientists 18
GLOBAL INTERPRETATION
● Relative Importance of Predictor Variable to evaluate Estimator’s behavior
○ Model-specific Feature importance - e.g.
■ Linear Model ( based on the absolute value of t-statistics )
■ Random Forest ( based permutation importance or Gini importance )
■ Recursive Feature Elimination(RFE) - recursively prune least important features
○ Model Independent Feature Importance - this will be our focus for today’s discussion
■ observing entropy of predictive performance based on random perturbation of feature set
■ observing entropy of model specific scoring metric
● Classification: f1-score, precision/recall
● Regression: mean squared error
● Usefulness
○ Helps in identifying important covariates contributing to target prediction enabling better
interpretability
○ Might help in improving accuracy and computation time by eliminating redundant or
unimportant features
Learn more at datascience.com  |  Empower Your Data Scientists 19
GLOBAL INTERPRETATION
● Partial Dependence Plot (PDP)
○ Helps in understanding the average partial dependence of the target function f(Y|Xs
) on subset of
features by marginalizing over rest of the features ( complement set of features )
○ Works well with input variable subset with low cardinality ( n ≤ 2 )
○ e.g. PDPs on california housing data
Fig A: HouseAge vs Avg. House Value Fig B: Avg. occupants vs Avg. House Value
Learn more at datascience.com  |  Empower Your Data Scientists 20
PDP continues ...
● Helps in understanding interaction impact of two independent features in a low dimensional space
visually
○ on Xs
where X = Xs
U Xc
is
○ Average value of f() when Xs is fixed and
Xc is varied over its marginal distribution
○ Integrated over values of Xc
p(HouseAge, Avg. Occupants per household) vs
Avg. House Value: One can observe that once the
avg. occupancy > 2, houseAge does not seem to
have much of an effect on the avg. house value
Learn more at datascience.com  |  Empower Your Data Scientists 21
PDP continues ...
● Might incorrectly articulate the interaction between predictive variable and target variable
● In Fig A, we plot a variable x_2 vs Y over say a sample of 500 points
● In Fig B, we plot a PDP of a model for predictor variable x_2 vs Y_hat.
● Observation: PDP suggests that on average x_2 has no influence on target variable
Fig A: Scatter plot Fig B: PDP
**Reference: Alex Goldstein et al.
Learn more at datascience.com  |  Empower Your Data Scientists 22
LOCAL INTERPRETATION
● Ability to inspect and evaluate individual prediction in human interpretable format with the help of
surrogate models faithfully
○ ὲ : model explanation function
○ ℒ : measure of fidelity
○ ƒ : is the base model estimator
○ g ⊂ G : a set of interpretable models [ Linear Models, Decision Trees ]
○ ∏x
: proximity measure to define locality around an individual point
○ Ω : to regularize complexity e.g. depth of the tree, learning rate, non-zero weights for linear
models
Learn more at datascience.com  |  Empower Your Data Scientists
UNDERSTANDING ANALYTICAL WORKFLOW ?
2
3
Define
Hypothesis
Use relevant key
performance
indicators
Handle Data
Handle Missing
Data
Data Partitioning
Engineer and
Select
Features
Transform data
Select relevant
features
Build Model
Build a predictive
model
Deploy Model
Operationalize
analytics as
scalable REST APIs
Test and Monitor
Model
1. Log and track behavior
2. Evaluate
3. Conduct A/B or
multi-armed bandit testing
1 2 3 4 5 6
Model Interpretation: In-Memory Models
● Model assessment
● Explain model at a global and local level
● Publish insights, make collaborative and
informed decisions
Model Interpretation: Deployed Models
● Explore and explain model behavior
● Debug and discover errors to improve
performance
RETRAIN
EVALUATE
Improve existing hypothesis/Generate a new one
Learn more at datascience.com  |  Empower Your Data Scientists
HOW DO WE SOLVE THIS PROBLEM?
● Problems:
○ Data scientists are choosing easy-to-interpret models like simple linear models or decision trees over
high-performing neural networks or ensembles, effectively sacrificing accuracy for interpretability
○ Community is struggling to keep pace with new algorithms and frameworks (sklearn, R packages,
H20.ai)
● Possible Solution: What if there was an interpretation library that…
○ Is model agnostic
○ Provides human-interpretable explanation
○ Is framework agnostic (scikit-learn, H20.ai, Vowpal Wabbit)
○ Is language agnostic (R, Python)
○ Allows one to interpret third-party models (Algorithmia, indico)
○ Supports interpretation both during modeling build process and post deployment
Learn more at datascience.com  |  Empower Your Data Scientists
INTRODUCING ...
Learn more at datascience.com  |  Empower Your Data Scientists 26
WHAT IS SKATER?
● Python library designed to demystify the inner workings of black-box models
● Uses a number of techniques for model interpretation to explain the relationships between input data and
desired output, both globally and locally
● One can interpret models both before and after they are operationalized
Learn more at datascience.com  |  Empower Your Data Scientists 27
SKATER USES - Model-agnostic Variable Importance for global interpretation
F1: 1.0 F1: 0.96
F1: 0.94F1: 0.95
Learn more at datascience.com  |  Empower Your Data Scientists 28
SKATER USES - Partial dependence plots for global interpretation
a. One-way interaction b. Two-way interaction
● A visualization technique that can be used to understand and estimate the dependence of the joint interaction of the subset of input
variables to the model's response function
Learn more at datascience.com  |  Empower Your Data Scientists 29
PDPs continued
● PDPs suffers from cancellation effect because of averaging
● Variance effect helps in highlighting this cancellation
One-way interaction with variance
Learn more at datascience.com  |  Empower Your Data Scientists 30
SKATER USES - Local Interpretable Model-Agnostic Explanations (LIME) for local interpretation
● A novel technique developed by Marco, Sameer and Carlos to explain the behavior of any classifier or regressor in an human
interpretable way using linear surrogate models to approximate around the vicinity of a single prediction
Deployed Model - indico.io Deployed Model - algorithmia
Learn more at datascience.com  |  Empower Your Data Scientists 31
LIME continues ...
● Regression
○ Gold Label : No Cancer
○ Predicted(y_hat): No Cancer
Learn more at datascience.com  |  Empower Your Data Scientists 32
SKATER USES
● LIME for image interpretability ( experimental )
highlight the feature
boundaries
highlight the feature boundaries
Will this be classified
correctly ?
Got classified as a “dog” but
doesn’t seem convincing
● Which features ?
● Was it the green
background ?
Learn more at datascience.com  |  Empower Your Data Scientists
Evaluate
(Y|X)
Data
Data
Unboxed model
Evaluate
Partial dependence plot
Relative variable importance
Local Interpretable Model
Explanation (LIME)
R or Python model (linear, nonlinear, ensemble, neural networks)
Scikit-learn, caret and rpart packages for CRAN
H20.ai, Algorithmia, etc.
WITHOUT INTERPRETATION
...
WITH SKATER ...
Black box model
How do I understand my
models?
More coming soon ...
Learn more at datascience.com  |  Empower Your Data Scientists
COMING SOON ...
34
● Predictions as conditional statements: An interpretable model, with series of decision rules
○ Given a dataset, mine a set of antecedents
○ Possible to observe and learn a manageable set of rules and their orders
Fig: Series of rules capturing the p(Survival) on titanic dataset
Learn more at datascience.com  |  Empower Your Data Scientists 35
JUPYTER’S INTERACTIVENESS
● Human in the loop is very useful for Model Evaluation
● Being able to do it in a convenient way, increases efficiency
● Interactiveness,
○ Jupyter Widgets: - UI controls to inspect code and data interactively
○ Enables collaboration and sharing:
■ Widgets can be serialized and embedded in
● html web pages,
● Sphinx style documents
● html-converted notebooks on nbviewer
○ Jupyter dashboards
■ is a dashboard layout extension
■ helpful in organizing notebook outputs - text, images, plots, animations in report like layout
Learn more at datascience.com  |  Empower Your Data Scientists
A QUICK GLIMPSE INTO THE FUTURE
36
Top 5 predictions:
1. seat belt = 0.75
2. limousine = 0.051
3. golf cart = 0.017
4. minivan = 0.015
5. car mirror = 0.015
Visual QnA: Is the person driving the car safely ?
Learn more at datascience.com  |  Empower Your Data Scientists 37
SPECIAL THANKS
● Special thanks to Aaron Kramer( one of the original authors of Skater ), Ben Van Dyke and rest
of the datascience.com teammates for helping out with Skater
● Thank you to IDEAS for providing us the opportunity to share our thoughts with a wider
community
Learn more at datascience.com  |  Empower Your Data Scientists
Q&A
info@datascience.com
pramit@datascience.com
@MaverickPramit
@DataScienceInc
Help wanted(Skater): https://tinyurl.com/yd6tnc7l
Learn more at datascience.com  |  Empower Your Data Scientists
Appendix
Learn more at datascience.com  |  Empower Your Data Scientists
40
References:
● A. Weller, "Challenges for Transparency": https://arxiv.org/abs/1708.01870
● Max Kuhn, Variable Importance Using The caret pkg:
http://ftp.uni-bayreuth.de/math/statlib/R/CRAN/doc/vignettes/caret/caretVarImp.pdf
● Friedman’ 01, Greedy Function Approximation: A gradient boosting machine:
https://statweb.stanford.edu/~jhf/ftp/trebst.pdf
● Recursive Feature Elimination: https://arxiv.org/pdf/1310.5726.pdf
● LIME: https://arxiv.org/pdf/1602.04938v1.pdf
● Nothing Else Matters: https://arxiv.org/pdf/1611.05817v1.pdf
● Peeking Inside the Black Box: https://arxiv.org/abs/1309.6392

Weitere ähnliche Inhalte

Was ist angesagt?

Module 3: Linear Regression
Module 3:  Linear RegressionModule 3:  Linear Regression
Module 3: Linear RegressionSara Hooker
 
To Explain, To Predict, or To Describe?
To Explain, To Predict, or To Describe?To Explain, To Predict, or To Describe?
To Explain, To Predict, or To Describe?Galit Shmueli
 
Lecture 7
Lecture 7Lecture 7
Lecture 7butest
 
Module 4: Model Selection and Evaluation
Module 4: Model Selection and EvaluationModule 4: Model Selection and Evaluation
Module 4: Model Selection and EvaluationSara Hooker
 
Module 5: Decision Trees
Module 5: Decision TreesModule 5: Decision Trees
Module 5: Decision TreesSara Hooker
 
Module 1.2 data preparation
Module 1.2  data preparationModule 1.2  data preparation
Module 1.2 data preparationSara Hooker
 
Module 6: Ensemble Algorithms
Module 6:  Ensemble AlgorithmsModule 6:  Ensemble Algorithms
Module 6: Ensemble AlgorithmsSara Hooker
 
Module 7: Unsupervised Learning
Module 7:  Unsupervised LearningModule 7:  Unsupervised Learning
Module 7: Unsupervised LearningSara Hooker
 
Module 2: Machine Learning Deep Dive
Module 2:  Machine Learning Deep DiveModule 2:  Machine Learning Deep Dive
Module 2: Machine Learning Deep DiveSara Hooker
 
An Introduction to XAI! Towards Trusting Your ML Models!
An Introduction to XAI! Towards Trusting Your ML Models!An Introduction to XAI! Towards Trusting Your ML Models!
An Introduction to XAI! Towards Trusting Your ML Models!Mansour Saffar
 
Repurposing predictive tools for causal research
Repurposing predictive tools for causal researchRepurposing predictive tools for causal research
Repurposing predictive tools for causal researchGalit Shmueli
 
Repurposing Classification & Regression Trees for Causal Research with High-D...
Repurposing Classification & Regression Trees for Causal Research with High-D...Repurposing Classification & Regression Trees for Causal Research with High-D...
Repurposing Classification & Regression Trees for Causal Research with High-D...Galit Shmueli
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceAmit Sharma
 
Missing Data and data imputation techniques
Missing Data and data imputation techniquesMissing Data and data imputation techniques
Missing Data and data imputation techniquesOmar F. Althuwaynee
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachinePulse
 
Causal Inference in Data Science and Machine Learning
Causal Inference in Data Science and Machine LearningCausal Inference in Data Science and Machine Learning
Causal Inference in Data Science and Machine LearningBill Liu
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Sri Ambati
 
Applications in Machine Learning
Applications in Machine LearningApplications in Machine Learning
Applications in Machine LearningJoel Graff
 
Nbe rtopicsandrecomvlecture1
Nbe rtopicsandrecomvlecture1Nbe rtopicsandrecomvlecture1
Nbe rtopicsandrecomvlecture1NBER
 

Was ist angesagt? (20)

Module 3: Linear Regression
Module 3:  Linear RegressionModule 3:  Linear Regression
Module 3: Linear Regression
 
To Explain, To Predict, or To Describe?
To Explain, To Predict, or To Describe?To Explain, To Predict, or To Describe?
To Explain, To Predict, or To Describe?
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
Module 4: Model Selection and Evaluation
Module 4: Model Selection and EvaluationModule 4: Model Selection and Evaluation
Module 4: Model Selection and Evaluation
 
Module 5: Decision Trees
Module 5: Decision TreesModule 5: Decision Trees
Module 5: Decision Trees
 
Module 1.2 data preparation
Module 1.2  data preparationModule 1.2  data preparation
Module 1.2 data preparation
 
Module 6: Ensemble Algorithms
Module 6:  Ensemble AlgorithmsModule 6:  Ensemble Algorithms
Module 6: Ensemble Algorithms
 
Module 7: Unsupervised Learning
Module 7:  Unsupervised LearningModule 7:  Unsupervised Learning
Module 7: Unsupervised Learning
 
Module 2: Machine Learning Deep Dive
Module 2:  Machine Learning Deep DiveModule 2:  Machine Learning Deep Dive
Module 2: Machine Learning Deep Dive
 
An Introduction to XAI! Towards Trusting Your ML Models!
An Introduction to XAI! Towards Trusting Your ML Models!An Introduction to XAI! Towards Trusting Your ML Models!
An Introduction to XAI! Towards Trusting Your ML Models!
 
Repurposing predictive tools for causal research
Repurposing predictive tools for causal researchRepurposing predictive tools for causal research
Repurposing predictive tools for causal research
 
Repurposing Classification & Regression Trees for Causal Research with High-D...
Repurposing Classification & Regression Trees for Causal Research with High-D...Repurposing Classification & Regression Trees for Causal Research with High-D...
Repurposing Classification & Regression Trees for Causal Research with High-D...
 
Dowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inferenceDowhy: An end-to-end library for causal inference
Dowhy: An end-to-end library for causal inference
 
Missing Data and data imputation techniques
Missing Data and data imputation techniquesMissing Data and data imputation techniques
Missing Data and data imputation techniques
 
Machine Learning and Real-World Applications
Machine Learning and Real-World ApplicationsMachine Learning and Real-World Applications
Machine Learning and Real-World Applications
 
Causal Inference in Data Science and Machine Learning
Causal Inference in Data Science and Machine LearningCausal Inference in Data Science and Machine Learning
Causal Inference in Data Science and Machine Learning
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
 
Shmueli
ShmueliShmueli
Shmueli
 
Applications in Machine Learning
Applications in Machine LearningApplications in Machine Learning
Applications in Machine Learning
 
Nbe rtopicsandrecomvlecture1
Nbe rtopicsandrecomvlecture1Nbe rtopicsandrecomvlecture1
Nbe rtopicsandrecomvlecture1
 

Ähnlich wie Learning to learn Model Behavior: How to use "human-in-the-loop" to explain decisions.

Model evaluation in the land of deep learning
Model evaluation in the land of deep learningModel evaluation in the land of deep learning
Model evaluation in the land of deep learningPramit Choudhary
 
Human in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AIHuman in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AIPramit Choudhary
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learninginovex GmbH
 
Model Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningModel Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningPramit Choudhary
 
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)Sherri Gunder
 
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.ai
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.aiPractical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.ai
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.aiSri Ambati
 
Explainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretableExplainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretableAditya Bhattacharya
 
Machine learning - session 3
Machine learning - session 3Machine learning - session 3
Machine learning - session 3Luis Borbon
 
Machine learning ppt unit one syllabuspptx
Machine learning ppt unit one syllabuspptxMachine learning ppt unit one syllabuspptx
Machine learning ppt unit one syllabuspptxVenkateswaraBabuRavi
 
Neural Nets Deconstructed
Neural Nets DeconstructedNeural Nets Deconstructed
Neural Nets DeconstructedPaul Sterk
 
Inverse Modeling for Cognitive Science "in the Wild"
Inverse Modeling for Cognitive Science "in the Wild"Inverse Modeling for Cognitive Science "in the Wild"
Inverse Modeling for Cognitive Science "in the Wild"Aalto University
 
The Incredible Disappearing Data Scientist
The Incredible Disappearing Data ScientistThe Incredible Disappearing Data Scientist
The Incredible Disappearing Data ScientistRebecca Bilbro
 
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
Data Science  & AI Road Map by Python & Computer science tutor in MalaysiaData Science  & AI Road Map by Python & Computer science tutor in Malaysia
Data Science & AI Road Map by Python & Computer science tutor in MalaysiaAhmed Elmalla
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine LearningSri Ambati
 
Machine Learning basics
Machine Learning basicsMachine Learning basics
Machine Learning basicsNeeleEilers
 
BSSML16 L5. Summary Day 1 Sessions
BSSML16 L5. Summary Day 1 SessionsBSSML16 L5. Summary Day 1 Sessions
BSSML16 L5. Summary Day 1 SessionsBigML, Inc
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial IndustrySubrat Panda, PhD
 
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for EveryoneGDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for EveryoneJames Anderson
 

Ähnlich wie Learning to learn Model Behavior: How to use "human-in-the-loop" to explain decisions. (20)

Model evaluation in the land of deep learning
Model evaluation in the land of deep learningModel evaluation in the land of deep learning
Model evaluation in the land of deep learning
 
Human in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AIHuman in the loop: Bayesian Rules Enabling Explainable AI
Human in the loop: Bayesian Rules Enabling Explainable AI
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
XAI (IIT-Patna).pdf
XAI (IIT-Patna).pdfXAI (IIT-Patna).pdf
XAI (IIT-Patna).pdf
 
Model Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep LearningModel Evaluation in the land of Deep Learning
Model Evaluation in the land of Deep Learning
 
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)
Ch17 lab r_verdu103: Entry level statistics exercise (descriptives)
 
C3 w5
C3 w5C3 w5
C3 w5
 
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.ai
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.aiPractical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.ai
Practical Tips for Interpreting Machine Learning Models - Patrick Hall, H2O.ai
 
Explainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretableExplainable AI - making ML and DL models more interpretable
Explainable AI - making ML and DL models more interpretable
 
Machine learning - session 3
Machine learning - session 3Machine learning - session 3
Machine learning - session 3
 
Machine learning ppt unit one syllabuspptx
Machine learning ppt unit one syllabuspptxMachine learning ppt unit one syllabuspptx
Machine learning ppt unit one syllabuspptx
 
Neural Nets Deconstructed
Neural Nets DeconstructedNeural Nets Deconstructed
Neural Nets Deconstructed
 
Inverse Modeling for Cognitive Science "in the Wild"
Inverse Modeling for Cognitive Science "in the Wild"Inverse Modeling for Cognitive Science "in the Wild"
Inverse Modeling for Cognitive Science "in the Wild"
 
The Incredible Disappearing Data Scientist
The Incredible Disappearing Data ScientistThe Incredible Disappearing Data Scientist
The Incredible Disappearing Data Scientist
 
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
Data Science  & AI Road Map by Python & Computer science tutor in MalaysiaData Science  & AI Road Map by Python & Computer science tutor in Malaysia
Data Science & AI Road Map by Python & Computer science tutor in Malaysia
 
Interpretable Machine Learning
Interpretable Machine LearningInterpretable Machine Learning
Interpretable Machine Learning
 
Machine Learning basics
Machine Learning basicsMachine Learning basics
Machine Learning basics
 
BSSML16 L5. Summary Day 1 Sessions
BSSML16 L5. Summary Day 1 SessionsBSSML16 L5. Summary Day 1 Sessions
BSSML16 L5. Summary Day 1 Sessions
 
Machine Learning in the Financial Industry
Machine Learning in the Financial IndustryMachine Learning in the Financial Industry
Machine Learning in the Financial Industry
 
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for EveryoneGDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
GDG Cloud Southlake #17: Meg Dickey-Kurdziolek: Explainable AI is for Everyone
 

Mehr von IDEAS - Int'l Data Engineering and Science Association

Mehr von IDEAS - Int'l Data Engineering and Science Association (20)

How to deliver effective data science projects
How to deliver effective data science projectsHow to deliver effective data science projects
How to deliver effective data science projects
 
Digital cracks in banking--Sid Nandi
Digital cracks in banking--Sid NandiDigital cracks in banking--Sid Nandi
Digital cracks in banking--Sid Nandi
 
“Full Stack” Data Science with R for Startups: Production-ready with Open-Sou...
“Full Stack” Data Science with R for Startups: Production-ready with Open-Sou...“Full Stack” Data Science with R for Startups: Production-ready with Open-Sou...
“Full Stack” Data Science with R for Startups: Production-ready with Open-Sou...
 
Battling Skynet: The Role of Humanity in Artificial Intelligence
Battling Skynet: The Role of Humanity in Artificial IntelligenceBattling Skynet: The Role of Humanity in Artificial Intelligence
Battling Skynet: The Role of Humanity in Artificial Intelligence
 
Implementing Artificial Intelligence with Big Data
Implementing Artificial Intelligence with Big DataImplementing Artificial Intelligence with Big Data
Implementing Artificial Intelligence with Big Data
 
Data Architecture (i.e., normalization / relational algebra) and Database Sec...
Data Architecture (i.e., normalization / relational algebra) and Database Sec...Data Architecture (i.e., normalization / relational algebra) and Database Sec...
Data Architecture (i.e., normalization / relational algebra) and Database Sec...
 
Blockchain Application in Real Estate Transactions
Blockchain Application in Real Estate TransactionsBlockchain Application in Real Estate Transactions
Blockchain Application in Real Estate Transactions
 
Practical Machine Learning at Work
Practical Machine Learning at WorkPractical Machine Learning at Work
Practical Machine Learning at Work
 
Artificial Intelligence: Hype, Reality, Vision.
Artificial Intelligence: Hype, Reality, Vision.Artificial Intelligence: Hype, Reality, Vision.
Artificial Intelligence: Hype, Reality, Vision.
 
Operationalizing your Data Lake: Get Ready for Advanced Analytics
Operationalizing your Data Lake: Get Ready for Advanced AnalyticsOperationalizing your Data Lake: Get Ready for Advanced Analytics
Operationalizing your Data Lake: Get Ready for Advanced Analytics
 
Introduction to Deep Reinforcement Learning
Introduction to Deep Reinforcement LearningIntroduction to Deep Reinforcement Learning
Introduction to Deep Reinforcement Learning
 
Best Practices in Data Partnerships Between Mayor's Office and Academia
Best Practices in Data Partnerships Between Mayor's Office and AcademiaBest Practices in Data Partnerships Between Mayor's Office and Academia
Best Practices in Data Partnerships Between Mayor's Office and Academia
 
Everything You Wish You Knew About Search
Everything You Wish You Knew About SearchEverything You Wish You Knew About Search
Everything You Wish You Knew About Search
 
AliMe Bot Platform Technical Practice - Alibaba`s Personal Intelligent Assist...
AliMe Bot Platform Technical Practice - Alibaba`s Personal Intelligent Assist...AliMe Bot Platform Technical Practice - Alibaba`s Personal Intelligent Assist...
AliMe Bot Platform Technical Practice - Alibaba`s Personal Intelligent Assist...
 
Data-Driven AI for Entertainment and Healthcare
Data-Driven AI for Entertainment and HealthcareData-Driven AI for Entertainment and Healthcare
Data-Driven AI for Entertainment and Healthcare
 
Generating Creative Works with AI
Generating Creative Works with AIGenerating Creative Works with AI
Generating Creative Works with AI
 
Using AI to Tackle the Future of Health Care Data
Using AI to Tackle the Future of Health Care DataUsing AI to Tackle the Future of Health Care Data
Using AI to Tackle the Future of Health Care Data
 
State of AI/ML in Real Estate
State of AI/ML in Real EstateState of AI/ML in Real Estate
State of AI/ML in Real Estate
 
Hot Dog, Not Hot Dog! Generate new training data without taking more photos.
Hot Dog, Not Hot Dog! Generate new training data without taking more photos.Hot Dog, Not Hot Dog! Generate new training data without taking more photos.
Hot Dog, Not Hot Dog! Generate new training data without taking more photos.
 
Machine Learning in Healthcare and Life Science
Machine Learning in Healthcare and Life ScienceMachine Learning in Healthcare and Life Science
Machine Learning in Healthcare and Life Science
 

Kürzlich hochgeladen

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Learning to learn Model Behavior: How to use "human-in-the-loop" to explain decisions.

  • 1. Learning to Learn Model Behavior: How to use “human in the loop” ?
  • 2. Learn more at datascience.com  |  Empower Your Data Scientists PREDICTIVE MODELING: FUN OR MISERY? 2 Only an expert can survive
  • 3. Learn more at datascience.com  |  Empower Your Data Scientists 3 PREDICTIONS OFTEN GO WRONG
  • 4. Learn more at datascience.com  |  Empower Your Data Scientists 4 WHEN AN ERROR OCCURS
  • 5. Learn more at datascience.com  |  Empower Your Data Scientists 5 ABOUT ME I am a Lead data scientist at DataScience.com. I enjoy applying and optimizing classical (Machine Learning) and Bayesian design strategy to solve real-world problems. Currently, I am exploring on better ways to evaluate and explain Model learned decision policies. I am also a member of AAAI and organizer of PyData So Cal meet-up group. Pramit Choudhary @MaverickPramit https://www.linkedin.com/in/pramitc/ https://github.com/pramitchoudhary
  • 6. Learn more at datascience.com  |  Empower Your Data Scientists 6 AGENDA • DEFINE MODEL INTERPRETATION • UNDERSTAND THE NEED FOR MODEL INTERPRETATION • DISCUSS DICHOTOMY BETWEEN PERFORMANCE AND INTERPRETATION • INTRODUCE SKATER • UNDERSTANDING ANALYTICAL WORKFLOW • DEMO • Q&A
  • 7. Learn more at datascience.com  |  Empower Your Data Scientists DEFINE INTERPRETATION 7 ● Definition is subjective - Data Exploration to build domain knowledge
  • 8. Learn more at datascience.com  |  Empower Your Data Scientists DEFINE INTERPRETATION 8 ● Definition is subjective - overlaps with Model Evaluation
  • 9. Learn more at datascience.com  |  Empower Your Data Scientists 9 WHAT IS MODEL INTERPRETATION? ● Model interpretation is an extension of Model Evaluation to help us understand machine learning/statistical modeling behavior better if possible in a human interpretable way ● With model interpretation, one should be able to answer the following questions: ○ Why did the model behave in a certain way? What are the relevant variables driving a model’s outcome - e.g. Customer's Lifetime Value, Fraud detection, Image Classification, Spam Detection ? ○ What other information can a model provide to avoid prediction errors ? What was the reason for a false positive ? ○ How can we trust the predictions of a “black box” model ? Is the predictive model biased ? ● Focus: is in-regards to Supervised learning problems
  • 10. Learn more at datascience.com  |  Empower Your Data Scientists ACCURACY VS MODEL COMPLEXITY 10 Error(x) = Bias2 + Variance + Irreducible Error **Reference: Scott Fortmann-Roe
  • 11. Learn more at datascience.com  |  Empower Your Data Scientists Predictive Optimism 11 overfitting underfitting **Reference: Scott Fortmann-Roe sweet-spot
  • 12. Learn more at datascience.com  |  Empower Your Data Scientists 12 WHY DO WE NEED MODEL INTERPRETATION? ● Helps in exploring and discovering latent or hidden feature interactions (useful for feature engineering/selection) ● Helps in understanding model variability as the environment changes (once the model is operationalized and is functional in a non-stationary environment) ● Helps in model comparison ● Helps an analyst or data scientist build domain knowledge about a particular use case by providing an understanding of interactions
  • 13. Learn more at datascience.com  |  Empower Your Data Scientists 13 WHY MODEL INTERPRETATION? ● Brings transparency to decision making to enable trust ○ Fair Credit Reporting Act (FCRA) U.S. Code § 1681 Mandate by U.S. government on Fair and Accurate Credit reporting. Predictive models should not be discriminative (biased) toward any group.
  • 14. Learn more at datascience.com  |  Empower Your Data Scientists 14 Are all predictive models interpretable? Does an interpretable model always provides the best model ?
  • 15. Learn more at datascience.com  |  Empower Your Data Scientists PERFORMANCE VS. INTERPRETABILITY Variable B Variable A Simple decision boundary (Linear Monotonic) Complex decision boundary( NonLinear Non-Monotonic ) Credit card approved Credit card denied Non-linear decision boundary (nonlinear Monotonic)
  • 16. Learn more at datascience.com  |  Empower Your Data Scientists HOW ABOUT A MORE DIFFICULT RELATIONSHIP? Data Learned decision boundaries
  • 17. Learn more at datascience.com  |  Empower Your Data Scientists 17 Local Interpretation Being able to explain the conditional interaction between dependent(response) variables and independent(predictor, or explanatory) variables wrt to a single prediction SCOPE OF INTERPRETATION Global Interpretation Being able to explain the conditional interaction between dependent(response) variables and independent(predictor, or explanatory) variables based on the complete dataset Global Interpretation Local Interpretation
  • 18. Learn more at datascience.com  |  Empower Your Data Scientists 18 GLOBAL INTERPRETATION ● Relative Importance of Predictor Variable to evaluate Estimator’s behavior ○ Model-specific Feature importance - e.g. ■ Linear Model ( based on the absolute value of t-statistics ) ■ Random Forest ( based permutation importance or Gini importance ) ■ Recursive Feature Elimination(RFE) - recursively prune least important features ○ Model Independent Feature Importance - this will be our focus for today’s discussion ■ observing entropy of predictive performance based on random perturbation of feature set ■ observing entropy of model specific scoring metric ● Classification: f1-score, precision/recall ● Regression: mean squared error ● Usefulness ○ Helps in identifying important covariates contributing to target prediction enabling better interpretability ○ Might help in improving accuracy and computation time by eliminating redundant or unimportant features
  • 19. Learn more at datascience.com  |  Empower Your Data Scientists 19 GLOBAL INTERPRETATION ● Partial Dependence Plot (PDP) ○ Helps in understanding the average partial dependence of the target function f(Y|Xs ) on subset of features by marginalizing over rest of the features ( complement set of features ) ○ Works well with input variable subset with low cardinality ( n ≤ 2 ) ○ e.g. PDPs on california housing data Fig A: HouseAge vs Avg. House Value Fig B: Avg. occupants vs Avg. House Value
  • 20. Learn more at datascience.com  |  Empower Your Data Scientists 20 PDP continues ... ● Helps in understanding interaction impact of two independent features in a low dimensional space visually ○ on Xs where X = Xs U Xc is ○ Average value of f() when Xs is fixed and Xc is varied over its marginal distribution ○ Integrated over values of Xc p(HouseAge, Avg. Occupants per household) vs Avg. House Value: One can observe that once the avg. occupancy > 2, houseAge does not seem to have much of an effect on the avg. house value
  • 21. Learn more at datascience.com  |  Empower Your Data Scientists 21 PDP continues ... ● Might incorrectly articulate the interaction between predictive variable and target variable ● In Fig A, we plot a variable x_2 vs Y over say a sample of 500 points ● In Fig B, we plot a PDP of a model for predictor variable x_2 vs Y_hat. ● Observation: PDP suggests that on average x_2 has no influence on target variable Fig A: Scatter plot Fig B: PDP **Reference: Alex Goldstein et al.
  • 22. Learn more at datascience.com  |  Empower Your Data Scientists 22 LOCAL INTERPRETATION ● Ability to inspect and evaluate individual prediction in human interpretable format with the help of surrogate models faithfully ○ ὲ : model explanation function ○ ℒ : measure of fidelity ○ ƒ : is the base model estimator ○ g ⊂ G : a set of interpretable models [ Linear Models, Decision Trees ] ○ ∏x : proximity measure to define locality around an individual point ○ Ω : to regularize complexity e.g. depth of the tree, learning rate, non-zero weights for linear models
  • 23. Learn more at datascience.com  |  Empower Your Data Scientists UNDERSTANDING ANALYTICAL WORKFLOW ? 2 3 Define Hypothesis Use relevant key performance indicators Handle Data Handle Missing Data Data Partitioning Engineer and Select Features Transform data Select relevant features Build Model Build a predictive model Deploy Model Operationalize analytics as scalable REST APIs Test and Monitor Model 1. Log and track behavior 2. Evaluate 3. Conduct A/B or multi-armed bandit testing 1 2 3 4 5 6 Model Interpretation: In-Memory Models ● Model assessment ● Explain model at a global and local level ● Publish insights, make collaborative and informed decisions Model Interpretation: Deployed Models ● Explore and explain model behavior ● Debug and discover errors to improve performance RETRAIN EVALUATE Improve existing hypothesis/Generate a new one
  • 24. Learn more at datascience.com  |  Empower Your Data Scientists HOW DO WE SOLVE THIS PROBLEM? ● Problems: ○ Data scientists are choosing easy-to-interpret models like simple linear models or decision trees over high-performing neural networks or ensembles, effectively sacrificing accuracy for interpretability ○ Community is struggling to keep pace with new algorithms and frameworks (sklearn, R packages, H20.ai) ● Possible Solution: What if there was an interpretation library that… ○ Is model agnostic ○ Provides human-interpretable explanation ○ Is framework agnostic (scikit-learn, H20.ai, Vowpal Wabbit) ○ Is language agnostic (R, Python) ○ Allows one to interpret third-party models (Algorithmia, indico) ○ Supports interpretation both during modeling build process and post deployment
  • 25. Learn more at datascience.com  |  Empower Your Data Scientists INTRODUCING ...
  • 26. Learn more at datascience.com  |  Empower Your Data Scientists 26 WHAT IS SKATER? ● Python library designed to demystify the inner workings of black-box models ● Uses a number of techniques for model interpretation to explain the relationships between input data and desired output, both globally and locally ● One can interpret models both before and after they are operationalized
  • 27. Learn more at datascience.com  |  Empower Your Data Scientists 27 SKATER USES - Model-agnostic Variable Importance for global interpretation F1: 1.0 F1: 0.96 F1: 0.94F1: 0.95
  • 28. Learn more at datascience.com  |  Empower Your Data Scientists 28 SKATER USES - Partial dependence plots for global interpretation a. One-way interaction b. Two-way interaction ● A visualization technique that can be used to understand and estimate the dependence of the joint interaction of the subset of input variables to the model's response function
  • 29. Learn more at datascience.com  |  Empower Your Data Scientists 29 PDPs continued ● PDPs suffers from cancellation effect because of averaging ● Variance effect helps in highlighting this cancellation One-way interaction with variance
  • 30. Learn more at datascience.com  |  Empower Your Data Scientists 30 SKATER USES - Local Interpretable Model-Agnostic Explanations (LIME) for local interpretation ● A novel technique developed by Marco, Sameer and Carlos to explain the behavior of any classifier or regressor in an human interpretable way using linear surrogate models to approximate around the vicinity of a single prediction Deployed Model - indico.io Deployed Model - algorithmia
  • 31. Learn more at datascience.com  |  Empower Your Data Scientists 31 LIME continues ... ● Regression ○ Gold Label : No Cancer ○ Predicted(y_hat): No Cancer
  • 32. Learn more at datascience.com  |  Empower Your Data Scientists 32 SKATER USES ● LIME for image interpretability ( experimental ) highlight the feature boundaries highlight the feature boundaries Will this be classified correctly ? Got classified as a “dog” but doesn’t seem convincing ● Which features ? ● Was it the green background ?
  • 33. Learn more at datascience.com  |  Empower Your Data Scientists Evaluate (Y|X) Data Data Unboxed model Evaluate Partial dependence plot Relative variable importance Local Interpretable Model Explanation (LIME) R or Python model (linear, nonlinear, ensemble, neural networks) Scikit-learn, caret and rpart packages for CRAN H20.ai, Algorithmia, etc. WITHOUT INTERPRETATION ... WITH SKATER ... Black box model How do I understand my models? More coming soon ...
  • 34. Learn more at datascience.com  |  Empower Your Data Scientists COMING SOON ... 34 ● Predictions as conditional statements: An interpretable model, with series of decision rules ○ Given a dataset, mine a set of antecedents ○ Possible to observe and learn a manageable set of rules and their orders Fig: Series of rules capturing the p(Survival) on titanic dataset
  • 35. Learn more at datascience.com  |  Empower Your Data Scientists 35 JUPYTER’S INTERACTIVENESS ● Human in the loop is very useful for Model Evaluation ● Being able to do it in a convenient way, increases efficiency ● Interactiveness, ○ Jupyter Widgets: - UI controls to inspect code and data interactively ○ Enables collaboration and sharing: ■ Widgets can be serialized and embedded in ● html web pages, ● Sphinx style documents ● html-converted notebooks on nbviewer ○ Jupyter dashboards ■ is a dashboard layout extension ■ helpful in organizing notebook outputs - text, images, plots, animations in report like layout
  • 36. Learn more at datascience.com  |  Empower Your Data Scientists A QUICK GLIMPSE INTO THE FUTURE 36 Top 5 predictions: 1. seat belt = 0.75 2. limousine = 0.051 3. golf cart = 0.017 4. minivan = 0.015 5. car mirror = 0.015 Visual QnA: Is the person driving the car safely ?
  • 37. Learn more at datascience.com  |  Empower Your Data Scientists 37 SPECIAL THANKS ● Special thanks to Aaron Kramer( one of the original authors of Skater ), Ben Van Dyke and rest of the datascience.com teammates for helping out with Skater ● Thank you to IDEAS for providing us the opportunity to share our thoughts with a wider community
  • 38. Learn more at datascience.com  |  Empower Your Data Scientists Q&A info@datascience.com pramit@datascience.com @MaverickPramit @DataScienceInc Help wanted(Skater): https://tinyurl.com/yd6tnc7l
  • 39. Learn more at datascience.com  |  Empower Your Data Scientists Appendix
  • 40. Learn more at datascience.com  |  Empower Your Data Scientists 40 References: ● A. Weller, "Challenges for Transparency": https://arxiv.org/abs/1708.01870 ● Max Kuhn, Variable Importance Using The caret pkg: http://ftp.uni-bayreuth.de/math/statlib/R/CRAN/doc/vignettes/caret/caretVarImp.pdf ● Friedman’ 01, Greedy Function Approximation: A gradient boosting machine: https://statweb.stanford.edu/~jhf/ftp/trebst.pdf ● Recursive Feature Elimination: https://arxiv.org/pdf/1310.5726.pdf ● LIME: https://arxiv.org/pdf/1602.04938v1.pdf ● Nothing Else Matters: https://arxiv.org/pdf/1611.05817v1.pdf ● Peeking Inside the Black Box: https://arxiv.org/abs/1309.6392