Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ランダムフォレストを使って探索的データ分析

 ランダムフォレストを使って探索的データ分析

19fc8f6113c5c3d86e6176362ff29479?s=128

Kan Nishida
PRO

January 21, 2018
Tweet

Transcript

  1. ϥϯμϜϑΥϨετΛ࢖ͬͯ ୳ࡧతσʔλ෼ੳ

  2. Presenter ੢ా צҰ࿠ co-founder/ceo Exploratory ུྺ Exploratory, Inc.ͰCEO݉νʔϑɾϓϩμΫτɾΦ ϑΟαʔΛ຿ΊΔ͔ͨΘΒɺ೔ຊͰͷσʔλαΠΤϯ εɾϒʔτΩϟϯϓɾτϨʔχϯά

    ɺάϩʔόϧͷσʔ λαΠΤϯεɾϒʔελʔɾτϨʔχϯάͳͲͷ৔Λ ௨ͯ͠σʔλαΠΤϯεͷීٴͱڭҭʹऔΓ૊Ήɻ @KanAugust
  3. Exploratory Data Analysis with Random Forest

  4. Exploratory Data Analysis with Random Forest

  5. ܾఆ໦ σʔλ αϯϓϧ αϯϓϧ αϯϓϧ ౤ථ ౤ථ ౤ථ ݁࿦ …

    ϥϯμϜαϯϓϧ ౤ථׂ͕Εͨ৔߹ฏۉΛͱΓɺ ֬཰ͱͯ͠ѻ͏ ϥϯμϜϑΥϨετ
  6. ϥϯμϜϑΥϨετͬͯɺ༧ଌͷͨΊ͡Όͳ͍ͷʁ

  7. Employee Is_Salesrep Is_Male Attrition A TRUE FALSE TRUE B FALSE

    TRUE TRUE C TRUE FALSE FALSE D FALSE FALSE FALSE E TRUE TRUE TRUE Z TRUE TRUE ? ͜ͷैۀһ͸ࣙΊΔͰ͠ΐ͏͔ʁ ෼ྨ - ܾఆ໦
  8. Is_Salesrep TRUE FALSE Is_Male TRUE FALSE … TRUE FALSE TRUE

    FALSE Z FALSE TRUE ? Employee Is_Salesrep Is_Male Attrition A TRUE FALSE TRUE B FALSE TRUE TRUE C TRUE FALSE TRUE D FALSE FALSE FALSE E FALSE TRUE TRUE ࣙΊΔʁ ࣙΊΔ ࣙΊͳ͍ ࣙΊΔ ෼ྨ - ܾఆ໦
  9. … TRUE FALSE TRUE FALSE X TRUE TRUE ? Employee

    Is_Salesrep Is_Male Attrition A TRUE FALSE TRUE B FALSE TRUE TRUE C TRUE FALSE TRUE D FALSE FALSE FALSE E FALSE TRUE TRUE ࣙΊΔ ࣙΊͳ͍ ࣙΊΔ Is_Salesrep Is_Male ࣙΊΔʁ ෼ྨ - ܾఆ໦
  10. TRUE FALSE TRUE FALSE … TRUE FALSE TRUE FALSE X

    TRUE TRUE TRUE Employee Is_Salesrep Is_Male Attrition A TRUE FALSE TRUE B FALSE TRUE TRUE C TRUE FALSE TRUE D FALSE FALSE FALSE E FALSE TRUE TRUE ࣙΊΔ ࣙΊͳ͍ ࣙΊΔ Is_Salesrep Is_Male ࣙΊΔʁ ෼ྨ - ܾఆ໦
  11. Ͳͷม਺ΛઌʹධՁ͢Δ͔Ͱ༧ଌ݁Ռ͕ૣ͘ಘΒΕΔ

  12. ͜ͷ৘ใΛ΋ͱʹ ม਺ॏཁ౓(Variable Importance)͕ ಘΒΕΔ

  13. RF Model

  14. ม਺ॏཁ౓

  15. Ͳͷม਺͕ଞͷม਺ʹൺ΂ͯॏཁ͔͸෼͔ͬͨ

  16. ͔͠͠… ͦͷม਺͕Ͳ͏Өڹ͍ͯ͠Δͷ͔͕Α͘෼͔Βͳ͍

  17. Job Level

  18. Monthly Income

  19. ͦ͜Ͱ… edarf - EDA with RandomForest ύοέʔδ

  20. None
  21. Partial Dependency

  22. Job Level Monthly Income Stock Option 1 5000 1 3

    10000 2 2 4000 1 2 6000 2 3 50000 3 … 1 5000 2 ݩͷσʔλ͔Β
  23. Job Level Monthly Income Stock Option 1 5000 1 3

    10000 2 2 4000 1 2 6000 2 3 50000 3 αϯϓϧ͢Δ
  24. Job Level Monthly Income Stock Option 1 5000 1 1

    10000 2 1 4000 1 1 6000 2 1 50000 3 Job Level͕̍ɼ̎ɼ̏ͷ̏ͭͩͱ͢Δͱɺ ͜ͷྻͷ஋͚ͩΛม͑ɺଞͷྻ͸ͦͷ··ͰɺγϛϡϨʔτ͢Δ Job Level Monthly Income Stock Option 2 5000 1 2 10000 2 2 4000 1 2 6000 2 2 50000 3 Job Level Monthly Income Stock Option 3 5000 1 3 10000 2 3 4000 1 3 6000 2 3 50000 3
  25. Job Level Monthly Income Stock Option 1 5000 1 1

    10000 2 1 4000 1 1 6000 2 1 50000 3 Job Level͕̍ͷ৔߹ RF Model Job Level Monthly Income Stock Option Prediction Probability 1 5000 1 0.3 1 10000 2 0.7 1 4000 1 0.2 1 6000 2 0.1 1 50000 3 0.6 0.38 ฏۉ஋
  26. Job Level Monthly Income Stock Option 2 5000 1 2

    10000 2 2 4000 1 2 6000 2 2 50000 3 Job Level Monthly Income Stock Option Prediction Probability Predict 2 5000 1 0.2 2 10000 2 0.3 2 4000 1 0.1 2 6000 2 0.1 2 50000 3 0.3 RF Model Job Level͕̎ͷ৔߹ 0.2 ฏۉ஋
  27. Job Level Monthly Income Stock Option 3 5000 1 3

    10000 2 3 4000 1 3 6000 2 3 50000 3 Job Level Monthly Income Stock Option Prediction Probability 3 5000 1 0.2 3 10000 2 0.3 3 4000 1 0.1 3 6000 2 0.1 3 50000 3 0.3 RF Model Job Level͕̏ͷ৔߹ 0.2 ฏۉ஋
  28. ϓϩοτ͢Δ FALSE TRUE

  29. with RStudio

  30. with Exploratory

  31. None
  32. σʔλαΠΤϯεɾϒʔτΩϟϯϓ τϨʔχϯά݄̏։࠵ https://exploratory.io/training-jp

  33. ࿈བྷઌ Email support@exploratory.io Website https://ja.exploratory.io Twitter @ExploratoryData Facebook ExploratoryJapan