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

Confusion matrix

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Sunmi Yoon
November 03, 2019

Confusion matrix

Confusion matrix 기초부터 머신러닝 응용까지 for dataitgirls3

Sunmi Yoon

November 03, 2019

Transcript

42 slides
  1. Precision(੿޻ب), PPV(Positive Predictive Value) ݽ؛੉ TrueۄҊ ࠙ܨೠ Ѫ ઺ী, पઁ

    Trueੋ Ѫ੄ ࠺ਯ Recall(੤അਯ), Sensitivity, hit rate पઁ True ઺ী ݽ؛੉ True۽ ࠙ܨೠ ࠺ਯ “Precision݅ न҃ਸ ॳݶ ݽ؛੉ ੋ࢝೧૑Ҋ, Recall݅ न҃ॳݶ ݽ؛੉ ೻ಌ૓׮” ੄ ੄޷ܳ ࢤп೧ࠁࣁਃ.
  2. Accuracy TP, TNਸ ݽف Ҋ۰ೞח ૑಴. Label ࠛӐഋ੉ बೡ ٸী

    ࢎਊਸ ઱੄೧ঠ ೤פ׮. F1 Score Precisionҗ Recall੄ ઑചಣӐ Label ࠛӐഋ੉ बೡ ٸী ݽ؛੄ ࢿמਸ ੿ഛೞѱ ಣоೡ ࣻ ੓णפ׮. Label ࠛӐഋ੉ बೡ ٸী, Accuracyח ૑಴۽ࢲ न܉ࢿਸ ੏णפ׮. ੉ਬܳ ࢤп ೧ ࠁࣁਃ.
  3. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    Precision Positive Predictive Value ࠙ܨ Ѿҗ(ݽ؛)ਸ ઺बਵ۽
  4. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    Negative Predictive Value ࠙ܨ Ѿҗ(ݽ؛)ਸ ઺बਵ۽
  5. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    Recall Sensitivity True Positive Rate ੿׹ਸ ઺बਵ۽
  6. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    ੿׹ਸ ઺बਵ۽ False Positive Rate
  7. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    ੿׹ਸ ઺बਵ۽ Specificity True Negative Rate
  8. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    ੿׹ਸ ઺बਵ۽ Fall-out rate False Positive Rate
  9. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    ? TP ઺ब ૑಴ٜ ੿ܻೞ੗ݶ, ?
  10. ੿׹ TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN

    TN ઺ब ૑಴ٜ ? ੿ܻೞ੗ݶ, ?
  11. рױೞѱח, Sensitivity৬ 1-Specificityܳ п ୷ਵ۽ ೞח 2ରਗ Ӓې೐ https://www.medcalc.org/manual/roc-curves.php Actual

    True৬ Actual False distribution੉ ৮߷ೞѱ эਸ ٸ (feature੄ class ߸߹מ۱ হ਺) ROC curveח 45ب пب ૒ࢶ
  12. рױೞѱח, Sensitivity৬ 1-Specificityܳ п ୷ਵ۽ ೞח 2ରਗ Ӓې೐ https://www.medcalc.org/manual/roc-curves.php Actual

    True৬ Actual False distribution੉ Ҁ஖ח ৔৉ হ੉ ৮߷ೞѱ ܻ࠙ ؼ ٸ ROC ழ࠳ (feature੄ class ߸߹ מ۱੉ ৮߷) ROC ழ࠳о ઝ࢚ױী оө਎ࣻ۾ feature੄ class ߸߹ מ۱੉ જ׮Ҋ ೡ ࣻ ੓׮.
  13. AUCо ௼׮ = ݽ؛੉ ҅࢑ೠ probabilityܳ ߄ఔਵ۽ Ӓܽ histogramٜ੉ ੜ

    ܻ࠙غয ੓׮. = ݽ؛੉ Threshold(Decision BoundaryۄҊب ೠ׮)ী ؏ ޹хೞ׮. = উ੿੸ੋ ৘ஏਸ ೠ׮.
  14. ૒੽ Ӓ۰ࠇद׮. ؘ੉ఠ: titanic ݽ؛ - sklearn.linear_model.LinearRegression - sklearn.linear_model.LogisticRegression -

    sklearn.tree.DecisionTreeClassifier - sklearn.ensemble.RandomForestClassifier ١ whatever you want ౲ - Tree ҅ৌ੄ ݽ؛੄ ҃਋ model੄ predict_proba() ݫࣗ٘ܳ ࢎਊೞݶ ഛܫ ҅࢑੉ ؾ פ׮. - ୊਺ীח Thresholdܳ a ݅ఀ ੉ز೧оݴ Sensitivity, Specificityܳ ҅࢑೧ ઝ಴ܳ ҳೞ ࣁਃ. - যڌѱ ೞݶ Thresholdܳ ੜ ੉زदఃݶࢲ ROC ઝ಴ܳ ନਸ ࣻ ੓ਸөਃ? - ઝ಴ٜਸ ಣݶ࢚ী ନযࠁࣁਃ.
  15. sklearn.metrics.roc_curve ܳ ഝਊ ೧ ࠇद׮. ؘ੉ఠ: titanic ݽ؛ - sklearn.linear_model.LinearRegression

    - sklearn.linear_model.LogisticRegression - sklearn.tree.DecisionTreeClassifier - sklearn.ensemble.RandomForestClassifier ١ whatever you want ؊ աইоࢲ, - sklearnਸ ੉ਊ೧ AUCب ҅࢑ ೧ࠇद׮. - ৈ۞ ݽ؛ٜ੄ ࢿמਸ ࠺Ү ೧ ࠇद׮. - DecisionTreeClassifierܳ ࢎਊ೮؊ۄب, ࢎਊೠ featureо ׮ܰ׮ݶ ӒѤ ׮ܲ ݽ؛ੑפ ׮. - ఋ੉ఋץ ݈Ҋ, ׮ܲ classification ޙઁীب ഝਊ೧ ࠁࣁਃ.
  16. ՘

More Decks by Sunmi Yoon

Other Decks in Technology