supervised learning ฝึกโมเดลบน ตัวอย่างที่มี label (input ที่จับคู่กับผลลัพธ์ที่ถูกต้อง) เพื่อให้มันเรียนรู้ที่จะทำนายผลลัพธ์สำหรับ input ใหม่ มันเป็นประเภท ML ที่พบบ่อยที่สุด ใช้สำหรับ classification และ regression การเข้าใจมันช่วยเพิ่มพูนความรู้ด้าน ML
supervised learning ทำงานอย่างไร
TRAIN on LABELED data (input → known correct output):
1. collect a DATASET of examples with labels (e.g. emails labeled spam/not-spam)
2. split into TRAINING and TEST sets
3. the model learns to map inputs → outputs by minimizing prediction error on training data
4. EVALUATE on the test set (unseen data) → measure how well it generalizes
5. use the trained model to PREDICT outputs for new inputs (inference)
→ learn from examples with answers → predict answers for new cases
