SlideShare a Scribd company logo
1 of 24
Download to read offline
Model Agnostic Methods for Interpretable Machine
Learning
Ankit Tewari, Carles Mitjans Coma & Tom´as Izquierdo
BarcelonaTech UPC FIB
Machine Learning project, March-June 2018
References
Introduction
ML is winning popularity: games, medical, driving, etc.
Black-Box models - Inner working
The necessity for interpretability comes from an incompleteness in
the problem formalisation [?], meaning that for certain problems or
tasks it is not enough to get the answer (the what). The model also
has to give an explanation how it came to the answer (the why),
because a correct prediction only partially solves your original
problem.
Aim of interpretation models - Control biased results
Minorities: winner takes it all.
Ethics: Job seeking, terrorist detection, etc.
Accuracy : when applying the model to real life - 99% accuracy
beacuse of test-validation. Existance of correlations that might not
ecists in real time.
References
Methods
Local Surrogate Models (LIME)
Feature Importance Plot
Shapley Values
Individual Conditional Expectation (ICE)
References
Methods
Local Surrogate Model (LIME)
We can describe the recipe for fitting local surrogate models as follows:
We first choose our instance (observations) of interest for which we
want to have an explanation of its black box prediction
Then we perturb our dataset and get the black box predictions for
these new points
We then weight the new samples by their proximity to the instance
of interest
Finally, we fit a weighted, interpretable model on the dataset with
the variations and explain prediction by interpreting the local model
References
Methods
Feature Importance
A feature’s importance is the increase in the modelˆas prediction
error after we permuted the feature’s values (breaks the
relationship between the feature and the outcome)
Input: Trained model ˆf , feature matrix X , target vector Y , error
measure L(Y , ˆY )
1. Estimate the original model error eorig (ˆf ) = L(Y , ˆf (X)) (e.g. mean
squared error)
2. For each feature j ∈ {1, ..., p} d
Generate feature matrix Xpermj
by permuting feature Xj in X. This
breaks the association between Xj and Y .
Estimate error eperm = L(Y , ˆf (Xpermj
)) based on the predictions of
the permuted data
Calculate permutation feature importance FIj = eperm(ˆf )/eorig (ˆf ) .
Alternatively, the difference can be used: FIj = eperm(ˆf ) − eorig (f )
3. Sort variables by descending FI.
References
Methods
Shapley Values
The Shapley value is the average marginal contribution of a
feature value over all possible coalitions.
Predictions can be explained by assuming that each feature is
a ’player’ in a game where the prediction is the payout. The
Shapley value - a method from coalitional game theory - tells
us how to fairly distribute the ’payout’ among the features.
The interpretation of the Shapley value. φij for feature j and
instance i is: the feature value xij contributed φij towards the
prediction for instance i compared to the average prediction
for the dataset. The Shapley value works for both classification (if
we deal with probabilities) and regression. We use the Shapley value
to analyse the predictions of a Random Forest model predicting the
absenteeism at workplace.
References
Methods
Individual Conditional Expectation (ICE)
The partial dependence plot (PDP) shows the marginal effect of a
feature on the predicted outcome of a previously fit model (J. H.
Friedman 2001). The prediction function is fixed at a few values of
the chosen features and averaged over the other features.
For a chosen feature, Individual Conditional Expectation (ICE) plots
draw one line per instance, representing how the instanceˆas
prediction changes when the feature changes. The partial
dependence plot for visualizing the average effect of a feature is a
global method, because it does not focus on specific instances, but
on an overall average. The equivalent to a PDP for local
expectations is called individual conditional expectation (ICE) plot
References
Results - Iris - Intepretable
Dataset: 4 features (sepal/petal length/width)
1 multilabel(setosa,versicolor,virginica)
Interpretable model: Decission Tree
References
Results - Iris - Non-Intepretable
Non-interpretable model: Random Forest
References
Results - Absenteeism on the Workplace Prediction
Interpretable model
Dataset: 19 features
1 continuous target variable
Interpretable model: Decision tree
References
Results - Absenteeism on the Workplace Prediction
Non-interpretable model : LIME for Gradient Boosting Machine (GBM)
References
Results - Absenteeism on the Workplace Prediction
Non-interpretable model : LIME for Interpreting Random Forest (RF)
References
Results - Absenteeism on the Workplace Prediction
Non-interpretable model: Feature Importance Plot using GBM
References
Results - Absenteeism on the Workplace Prediction
Non-interpretable model : Shapley Values
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
Rings = β0 + β1Sex(F) + β2Length + β3Diameter+
+ β4Height + β5Whole.weight + β6Shucked.weight+
+ β7Viscera.weight + β8Shell.weight
(1)
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
log(Ringsi ) = 1.18 + (-0.1)Sex + 2.07Diameter +
+ 3.91Height + (-0.61) Viscera2 + Shell2 + Shucked2
(1)
References
Results - Abalone
Interpretable model
1 Data inspection and verification of integrity (preprocessing)
2 Start with simple OLS regression
3 Refine the model
4 Final model: log-linear
β0(intercept) = 1.18 All variables set to 0
β1(Sex) = −0.1 baseline : Infant | Grownup change : e−0.1
β2(Diameter) = 2.07 Factor change : e2.07
β3(Height) = 3.91 Factor change : e3.91
β4(
√
Viscera2 + Shell2 + Shucked2) = −0.61 Factor change : e−0.61
References
Results - Abalone
Non-interpretable model
1 Apply Random Forest
2 Visualize overall feature importance
3 Visualize single feature importance
4 Visualize overall feature interaction
5 Visualize single feature interaction
References
Results - Abalone
Non-interpretable model
1 Apply Random Forest
2 Visualize overall feature importance
3 Visualize single feature importance
4 Visualize overall feature interaction
5 Visualize single feature interaction
References
Conclusion & Future work
Conslusion
It would be interesting to observe that how the predictions can be
explained if tend to use a very complex neural network or any other
deep learning algorithm. In such a scenario, we can always rely on
LIME for giving us an insight about the local behaviour.
Future work
In the future, we aim to explore more on the idea of interpreting the
predictions for time series made by LSTM models as an example
References
References
References
1 European Union’s resource website to educate the public
about the main elements of the General Data Protection
Regulation (GDPR) - https://www.eugdpr.org/
2 Goodman, B. and Flaxman, S., 2016. European Union
regulations on algorithmic decision-making and a”right to
explanation”. arXiv preprint arXiv:1606.08813
3 Ribeiro, M.T., Singh, S. and Guestrin, C., 2016, August. Why
should i trust you?: Explaining the predictions of any classifier.
In Proceedings of the 22nd ACM SIGKDD International
Conference on Knowledge Discovery and Data Mining (pp.
1135-1144). ACM.
4 Interpretable Machine Learning: A Guide for Making Black
Box Models Explainable -
https://christophm.github.io/interpretable-ml-
book/agnostic.html

