3. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• พิจารณาคลาส normal
• True Positive (TP)
• True Negative (TN)
• False Positive (FP)
• False Negative (FN)
3
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal TP FP
spam FN TN
dataminingtrend.com
dataminingtrend.com
4. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• พิจารณาคลาส normal
• True Positive (TP)
• จำนวนที่ทำนายตรงกับข้อมูลจริงใน
คลาสที่กำลังพิจารณา
• True Negative (TN)
• False Positive (FP)
• False Negative (FN)
4
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal 4 FP
spam FN TN
dataminingtrend.com
dataminingtrend.com
5. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• พิจารณาคลาส normal
• True Positive (TP)
• True Negative (TN)
• จำนวนที่ทำนายตรงกับข้อมูลจริงใน
คลาสที่ไม่ได้กำลังพิจารณา
• False Positive (FP)
• False Negative (FN)
5
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal 4 FP
spam FN 6
dataminingtrend.com
dataminingtrend.com
6. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• พิจารณาคลาส normal
• True Positive (TP)
• True Negative (TN)
• False Positive (FP)
• จำนวนที่ทำนายผิดเป็นคลาสที่กำลัง
พิจารณา
• False Negative (FN)
6
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal 4 3
spam FN 6
dataminingtrend.com
dataminingtrend.com
7. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• พิจารณาคลาส normal
• True Positive (TP)
• True Negative (TN)
• False Positive (FP)
• False Negative (FN)
• จำนวนที่ทำนายผิดเป็นคลาสที่ไม่ได้
กำลังพิจารณา
7
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
3 normal normal
4 normal spam
5 spam spam
6 spam spam
7 normal spam
8 spam normal
9 normal normal
10 normal normal
11 spam spam
12 spam spam
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal 4 3
spam 2 6
dataminingtrend.com
dataminingtrend.com
9. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• Precision
• จำนวนที่ทำนายถูกจากข้อมูลที่
ทำนายว่าเป็นคลาสที่พิจารณาอยู่
• Precision สำหรับ normal
• True Positive
True Positive + False Positive
• 4/7 x 100 = 57.12%
• Precision สำหรับ spam
• 6/8 x 100 = 75%
9
ID Type Predicted
3 normal normal
8 spam normal
9 normal normal
10 normal normal
13 spam normal
14 spam normal
15 normal normal
pred.true. normal spam
normal TP FP
spam FN TN
Precision
ID Type Predicted
1 spam spam
2 spam spam
4 normal spam
5 spam spam
6 spam spam
7 normal spam
11 spam spam
12 spam spam
predict เป็นคลาส spam
predict เป็นคลาส normal
confusion matrix ของคลาส normal
dataminingtrend.com
dataminingtrend.com
10. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• Recall
• จำนวนข้อมูลที่ทำนายถูก
• Recall สำหรับ normal
• True Positive
True Positive + False Negative
• 4/6 x 100 = 66.67%
• Recall สำหรับ spam
• 7/9 x 100 = 77.78%
10
pred.true. normal spam
normal TP FP
spam FN TN
คลาส spam
คลาส normal
confusion matrix ของคลาส normal
Recall
ID Type Predicted
3 normal normal
4 normal spam
7 normal spam
9 normal normal
10 normal normal
15 normal normal
ID Type Predicted
1 spam spam
2 spam spam
5 spam spam
6 spam spam
8 spam normal
11 spam spam
12 spam spam
13 spam normal
14 spam spam
dataminingtrend.com
dataminingtrend.com
12. (data)3
base|warehouse|mining
http://dataminingtrend.com http://facebook.com/datacube.th
Performance (classification)
• F-Measure
• ค่าเฉลี่ยของ Precision และ Recall
• 2 x Precision x Recall
Precision + Recall
• F-Measure สำหรับ normal
• 2 x 57.12 x 66.67 = 61.53%
57.12 + 66.67
• F-Measure สำหรับ spam
• 2 x 75 x 77.8 = 76.37%
75 + 77.8
12
ID Type Predicted
3 normal normal
8 spam normal
9 normal normal
10 normal normal
13 spam normal
14 spam normal
15 normal normal
Precision = 4/7 x 100 = 57.12%
Recall = 4/6 x 100 = 66.67%
ID Type Predicted
3 normal normal
4 normal spam
7 normal spam
9 normal normal
10 normal normal
15 normal normal
dataminingtrend.com