Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
LIME
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sinhrks
December 16, 2017
1.5k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LIME
@Tokyo.R 66
https://atnd.org/events/92993
Sinhrks
December 16, 2017
More Decks by Sinhrks
See All by Sinhrks
daskperiment: Reproducibility for Humans
sinhrks
1
450
PythonとApache Arrow
sinhrks
6
2.1k
大規模データの機械学習におけるDaskの活用
sinhrks
10
3.3k
機械学習と解釈可能性
sinhrks
7
5.8k
データ分析言語R 1年の振り返り
sinhrks
5
2.6k
pandasでのOSS活動事例と最初の一歩
sinhrks
2
20k
Dask Distributedによる分散機械学習
sinhrks
4
1.6k
Data processing using pandas and Dask
sinhrks
1
300
pandasでのOSS活動事例
sinhrks
0
840
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
A Tale of Four Properties
chriscoyier
163
24k
Making the Leap to Tech Lead
cromwellryan
135
10k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Mobile First: as difficult as doing things right
swwweet
225
10k
Darren the Foodie - Storyboard
khoart
PRO
4
3.9k
WENDY [Excerpt]
tessaabrams
14
39k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Transcript
LIME Masaaki Horikoshi @ ARISE analytics
ࣗݾհ • R • ύοέʔδ։ൃͳͲ • Git Awards ࠃ1Ґ •
Python • http://git-awards.com/users/search?login=sinhrks
Α͋͘Δ͜ͱ ΤʔΞΠͰ͍͍ײ͡ʹͬͱ͍ͯΑʂ ݁Ռ͕ྑ͚Εதؾʹ͠ͳ͍Αʂʂ Ͱɺ͜Εͬͯ݁ہͲ͏͍͏͜ͱͳͷʁ த͕Θ͔Βͳ͍ͷ͑ͳ͍Αʂʂʂ ͑Β͍ਓ ˞ʔγϟͰͳ͍ ݁Ռ͕ग़Δͱʜ
Interpretability ղऍՄೳੑ
ղऍͷͨΊͷΞϓϩʔν 1. આ໌͍͢͠ػցֶशख๏ΛબͿ • ਫ਼͕ෆेͳ߹͕͋Δ 2. ػցֶशख๏ʹΑΒͳ͍ղऍख๏Λ͏
ղऍՄೳੑ • Global Interpretability • ϞσϧσʔλશମͷΛղऍ • ۙࣅཁ౷ܭྔΛར༻ => ہॴతʹෆਖ਼֬ͳ߹
• Local Interpretability • ϞσϧσʔλͷݶΒΕͨྖҬΛղऍ • ΑΓਖ਼֬ͳઆ໌͕Մೳ
ղऍՄೳੑ • దͳख๏ʮԿΛʯղऍ͍͔ͨ͠ʹґଘ .PEFM4QFDJpD .PEFM"HOPTUJD (MPCBM *OUFSQSFUBCJMJUZ w 3FHSFTTJPO$PF⒏DJFOUT w
'FBUVSF*NQPSUBODF ʜ w 4VSSPHBUF.PEFMT w 4FOTJUJWJUZ"OBMZTJT ʜ -PDBM *OUFSQSFUBCJMJUZ w .BYJNVN"DUJWBUJPO"OBMZTJT ʜ w -*.& w -0$0 w 4)"1 ʜ
LIMEͱʁ
Local Interpretable Model-agnostic Explanations
LIME • “Why Should I Trust You?” Explaining the Predictions
of Any Classifier (2016) • Marco Tulio Ribeiro, Sameer Singh, Carlos Guestrin
LIME • LIMEҎԼͷؔΛͱʹσʔλ x ͷղऍΛಘΔ • G: ղऍ༻ͷֶशثͷू߹ • L:
ղऍֶ͍ͨ͠शثͱղऍ༻ͷֶशثͷ ΠxͷݩͰͷࠩ • f: ղऍֶ͍ͨ͠शث • Πx: σʔλ x ͱͷྨࣅ • Ω: ղऍ༻ͷֶशثͷෳࡶ͞ʹର͢Δേଇ߲ • ۩ମతखஈυϝΠϯʹґଘ
ςʔϒϧσʔλɾྨͷྫ • σʔλ x ͷपลͰαϯϓϦϯά • طఆͰ5,000 • αϯϓϦϯάํ๏มͷछྨʹґଘ •
Exponential KernelͰॏΈ͚ • มબ • Forward/Backward, LARSͳͲ • RidgeճؼͳͲ ˞1ZUIPO࣮ ޙड़ ʹͱͮ͘
ύοέʔδ • Python • จஶऀ࡞ • https://github.com/marcotcr/lime • R •
্هͷϙʔςΟϯά • https://github.com/thomasp85/lime install.packages(‘lime’)
LIME (R) • αϯϓϧ library(caret) library(lime) model <- train(iris[-5], iris[[5]],
method = 'rf') explainer <- lime(iris[-5], model) explanations <- explain(iris[1, -5], explainer, n_labels = 1, n_features = 2) explanations model_type case label label_prob model_r2 model_intercept 1 classification 1 setosa 1 0.3776584 0.2544468 2 classification 1 setosa 1 0.3776584 0.2544468 model_prediction feature feature_value feature_weight feature_desc 1 0.7113922 Sepal.Width 3.5 0.02101138 3.3 < Sepal.Width 2 0.7113922 Petal.Length 1.4 0.43593404 Petal.Length <= 1.60 data prediction 1 5.1, 3.5, 1.4, 0.2 1, 0, 0 2 5.1, 3.5, 1.4, 0.2 1, 0, 0 ֶशثΛ܇࿅ ղऍ༻ͷΫϥεΛ࡞ ղऍΛग़ྗ
LIME (R) plot_features(explanations) ղऍΛϓϩοτ
Enjoy!