More Related Content

What's hot

General Linear Model | Statistics
General Linear Model | StatisticsGeneral Linear Model | Statistics
General Linear Model | StatisticsTransweb Global Inc
 
Machine Learning Feature Selection - Random Forest
Machine Learning Feature Selection - Random Forest Machine Learning Feature Selection - Random Forest
Machine Learning Feature Selection - Random Forest Rupak Roy
 
Machine learning for deep learning
Machine learning for deep learningMachine learning for deep learning
Machine learning for deep learningSung Yub Kim
 
Machine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionMachine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionSiddharth Shrivastava
 
On fuzzy concepts in engineering ppt. ncce
On fuzzy concepts in engineering ppt. ncceOn fuzzy concepts in engineering ppt. ncce
On fuzzy concepts in engineering ppt. ncceSurender Singh
 
Statistics for deep learning
Statistics for deep learningStatistics for deep learning
Statistics for deep learningSung Yub Kim
 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsDerek Kane
 
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)Alkis Vazacopoulos
 
Introduction to statistical modeling in R
Introduction to statistical modeling in RIntroduction to statistical modeling in R
Introduction to statistical modeling in Rrichardchandler
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introductionThe IOT Academy
 
Fuzzy logic and its applications
Fuzzy logic and its applicationsFuzzy logic and its applications
Fuzzy logic and its applicationsTarek Kalaji
 
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...Madhav Mishra
 

What's hot (19)

General Linear Model | Statistics
General Linear Model | StatisticsGeneral Linear Model | Statistics
General Linear Model | Statistics
 
Machine Learning Feature Selection - Random Forest
Machine Learning Feature Selection - Random Forest Machine Learning Feature Selection - Random Forest
Machine Learning Feature Selection - Random Forest
 
Irt assessment
Irt assessmentIrt assessment
Irt assessment
 
Machine learning session1
Machine learning   session1Machine learning   session1
Machine learning session1
 
