LIME

22f56e55955b9aa693081ed5dc6400ae?s=47 Sinhrks
December 16, 2017
990

 LIME

22f56e55955b9aa693081ed5dc6400ae?s=128

Sinhrks

December 16, 2017
Tweet

Transcript

  1. LIME Masaaki Horikoshi @ ARISE analytics

  2. ࣗݾ঺հ • R • ύοέʔδ։ൃͳͲ • Git Awards ࠃ಺1Ґ •

    Python • http://git-awards.com/users/search?login=sinhrks
  3. Α͋͘Δ͜ͱ ΤʔΞΠͰ͍͍ײ͡ʹ΍ͬͱ͍ͯΑʂ ݁Ռ͕ྑ͚Ε͹த਎͸ؾʹ͠ͳ͍Αʂʂ Ͱɺ͜Εͬͯ݁ہͲ͏͍͏͜ͱͳͷʁ த਎͕Θ͔Βͳ͍΋ͷ͸࢖͑ͳ͍Αʂʂʂ ͑Β͍ਓ ˞΁ʔγϟͰ͸ͳ͍ ݁Ռ͕ग़Δͱʜ

  4. Interpretability ղऍՄೳੑ

  5. ղऍͷͨΊͷΞϓϩʔν 1. આ໌͠΍͍͢ػցֶशख๏ΛબͿ • ਫ਼౓͕ෆे෼ͳ৔߹͕͋Δ 2. ػցֶशख๏ʹΑΒͳ͍ղऍख๏Λ࢖͏

  6. ղऍՄೳੑ • Global Interpretability • Ϟσϧ΍σʔλશମͷ܏޲Λղऍ • ۙࣅ΍ཁ໿౷ܭྔΛར༻ => ہॴతʹ͸ෆਖ਼֬ͳ৔߹΋

    • Local Interpretability • Ϟσϧ΍σʔλͷݶΒΕͨྖҬΛղऍ • ΑΓਖ਼֬ͳઆ໌͕Մೳ
  7. ղऍՄೳੑ • ద੾ͳख๏͸ʮԿΛʯղऍ͍͔ͨ͠ʹґଘ .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 ʜ
  8. LIMEͱ͸ʁ

  9. Local Interpretable Model-agnostic Explanations

  10. LIME • “Why Should I Trust You?” Explaining the Predictions

    of Any Classifier (2016) • Marco Tulio Ribeiro, Sameer Singh, Carlos Guestrin
  11. LIME • LIME͸ҎԼͷؔ਺Λ΋ͱʹσʔλ x ͷղऍΛಘΔ • G: ղऍ༻ͷֶशثͷू߹ • L:

    ղऍֶ͍ͨ͠शثͱղऍ༻ͷֶशثͷ ΠxͷݩͰͷࠩ • f: ղऍֶ͍ͨ͠शث • Πx: σʔλ x ͱͷྨࣅ౓ • Ω: ղऍ༻ͷֶशثͷෳࡶ͞ʹର͢Δേଇ߲ • ۩ମతखஈ͸υϝΠϯʹґଘ
  12. ςʔϒϧσʔλɾ෼ྨ໰୊ͷྫ • σʔλ x ͷपลͰαϯϓϦϯά • طఆͰ5,000 • αϯϓϦϯάํ๏͸ม਺ͷछྨʹґଘ •

    Exponential KernelͰॏΈ෇͚ • ม਺બ୒ • Forward/Backward, LARSͳͲ • RidgeճؼͳͲ ˞1ZUIPO࣮૷ ޙड़ ʹ΋ͱͮ͘
  13. ύοέʔδ • Python • ࿦จஶऀ࡞ • https://github.com/marcotcr/lime • R •

    ্هͷϙʔςΟϯά • https://github.com/thomasp85/lime install.packages(‘lime’)
  14. 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 ֶशثΛ܇࿅ ղऍ༻ͷΫϥεΛ࡞੒ ղऍΛग़ྗ
  15. LIME (R) plot_features(explanations) ղऍΛϓϩοτ

  16. Enjoy!