interpretable machine learning using lime framework - kasia kulma (phd), data scientist, aviva

39
Interpretable Machine Learning Using LIME Framework Kasia Kulma (PhD), Data Scientist [email protected] @KKulma

Upload: sri-ambati

Post on 28-Jan-2018

202 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Interpretable Machine Learning

Using LIME Framework

Kasia Kulma (PhD), Data Scientist

[email protected]

@KKulma

Page 2: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

About myself...

Page 3: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Data

https://kkulma.github.io

Page 4: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Data Non-Data

https://kkulma.github.io

Page 5: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

System that performs behaviour but you don’t know how it works

Page 6: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Will the loan default?

Page 7: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Will the loan default?Is it a cancer cell? Will this prisoner commit a crime? Will this machine break down?

Page 8: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Will the loan default?

X1

X2

Savings

Income

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Page 9: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Get Historical Data

X1

X2

Savings

Income

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Page 10: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Linear Classifiers

X1

X2

YOU CAN INTERPRET IT!

IF 10X1 + X2 - 5 > 0

OTHERWISE

Savings

Income

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Page 11: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Decision trees

X1

X2

X1 > 0.5

X2 > 0.5

YOU CAN STILL INTERPRET IT!

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Page 12: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Big Data: More Complexity & More Dimensions

X1

X2

Page 13: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

X1

Big Data: More Complexity & More Dimensions

X2

Page 14: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

X1

Big Data: More Complexity & More Dimensions

X2

Page 15: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

X1

Big Data: More Complexity & More Dimensions

X2

Page 16: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Accuracy VS Interpretability

Interpretability

Accuracy

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Page 17: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Accuracy VS Interpretability

Interpretability

Accuracy

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

?

Page 18: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Local InterpretableModel-agnosticExplanations

Page 19: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Local InterpretableModel-agnosticExplanations

Page 20: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Local InterpretableModel-agnosticExplanations

Page 21: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Being Local and Model-Agnostic…

Page 22: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Being Local and Model-Agnostic…

Page 23: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Explanation is an interpretable model, that is locally accurate

Source: https://www.youtube.com/watch?v=LAm4QmVaf0E&t=3658s

Being Local and Model-Agnostic…

Page 24: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 25: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 26: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 27: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 28: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 29: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

HOW LIME WORKS

1. Permute data*

3. Make predictions on new data using complex model

2. Calculate distance between permutations and original observations*

4. Pick m features best describing the complex model outcome from the permuted data.*

5. Fit a simple model to the permuted data with m features and similarity scores as weights *

6. Feature weights from the simple model make explanations for the complex models local behaviour

Page 30: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

CAN YOU BUILD YOUR TRUST BASED ON ACCURACY?

Page 31: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

Only 1 mistake!

CAN YOU BUILD YOUR TRUST BASED ON ACCURACY?

Page 32: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

… YES, IF YOU WANT TO BUILD A GREAT SNOW DETECTOR!

Page 33: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

LIME IN TEXT ANALYTICS

Page 34: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

UNDERSTANDING CLASSIFICATION OF BENIGN AND MALIGNANT BREAST CANCER CELLS

LET’S SEE SOME CODE

Page 35: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

WHY IS IT IMPORTANT?

How can we trust the predictions are correct?

Trust

How can we understand and predict the behavior?

Predict

How do we improve it to prevent potential mistakes?

Improve

Page 36: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva

WHY IS IT IMPORTANT?

How can we trust the predictions are correct?

Trust

How can we understand and predict the behavior?

Predict

How do we improve it to prevent potential mistakes?

Improve

Non-ML experts with explanations

VS

ML experts without explanations

Improved prediction of model behavior and time to make that assessment when explanations were provided

Being able to interpret the explanations and compare classifiers based on them

Page 37: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva
Page 38: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva
Page 39: Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data Scientist, Aviva