การประเมินประสิทธิภาพ

Understanding Machine Learning

Hadrien Lacroix

Content Developer at DataCamp

ขั้นตอนการประเมิน

Understanding Machine Learning

Overfitting

  • ทำงานได้ดีมากบนข้อมูลฝึก
  • ทำงานได้แย่บนข้อมูลทดสอบ
  • โมเดลจำข้อมูลฝึกมากเกินไป จนไม่สามารถนำไปใช้กับข้อมูลใหม่ได้
  • ใช้ชุดทดสอบเพื่อตรวจสอบประสิทธิภาพของโมเดล
Understanding Machine Learning

ตัวอย่าง overfitting

overfitting

Understanding Machine Learning

ความแม่นยำ

  • ความแม่นยำ = จำนวนที่จำแนกถูกต้อง / จำนวนทั้งหมด
  • 48 / 50 = 96%

ตัวแบ่งประเภทเชิงเส้นจากบทเรียนแรก

Understanding Machine Learning

ข้อจำกัดของความแม่นยำ: ตัวอย่างการฉ้อโกง

$$

ความแม่นยำของโมเดลนี้:

$$\frac{28\ correctly\ classified}{30\ total\ points}=93.33\%$$

  • พลาดธุรกรรมฉ้อโกงส่วนใหญ่
  • ต้องการเมตริกที่ดีกว่านี้
Understanding Machine Learning

Confusion matrix

confusion matrix

Understanding Machine Learning

True positives

Understanding Machine Learning

True positives

Understanding Machine Learning

False negatives

Understanding Machine Learning

False negatives

Understanding Machine Learning

จำ False Negatives ให้ได้

fp.jpg

Understanding Machine Learning

เติมส่วนที่เหลือ...

Understanding Machine Learning

False positives, true negatives

Understanding Machine Learning

จำ False Positives ให้ได้

fn2.jpg

Understanding Machine Learning

Sensitivity

จำแนกธุรกรรมฉ้อโกงได้ถูกต้องกี่รายการ?

$$Sensitivity = \frac{true\ positives}{true\ positives + false\ negatives} =1/3=33.33\% $$

  • ยอมให้ระบุธุรกรรมที่ถูกต้องว่าน่าสงสัยดีกว่าอนุมัติธุรกรรมที่เป็นการฉ้อโกง
Understanding Machine Learning

Specificity

$$Specificity = \frac{true\ negatives}{true\ negatives + false\ positives}$$

ตัวกรองสแปม:

  • ยอมให้สแปมเข้า inbox ดีกว่าส่งอีเมลจริงไปที่โฟลเดอร์สแปม
Understanding Machine Learning

การประเมินการถดถอย

Understanding Machine Learning

การประเมินการถดถอย

  • ค่าความผิดพลาด = ระยะห่างระหว่างจุด (ค่าจริง) กับเส้น (ค่าที่พยากรณ์)
  • มีหลายวิธีในการคำนวณ เช่น root mean square error
Understanding Machine Learning

Unsupervised learning

choose your own adventure

1 https://www.flickr.com/photos/micahdowty/8540188997
Understanding Machine Learning

มาฝึกกันเถอะ!

Understanding Machine Learning

Preparing Video For Download...