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

決定木 変数重要度 / Decision Tree Variable Importance

sasakiK
July 11, 2017

決定木 変数重要度 / Decision Tree Variable Importance

・決定木における変数重要度の概念
・計算方法(イメージ)
修正点がございましたら是非ご指摘ください
/
· Concept of Variable Importance in Decision Trees
· Calculation Method (mage)
Please contact me if there are some mistakes.

sasakiK

July 11, 2017
Tweet

More Decks by sasakiK

Other Decks in Science

Transcript

  1. 7/45 㢌侧ꅾ銲䏝ך䗳銲䚍 加׾圓眠ׅ׷ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 "

    " 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 # # ♧殢葺ֻⴓ䀄ׅ׷ ظ٦سך♶秪䏝ך何㊣䏝ָ넝ְ 㢌侧׾鼅ע 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃 
  2. 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 鏺㻊㔐侧 䎃룳

    Ⳣ倯皠侧 ⨳䏿 # 8/45 㢌侧ꅾ銲䏝ך䗳銲䚍 加׾圓眠ׅ׷ ׁ׵ח鼅ע 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃 
  3. 9/45 㢌侧ꅾ銲䏝ך䗳銲䚍 加ָדֹ׷ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  㔐״׶㢳ְ 㔐⟃♴

    ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䏿 ♶⨳䏿 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䏿 ⨳䏿
  4. 12/45 㢌侧ꅾ銲䏝ך䗳銲䚍 ⴓ겲ח㣐ⴖז㢌侧כ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 寸㹀加׾鍑ꅸׅ׷˘ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ

    ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䏿 ♶⨳䏿 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䏿 ⨳䏿
  5. 13/45 㢌侧ꅾ銲䏝ך䗳銲䚍 ⴓ겲ח㣐ⴖז㢌侧כ 岣湡ׅץֹכ չ氺ꤍ֮ת׶遤ַזְծ娕劢弫ך㾴պ չ氺ꤍ֮ת׶遤ַזְծ娕⟃♳ךծ Ⳣ倯皠֮ת׶顗׻זְ㾴պ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧

    寸㹀加׾鍑ꅸׅ׷˘ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䏿 ♶⨳䏿 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䏿 ⨳䏿
  6. 14/45 㢌侧ꅾ銲䏝ך䗳銲䚍 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䏿 ♶⨳䏿

    鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䏿 ⨳䏿 ⴓ겲ח㣐ⴖז㢌侧כ 岣湡ׅץֹ㾴כ չ氺ꤍ遤ַזְծ娕劢弫ך➂պ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 岣䠐ׅץֹ挿 寸㹀加׾鍑ꅸׅ׷˘
  7. ♰ⰼ״׶㢳ְ ♰ⰼ⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 䎃  䎃룳

    Ⳣ倯皠侧 # # 15/45 㢌侧ꅾ銲䏝ך䗳銲䚍 剑ⴱךⴓ䀄דծ׮׃ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 # # 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃 
  8. ♰ⰼ״׶㢳ְ ♰ⰼ⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 䎃  䎃룳

    Ⳣ倯皠侧 # # 16/45 㢌侧ꅾ銲䏝ך䗳銲䚍 剑ⴱךⴓ䀄דծ׮׃ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 # # 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  ח״׷何㊣䏝  鏺㻊㔐侧
  9. ♰ⰼ״׶㢳ְ ♰ⰼ⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 䎃  䎃룳

    Ⳣ倯皠侧 # # 17/45 㢌侧ꅾ銲䏝ך䗳銲䚍 剑ⴱךⴓ䀄דծ׮׃ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 # # 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  ח״׷何㊣䏝  鏺㻊㔐侧 ח״׷何㊣䏝  䎃 
  10. ♰ⰼ״׶㢳ְ ♰ⰼ⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 䎃  䎃룳

    Ⳣ倯皠侧 # # 18/45 㢌侧ꅾ銲䏝ך䗳銲䚍 剑ⴱךⴓ䀄דծ׮׃ 㔐״׶㢳ְ 㔐⟃♴ ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 " " 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 # # 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  ח״׷何㊣䏝  鏺㻊㔐侧 ח״׷何㊣䏝  䎃  ˑ加ח⳿גֿזְ㢌侧˒ךꅾ銲䚍ח孡➰ֽזְ
  11. 19/45 㢌侧ꅾ銲䏝ך䗳銲䚍 加ָדֹ׷ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  㔐״׶㢳ְ 㔐⟃♴

    ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䎊 ♶⨳䎊 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䎊 ⨳䏿 ֿ׸׵ךꅾ銲䚍׾鐰⣣ׅ׷䗳銲
  12. 20/45 㢌侧ꅾ銲䏝ך䗳銲䚍 加ָדֹ׷ 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 䚍ⴽ 䎃  㔐״׶㢳ְ 㔐⟃♴

    ״׶㢳ְ ⟃♴ 娕״׶㣐ְֹ 娕劢弫 ♶⨳䎊 ♶⨳䎊 鏺㻊㔐侧 䎃룳 Ⳣ倯皠侧 ⨳䎊 ⨳䏿 ֿ׸׵ךꅾ銲䚍׾鐰⣣ׅ׷䗳銲 㢌侧ꅾ銲䏝
  13. 23/45 CARTによる応用2進木解析 より引用 ぐꬊة٦ىشٕ٥ظ٦سחֶֽ׷剑葺ⴓ䀄㢌侧 ' הծ➿椚㢌侧 ( ך 何㊣䏝ךさ鎘׾⊿(5 ,

    ), ⊿(( , )הְֶ׋הֹծ 㢌侧ꅾ銲䏝 8 ׾如䒭ך圫ח㹀纏ׅ׷ 8 = 100 × (5;() ) max ( 5;( ) ׋׌׃ծ 5;( = ∑ {⊿ 5 , + ⊿(( , )} D∈F 鎘皾倯岀 寸㹀加 㢌侧ꅾ銲䏝ך㹀纏
  14. 24/45 CARTによる応用2進木解析 より引用 ぐꬊة٦ىشٕ٥ظ٦سחֶֽ׷剑葺ⴓ䀄㢌侧 ' הծ➿椚㢌侧 ( ך 何㊣䏝ךさ鎘׾⊿(5 ,

    ), ⊿(( , )הְֶ׋הֹծ 㢌侧ꅾ銲䏝 8 ׾如䒭ך圫ח㹀纏ׅ׷ 8 = 100 × (5;() ) max ( 5;( ) ׋׌׃ծ 5;( = ∑ {⊿ 5 , + ⊿(( , )} D∈F 鎘皾倯岀 寸㹀加 㢌侧ꅾ銲䏝ך㹀纏 ̔ 铡僇
  15. 25/45 ⨳䎊 ♶⨳䎊 鎘皾倯岀 ⟃♴ך⢽ד罋ִ׷ NODE No.1 NODE No.2 ROOT

    NOOD No.1 NODE No.3 NODE No.4 NODE No.1 NODE No.2 ظ٦س" ظ٦س# ظ٦س$
  16. 26/45 ⨳䎊 ♶⨳䎊 鎘皾倯岀 ⟃♴ך⢽ד罋ִ׷ NODE No.1 NODE No.2 ROOT

    NOOD No.1 NODE No.3 NODE No.4 NODE No.1 NODE No.2 ظ٦س" ظ٦س# ظ٦س$ 䎃룳 דⴓ䀄
  17. 27/45 ⨳䎊 ♶⨳䎊 鎘皾倯岀 ⢽ד罋ִ׷ דظ٦س"#$׾ⴓ䀄׃׋ 䎃룳 N O DE

    N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $   NODE No.1 NODE No.2 ROOT NOOD No.1     NODE No. NODE No. NOOD No.   NODE No. NODE No. NOOD No.   ظ٦س" ظ٦س# ظ٦س$     ̓ך״ֲח׻ַ׸׋
  18. 28/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄 (JOJⴓ侔䭷垥 @̔⡚ְקו״ְ   NODE No.1 NODE

    No.2 ROOT NOOD No.1     ظ٦س" 䎃룳 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $
  19. 29/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄 ⴓ侔䭷垥 = 1 − 50 100 K

    + 50 100 K = 1 2 (JOJⴓ侔䭷垥 @̔⡚ְקו״ְ   NODE No.1 NODE No.2 ROOT NOOD No.1     ظ٦س" 䎃룳 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $
  20. 30/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄 ⴓ侔䭷垥 = 1 − 50 100 K

    + 50 100 K = 1 2 (JOJⴓ侔䭷垥 @̔⡚ְקו״ְ   NODE No.1 NODE No.2 ROOT NOOD No.1     ظ٦س" 䎃룳 ⴓ侔䭷垥 = 1 − 45 50 K + 5 50 K ≒ 1 5 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $
  21. 31/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄 ⴓ侔䭷垥 = 1 − 50 100 K

    + 50 100 K = 1 2   NODE No.1 NODE No.2 ROOT NOOD No.1     ظ٦س" 䎃룳 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $ ⴓ侔䭷垥 = 1 − 45 50 K + 5 50 K ≒ 1 5 ⴓ侔䭷垥 = 1 − 45 50 K + 5 50 K ≒ 1 5
  22. 32/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄   NODE No.1 NODE No.2 ROOT

    NOOD No.1     ظ٦س" 䎃룳 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $ ⴓ䀄⵸ך♶秪ׁ ⴓ䀄䖓ך♶秪ׁ
  23. 33/45 鎘皾倯岀 䎃룳ח״׷ⴓ䀄ך何㊣䏝   NODE No.1 NODE No.2 ROOT

    NOOD No.1     ظ٦س" 䎃룳 N O DE N o.1 N O DE N o.2 RO O T N O O D N o.1 N O DE N o.1 N O DE N o.2 N O DE N o.1 N O DE N o.2 " # $ ⴓ䀄⵸ך♶秪ׁ ⴓ䀄䖓ך♶秪ׁ ظ٦س" ך何㊣䏝 ⴓ䀄⵸ך♶秪ׁ  ⴓ䀄䖓ך♶秪ׁ 䎃룳
  24. 34/45 鎘皾倯岀 ず圫חظ٦س#$׮何㊣䏝׾鎘皾 ظ٦س"#$ 䎃룳   NODE No.1 NODE

    No.2 ROOT NOOD No.1     NODE No. NODE No. NOOD No.   NODE No. NODE No. NOOD No.   ظ٦س" ظ٦س# ظ٦س$     O = ⵸٦䖓 5 = ⵸٦䖓 P = ⵸٦䖓
  25. 37/45 鎘皾倯岀 ➭ך㢌侧ד׮ず圫ך鎘皾׾ׅ׷ ظ٦س"#$ NODE No.1 NODE No.2 ROOT NOOD

    No.1 NODE No. NODE No. NOOD No. NODE No. NODE No. NOOD No. ظ٦س" ظ٦س# ظ٦س$ 䚍ⴽ
  26. 38/45 鎘皾倯岀 ➭ך㢌侧ד׮ず圫ך鎘皾׾ׅ׷ ظ٦س"#$ NODE No.1 NODE No.2 ROOT NOOD

    No.1 NODE No. NODE No. NOOD No. NODE No. NODE No. NOOD No. ظ٦س" ظ٦س# ظ٦س$  Ⰵ