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
84
Tree Methods
ysunmi0427
0
100
심슨의 역설
ysunmi0427
0
2k
회사는 어떤 사람을 데이터 분석가로 채용하고 싶어하는 것일까?
ysunmi0427
0
2k
Other Decks in Technology
See All in Technology
DynamoDB でスロットリングが発生したとき/when_throttling_occurs_in_dynamodb_short
emiki
0
270
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
190
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
3
360
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
960
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
660
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
Storybook との上手な向き合い方を考える
re_taro
5
1.8k
電話を切らさない技術 電話自動応答サービスを支える フロントエンド
barometrica
1
170
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
120
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
Featured
See All Featured
Visualization
eitanlees
145
15k
We Have a Design System, Now What?
morganepeng
50
7.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Speed Design
sergeychernyshev
25
620
Navigating Team Friction
lara
183
14k
RailsConf 2023
tenderlove
29
900
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Producing Creativity
orderedlist
PRO
341
39k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Automating Front-end Workflow
addyosmani
1366
200k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
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 ޙઁীب ഝਊ೧ ࠁࣁਃ.