Machine learning for deep learning
Machine learning for deep learningMachine learning for deep learning
Machine learning for deep learning
 
Machine Learning - Simple Linear Regression
Machine Learning - Simple Linear RegressionMachine Learning - Simple Linear Regression
Machine Learning - Simple Linear Regression
 
On fuzzy concepts in engineering ppt. ncce
On fuzzy concepts in engineering ppt. ncceOn fuzzy concepts in engineering ppt. ncce
On fuzzy concepts in engineering ppt. ncce
 
Fuzzy
FuzzyFuzzy
Fuzzy
 
The picture fuzzy distance measure in controlling network power consumption
The picture fuzzy distance measure in controlling network power consumptionThe picture fuzzy distance measure in controlling network power consumption
The picture fuzzy distance measure in controlling network power consumption
 
Statistics for deep learning
Statistics for deep learningStatistics for deep learning
Statistics for deep learning
 
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic NetsData Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
Data Science - Part XII - Ridge Regression, LASSO, and Elastic Nets
 
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)
Industrial Linear/Logic/Logistics and Nonlinear Programming Language (ILP/INL)
 
Introduction to statistical modeling in R
Introduction to statistical modeling in RIntroduction to statistical modeling in R
Introduction to statistical modeling in R
 
20120140506009
2012014050600920120140506009
20120140506009
 
Introduction to ml
Introduction to mlIntroduction to ml
Introduction to ml
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introduction
 
Fuzzy logic and its applications
Fuzzy logic and its applicationsFuzzy logic and its applications
Fuzzy logic and its applications
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 2 Semester 3 MSc IT Part 2 Mumbai Univer...
 

Similar to Intepretable Machine Learning

Citython presentation
Citython presentationCitython presentation
Citython presentationAnkit Tewari
 
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATIONGENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATIONijaia
 
Sample_Subjective_Questions_Answers (1).pdf
Sample_Subjective_Questions_Answers (1).pdfSample_Subjective_Questions_Answers (1).pdf
Sample_Subjective_Questions_Answers (1).pdfAaryanArora10
 
Deep Learning: Introduction & Chapter 5 Machine Learning Basics
Deep Learning: Introduction & Chapter 5 Machine Learning BasicsDeep Learning: Introduction & Chapter 5 Machine Learning Basics
Deep Learning: Introduction & Chapter 5 Machine Learning BasicsJason Tsai
 
0 Model Interpretation setting.pdf
0 Model Interpretation setting.pdf0 Model Interpretation setting.pdf
0 Model Interpretation setting.pdfLeonardo Auslender
 
A simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsA simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsDevansh16
 
Interpretable ML
Interpretable MLInterpretable ML
Interpretable MLMayur Sand
 
Chapter3 hundred page machine learning
Chapter3 hundred page machine learningChapter3 hundred page machine learning
Chapter3 hundred page machine learningmustafa sarac
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learningSadia Zafar
 
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...csandit
 
A Unified Approach to Interpreting Model Predictions (SHAP)
A Unified Approach to Interpreting Model Predictions (SHAP)A Unified Approach to Interpreting Model Predictions (SHAP)
A Unified Approach to Interpreting Model Predictions (SHAP)Rama Irsheidat
 
Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)Hayim Makabee
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmPalin analytics
 
A general frame for building optimal multiple SVM kernels
A general frame for building optimal multiple SVM kernelsA general frame for building optimal multiple SVM kernels
A general frame for building optimal multiple SVM kernelsinfopapers
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptShayanChowdary
 
Top 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdfTop 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdfDatacademy.ai
 
Intro to Feature Selection
Intro to Feature SelectionIntro to Feature Selection
Intro to Feature Selectionchenhm
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.pptbutest
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.pptbutest
 

Similar to Intepretable Machine Learning (20)

Citython presentation
Citython presentationCitython presentation
Citython presentation
 
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATIONGENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
GENETIC ALGORITHM FOR FUNCTION APPROXIMATION: AN EXPERIMENTAL INVESTIGATION
 
Sample_Subjective_Questions_Answers (1).pdf
Sample_Subjective_Questions_Answers (1).pdfSample_Subjective_Questions_Answers (1).pdf
Sample_Subjective_Questions_Answers (1).pdf
 
Deep Learning: Introduction & Chapter 5 Machine Learning Basics
Deep Learning: Introduction & Chapter 5 Machine Learning BasicsDeep Learning: Introduction & Chapter 5 Machine Learning Basics
Deep Learning: Introduction & Chapter 5 Machine Learning Basics
 
