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

ゾンビでわかる分類評価指標

Aipa
March 09, 2019

 ゾンビでわかる分類評価指標

PythonBeginners沖縄(ゼロからDeep1&DjangoでWebアプリ)@琉球大学 で発表してきたLT

https://python-beginners-okinawa.connpass.com/event/121317/

Aipa

March 09, 2019
Tweet

More Decks by Aipa

Other Decks in Technology

Transcript

  1. ࠞಉߦྻʢconfusion matrixʣ • ෼ྨ໰୊ͷ݁ՌͷੑೳΛ໌Β͔ʹ͢Δߦྻ • ਅཅੑ(true positive → TP) •

    ਅӄੑ(true negative → TN) • ِཅੑ(false positive → FP) • ِӄੑ(false negative → FN)
  2. ʢ࠶ܝʣκϯϏ͕50ਓ(?) ੜଘऀ͕50໊͖ͨ ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ 

    51  '/ κϯϏ ͡Όͳ͍  '1  5/ • (27 + 45) / (27 + 45 + 5 + 23) = 72% • ਖ਼ղ཰͸72%
  3. κϯϏ͕10ਓ(?) ੜଘऀ͕90໊͖ͨ ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ 

    51  '/ κϯϏ ͡Όͳ͍  '1  5/ • (0 + 90) / (0 + 90 + 0 + 10) = 90% • ਖ਼ղ཰͸90%
  4. κϯϏ͕10ਓ(?) ੜଘऀ͕90໊͖ͨ ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ 

    51  '/ κϯϏ ͡Όͳ͍  '1  5/ • (0 + 90) / (0 + 90 + 0 + 10) = 90% • ਖ਼ղ཰͸90% ͓Θ͔Γ͍͚ͨͩͨͩΖ͏͔
  5. ద߹཰ʢPrecisionʣ • Ϟσϧ͕κϯϏͱ༧ଌͨ݁͠ՌʹɺͲΕ͚ͩ κϯϏؚ͕·Ε͍͔ͯͨ • TP / (TP + FP)

    • 0 / (0 + 0) = 0% ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ  51  '/ κϯϏ ͡Όͳ͍  '1  5/
  6. ࠶ݱ཰ʢRecallʣ ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ  51

     '/ κϯϏ ͡Όͳ͍  '1  5/ • κϯϏʹର͠Ϟσϧ͕κϯϏͱ൑அׂͨ͠߹ • TP / (TP + FN) • 0 / (0 + 10) = 0%
  7. F஋ʢF1-scoreʣ • PrecisionͱRecallΛ૊Έ߹Θͤͯௐ੔ͨ͠஋ • 2 * Precision * Recall /

    Precision + Recall • 2 * 0 * 0 / 0 + 0 = 0% ༧ଌ͞ΕͨΫϥε ࣮ࡍͷΫϥε κϯϏͱ༧ଌ κϯϏ ͡Όͳ͍ͱ ༧ଌ κϯϏ  51  '/ κϯϏ ͡Όͳ͍  '1  5/