Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Confusion matrix
Search
Sunmi Yoon
November 03, 2019
Technology
0
140
Confusion matrix
Confusion matrix 기초부터 머신러닝 응용까지 for dataitgirls3
Sunmi Yoon
November 03, 2019
Tweet
Share
More Decks by Sunmi Yoon
See All by Sunmi Yoon
데이터 분석가 채용 공고 읽는 방법
ysunmi0427
1
320
Deep down in classification 0.5 magic number
ysunmi0427
0
87
Tree Methods
ysunmi0427
0
110
심슨의 역설
ysunmi0427
0
2k
회사는 어떤 사람을 데이터 분석가로 채용하고 싶어하는 것일까?
ysunmi0427
0
2.2k
Other Decks in Technology
See All in Technology
抽象化をするということ - 具体と抽象の往復を身につける / Abstraction and concretization
soudai
18
7.3k
利用終了したドメイン名の最強終活〜観測環境を育てて、分析・供養している件〜 / The Ultimate End-of-Life Preparation for Discontinued Domain Names
nttcom
2
200
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
2
1.5k
開発スピードは上がっている…品質はどうする? スピードと品質を両立させるためのプロダクト開発の進め方とは #DevSumi #DevSumiB / Agile And Quality
nihonbuson
2
3k
Tech Blogを書きやすい環境づくり
lycorptech_jp
PRO
1
240
2024.02.19 W&B AIエージェントLT会 / AIエージェントが業務を代行するための計画と実行 / Algomatic 宮脇
smiyawaki0820
13
3.5k
Raycast AI APIを使ってちょっと便利な拡張機能を作ってみた / created-a-handy-extension-using-the-raycast-ai-api
kawamataryo
0
100
2.5Dモデルのすべて
yu4u
2
870
TAMとre:Capセキュリティ編 〜拡張脅威検出デモを添えて〜
fujiihda
2
250
2/18/25: Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
0
120
エンジニアの育成を支える爆速フィードバック文化
sansantech
PRO
3
1.1k
インフラをつくるとはどういうことなのか、 あるいはPlatform Engineeringについて
nwiizo
5
2.6k
Featured
See All Featured
Music & Morning Musume
bryan
46
6.3k
How GitHub (no longer) Works
holman
314
140k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Building Your Own Lightsaber
phodgson
104
6.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
Transcript
Evaluation for classification dataitgirls3 Instructor Sunmi Yoon
Confusion Matrix
https://sumniya.tistory.com/26
Evaluation Metrics from Confusion Matrix
https://towardsdatascience.com/understanding-confusion-matrix-a9ad42dcfd62
Precision(ب), PPV(Positive Predictive Value) ݽ؛ TrueۄҊ ࠙ܨೠ Ѫ ী, पઁ
Trueੋ Ѫ ࠺ਯ Recall(അਯ), Sensitivity, hit rate पઁ True ী ݽ؛ True۽ ࠙ܨೠ ࠺ਯ “Precision݅ न҃ਸ ॳݶ ݽ؛ ੋ࢝೧Ҋ, Recall݅ न҃ॳݶ ݽ؛ ಌ” ܳ ࢤп೧ࠁࣁਃ.
Accuracy TP, TNਸ ݽف Ҋ۰ೞח . Label ࠛӐഋ बೡ ٸী
ࢎਊਸ ೧ঠ פ. F1 Score Precisionҗ Recall ઑചಣӐ Label ࠛӐഋ बೡ ٸী ݽ؛ ࢿמਸ ഛೞѱ ಣоೡ ࣻ णפ. Label ࠛӐഋ बೡ ٸী, Accuracyח ۽ࢲ न܉ࢿਸ णפ. ਬܳ ࢤп ೧ ࠁࣁਃ.
https://sumniya.tistory.com/26 ৵ ࣿಣӐ ইפҊ ઑചಣӐੋо?
ઑӘ݅ ؊ о ࠇद
https://towardsdatascience.com/understanding-confusion-matrix-a9ad42dcfd62 द Ӓܿਵ۽ جই৬ࢲ, ଘ ফܳ बਵ۽ ࢤп೮
https://towardsdatascience.com/understanding-confusion-matrix-a9ad42dcfd62 द Ӓܿਵ۽ جই৬ࢲ, ߣূ ফب э ࢤпೞݶࢲ ࠇद
(Әࠗఠ ഁтܾ ࣻ )
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
Precision Positive Predictive Value ࠙ܨ Ѿҗ(ݽ؛)ਸ बਵ۽
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
Negative Predictive Value ࠙ܨ Ѿҗ(ݽ؛)ਸ बਵ۽
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
Recall Sensitivity True Positive Rate ਸ बਵ۽
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
ਸ बਵ۽ False Positive Rate
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
ਸ बਵ۽ Specificity True Negative Rate
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
ਸ बਵ۽ Fall-out rate False Positive Rate
https://towardsdatascience.com/understanding-confusion-matrix-a9ad42dcfd62 Ѧ ೞҊ ೮ભ. ߣূ ফب э ࢤпೞݶࢲ ࠇद (Әࠗఠ
ഁтܾ ࣻ )
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
? TP ब ٜ ܻೞݶ, ?
TRUE FALSE ࠙ܨѾҗ TRUE TP FP FALSE FN TN
TN ब ٜ ? ܻೞݶ, ?
ഁтܻભ? ਗې Ӓ۠Ѣਃ
ӝୡח ೮ਵפө ઑӘ݅ ؊ ೧ ࠇद.
Confusion Matrix with Histogram
https://www.medcalc.org/manual/roc-curves.php Criterion, Threshold য়ܲଃ Distribution Actual True, ৽ଃ Actual False.
Threshold ਤ۽ח ݽف True۽ ஏೞח ݽ؛ Ҋ о೮ਸ ٸ,
https://www.medcalc.org/manual/roc-curves.php Thresholdܳ ӓױਵ۽ ஏ ز दெࠇद. যڃ ੌ ੌযաաਃ? Precision:
Recall: Specificity: Fall-out:
https://www.medcalc.org/manual/roc-curves.php Thresholdܳ ӓױਵ۽ ஏ ز दெࠇद. যڃ ੌ ੌযաաਃ? True
positive rate: True negative rate:
https://www.medcalc.org/manual/roc-curves.php ߣূ ߈۽ ز दெࠇद. যڃ ੌ ੌযաաਃ? True positive
rate: True negative rate:
Specificity৬ Sensitivity ҙ҅ https://www.medcalc.org/manual/roc-curves.php
ROC(Receiver Operating Characteristic) curve
рױೞѱח, Sensitivity৬ 1-Specificityܳ п ୷ਵ۽ ೞח 2ରਗ Ӓې https://www.medcalc.org/manual/roc-curves.php AUC
(Area Under Curve)
рױೞѱח, Sensitivity৬ 1-Specificityܳ п ୷ਵ۽ ೞח 2ରਗ Ӓې https://www.medcalc.org/manual/roc-curves.php Actual
True৬ Actual False distribution ৮߷ೞѱ эਸ ٸ (feature class ߸߹מ۱ হ) ROC curveח 45ب пب ࢶ
рױೞѱח, Sensitivity৬ 1-Specificityܳ п ୷ਵ۽ ೞח 2ରਗ Ӓې https://www.medcalc.org/manual/roc-curves.php Actual
True৬ Actual False distribution Ҁח হ ৮߷ೞѱ ܻ࠙ ؼ ٸ ROC ழ࠳ (feature class ߸߹ מ۱ ৮߷) ROC ழ࠳о ઝ࢚ױী оөࣻ۾ feature class ߸߹ מ۱ જҊ ೡ ࣻ .
ROC(Receiver Operating Characteristic) curve with Machine Learning
Classifierܳ ݅ٚח Ѥ, ف ѐ histogramਸ ӒܻҊ Thresholdܳ ೞח Ѫ
https://www.medcalc.org/manual/roc-curves.php
https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html#sphx-glr-auto-examples-model-selection-plot-roc-py Histogramਸ Ӓ۷ח Ѥ ROC ழ࠳ܳ Ӓܾ ࣻ ח Ѫ!
https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html#sphx-glr-auto-examples-model-selection-plot-roc-py ROC ழ࠳ܳ Ӓܾ ࣻ ח Ѥ ৈ۞ ROC ழ࠳
р ࠺Үܳ ా೧ જ ࢿמ ݽ؛ਸ ইյ ࣻ ח Ѫ!
AUCо = ݽ؛ ҅ೠ probabilityܳ ߄ఔਵ۽ Ӓܽ histogramٜ ੜ
ܻ࠙غয . = ݽ؛ Threshold(Decision BoundaryۄҊب ೠ)ী ؏ хೞ. = উੋ ஏਸ ೠ.
ݽ؛ ࢶఖী ROC ழ࠳ܳ ഝਊೠ = Decision Boundaryী ࢚ҙহ ؊
જ ݽ؛ਸ ח. = ganziо դ.
Ӓ۰ࠇद. ؘఠ: 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 ઝܳ ନਸ ࣻ ਸөਃ? - ઝٜਸ ಣݶ࢚ী ନযࠁࣁਃ.
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 ޙઁীب ഝਊ೧ ࠁࣁਃ.