0 Model Interpretation setting.pdf
0 Model Interpretation setting.pdf0 Model Interpretation setting.pdf
0 Model Interpretation setting.pdf
 
A simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representationsA simple framework for contrastive learning of visual representations
A simple framework for contrastive learning of visual representations
 
Interpretable ML
Interpretable MLInterpretable ML
Interpretable ML
 
Chapter3 hundred page machine learning
Chapter3 hundred page machine learningChapter3 hundred page machine learning
Chapter3 hundred page machine learning
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learning
 
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
COMPARING THE CUCKOO ALGORITHM WITH OTHER ALGORITHMS FOR ESTIMATING TWO GLSD ...
 
eScience SHAP talk
eScience SHAP talkeScience SHAP talk
eScience SHAP talk
 
A Unified Approach to Interpreting Model Predictions (SHAP)
A Unified Approach to Interpreting Model Predictions (SHAP)A Unified Approach to Interpreting Model Predictions (SHAP)
A Unified Approach to Interpreting Model Predictions (SHAP)
 
Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)Explainable Machine Learning (Explainable ML)
Explainable Machine Learning (Explainable ML)
 
Decision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning AlgorithmDecision Trees for Classification: A Machine Learning Algorithm
Decision Trees for Classification: A Machine Learning Algorithm
 
A general frame for building optimal multiple SVM kernels
A general frame for building optimal multiple SVM kernelsA general frame for building optimal multiple SVM kernels
A general frame for building optimal multiple SVM kernels
 
chap4_Parametric_Methods.ppt
chap4_Parametric_Methods.pptchap4_Parametric_Methods.ppt
chap4_Parametric_Methods.ppt
 
Top 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdfTop 100+ Google Data Science Interview Questions.pdf
Top 100+ Google Data Science Interview Questions.pdf
 
Intro to Feature Selection
Intro to Feature SelectionIntro to Feature Selection
Intro to Feature Selection
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.ppt
 
MachineLearning.ppt
MachineLearning.pptMachineLearning.ppt
MachineLearning.ppt
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
"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
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
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?
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 
"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
 

Intepretable Machine Learning

  • 1. Model Agnostic Methods for Interpretable Machine Learning Ankit Tewari, Carles Mitjans Coma & Tom´as Izquierdo BarcelonaTech UPC FIB Machine Learning project, March-June 2018
  • 2. References Introduction ML is winning popularity: games, medical, driving, etc. Black-Box models - Inner working The necessity for interpretability comes from an incompleteness in the problem formalisation [?], meaning that for certain problems or tasks it is not enough to get the answer (the what). The model also has to give an explanation how it came to the answer (the why), because a correct prediction only partially solves your original problem. Aim of interpretation models - Control biased results Minorities: winner takes it all. Ethics: Job seeking, terrorist detection, etc. Accuracy : when applying the model to real life - 99% accuracy beacuse of test-validation. Existance of correlations that might not ecists in real time.
  • 3. References Methods Local Surrogate Models (LIME) Feature Importance Plot Shapley Values Individual Conditional Expectation (ICE)
  • 4. References Methods Local Surrogate Model (LIME) We can describe the recipe for fitting local surrogate models as follows: We first choose our instance (observations) of interest for which we want to have an explanation of its black box prediction Then we perturb our dataset and get the black box predictions for these new points We then weight the new samples by their proximity to the instance of interest Finally, we fit a weighted, interpretable model on the dataset with the variations and explain prediction by interpreting the local model
  • 5. References Methods Feature Importance A feature’s importance is the increase in the modelˆas prediction error after we permuted the feature’s values (breaks the relationship between the feature and the outcome) Input: Trained model ˆf , feature matrix X , target vector Y , error measure L(Y , ˆY ) 1. Estimate the original model error eorig (ˆf ) = L(Y , ˆf (X)) (e.g. mean squared error) 2. For each feature j ∈ {1, ..., p} d Generate feature matrix Xpermj by permuting feature Xj in X. This breaks the association between Xj and Y . Estimate error eperm = L(Y , ˆf (Xpermj )) based on the predictions of the permuted data Calculate permutation feature importance FIj = eperm(ˆf )/eorig (ˆf ) . Alternatively, the difference can be used: FIj = eperm(ˆf ) − eorig (f ) 3. Sort variables by descending FI.
  • 6. References Methods Shapley Values The Shapley value is the average marginal contribution of a feature value over all possible coalitions. Predictions can be explained by assuming that each feature is a ’player’ in a game where the prediction is the payout. The Shapley value - a method from coalitional game theory - tells us how to fairly distribute the ’payout’ among the features. The interpretation of the Shapley value. φij for feature j and instance i is: the feature value xij contributed φij towards the prediction for instance i compared to the average prediction for the dataset. The Shapley value works for both classification (if we deal with probabilities) and regression. We use the Shapley value to analyse the predictions of a Random Forest model predicting the absenteeism at workplace.
  • 7. References Methods Individual Conditional Expectation (ICE) The partial dependence plot (PDP) shows the marginal effect of a feature on the predicted outcome of a previously fit model (J. H. Friedman 2001). The prediction function is fixed at a few values of the chosen features and averaged over the other features. For a chosen feature, Individual Conditional Expectation (ICE) plots draw one line per instance, representing how the instanceˆas prediction changes when the feature changes. The partial dependence plot for visualizing the average effect of a feature is a global method, because it does not focus on specific instances, but on an overall average. The equivalent to a PDP for local expectations is called individual conditional expectation (ICE) plot
  • 8. References Results - Iris - Intepretable Dataset: 4 features (sepal/petal length/width) 1 multilabel(setosa,versicolor,virginica) Interpretable model: Decission Tree
  • 9. References Results - Iris - Non-Intepretable Non-interpretable model: Random Forest
  • 10. References Results - Absenteeism on the Workplace Prediction Interpretable model Dataset: 19 features 1 continuous target variable Interpretable model: Decision tree
  • 11. References Results - Absenteeism on the Workplace Prediction Non-interpretable model : LIME for Gradient Boosting Machine (GBM)
  • 12. References Results - Absenteeism on the Workplace Prediction Non-interpretable model : LIME for Interpreting Random Forest (RF)
  • 13. References Results - Absenteeism on the Workplace Prediction Non-interpretable model: Feature Importance Plot using GBM
  • 14. References Results - Absenteeism on the Workplace Prediction Non-interpretable model : Shapley Values
  • 15. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear
  • 16. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear
  • 17. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear
  • 18. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear Rings = β0 + β1Sex(F) + β2Length + β3Diameter+ + β4Height + β5Whole.weight + β6Shucked.weight+ + β7Viscera.weight + β8Shell.weight (1)
  • 19. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear log(Ringsi ) = 1.18 + (-0.1)Sex + 2.07Diameter + + 3.91Height + (-0.61) Viscera2 + Shell2 + Shucked2 (1)
  • 20. References Results - Abalone Interpretable model 1 Data inspection and verification of integrity (preprocessing) 2 Start with simple OLS regression 3 Refine the model 4 Final model: log-linear β0(intercept) = 1.18 All variables set to 0 β1(Sex) = −0.1 baseline : Infant | Grownup change : e−0.1 β2(Diameter) = 2.07 Factor change : e2.07 β3(Height) = 3.91 Factor change : e3.91 β4( √ Viscera2 + Shell2 + Shucked2) = −0.61 Factor change : e−0.61
  • 21. References Results - Abalone Non-interpretable model 1 Apply Random Forest 2 Visualize overall feature importance 3 Visualize single feature importance 4 Visualize overall feature interaction 5 Visualize single feature interaction
  • 22. References Results - Abalone Non-interpretable model 1 Apply Random Forest 2 Visualize overall feature importance 3 Visualize single feature importance 4 Visualize overall feature interaction 5 Visualize single feature interaction
  • 23. References Conclusion & Future work Conslusion It would be interesting to observe that how the predictions can be explained if tend to use a very complex neural network or any other deep learning algorithm. In such a scenario, we can always rely on LIME for giving us an insight about the local behaviour. Future work In the future, we aim to explore more on the idea of interpreting the predictions for time series made by LSTM models as an example
  • 24. References References References 1 European Union’s resource website to educate the public about the main elements of the General Data Protection Regulation (GDPR) - https://www.eugdpr.org/ 2 Goodman, B. and Flaxman, S., 2016. European Union regulations on algorithmic decision-making and a”right to explanation”. arXiv preprint arXiv:1606.08813 3 Ribeiro, M.T., Singh, S. and Guestrin, C., 2016, August. Why should i trust you?: Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 1135-1144). ACM. 4 Interpretable Machine Learning: A Guide for Making Black Box Models Explainable - https://christophm.github.io/interpretable-ml- book/agnostic.html