3. Key Resampling Techniques in Machine Learning
Trained Model to be accurate only... not enough.
The equally important thing is
👉, have we measured the Model's brilliance the right way?
Many times, the model looks accurate.
Maybe just "coincidence with that set of data."
But when you find new information, it's easy to break.
This Visual Note is summarized.
3. Key Resampling Techniques in Machine Learning
That Data Scientist actually used to evaluate the Model.
From LOOCV, Bootstrap to K-Fold Cross Validation
Each way allows us
✔️ Use more data (especially when data is limited)
✔️ evaluate the model more fairly, not deceive yourself.
✔️ Reduce the risk of long-term overfitting.
Very suitable for
• People studying Machine Learning
• Data workers who want to tighten the basis for validation
• Or anyone who has been "confused" about which method to choose.
📚 this Visual Note summarized from
Class Data Science Bootcamp Model 12
By the DataRockie page.
Who's studying ML or working on Data Line?
Save it for review. 📌💙
จากประสบการณ์ส่วนตัวในการพัฒนาระบบ Machine Learning พบว่าเทคนิค Resampling ถือเป็นเครื่องมือสำคัญที่ช่วยให้เราสามารถวัดประสิทธิภาพของโมเดลได้อย่างเชื่อถือได้มากกว่าการประเมินแบบเดิม ๆ ที่ใช้แค่การแบ่งข้อมูล Train/Test เพียงครั้งเดียว อย่างเช่น Leave-One-Out Cross Validation (LOOCV) ที่จะทดสอบโมเดลโดยการใช้ข้อมูลแต่ละชุดเป็น test set ทีละตัว ผลลัพธ์ค่า error ที่ได้จะมีความละเอียดสูง เหมาะสำหรับชุดข้อมูลที่จำกัด แต่ก็ต้องแลกด้วยเวลาที่ใช้ในการประมวลผลที่นานขึ้น ต่อมาคือ Bootstrap ซึ่งเป็นวิธีการสุ่มตัวอย่างพร้อมแทนที่จากข้อมูลเดิมหลายครั้งเพื่อสร้างชุดข้อมูลสำหรับการฝึกและทดสอบ ทำให้สามารถประเมินโมเดลได้ดีแม้ขนาดข้อมูลจะเล็ก เทคนิคนี้ช่วยลดอคติและให้ความแน่นอนของประสิทธิภาพโมเดล สุดท้ายคือ K-Fold Cross Validation เป็นวิธีที่นิยมมากที่สุด เพราะแบ่งข้อมูลออกเป็น K ส่วน และหมุนเวียนใช้แต่ละส่วนเป็นชุดทดสอบ มีประสิทธิภาพสูง และช่วยลดความเสี่ยงการ overfitting ได้อย่างยอดเยี่ยม วิธีนี้เหมาะมากสำหรับนักพัฒนาที่ต้องการความสมดุลระหว่างเวลาในการประมวลผลกับความแม่นยำของโมเดล การนำเทคนิคเหล่านี้มาใช้จริง ผมพบว่าไม่เพียงแต่ช่วยประเมินโมเดลได้อย่างแฟร์และตรงกับความเป็นจริง แต่ยังช่วยให้เราเห็นข้อจำกัดของโมเดลในกรณีที่เจอกับข้อมูลใหม่ ๆ อีกด้วย หากใครสนใจหรือกำลังเริ่มต้นเส้นทาง Data Science ผมแนะนำให้เรียนรู้และฝึกฝนเทคนิค Resampling เหล่านี้ เพราะจะพัฒนาทักษะการประเมินโมเดลได้อย่างมืออาชีพ และช่วยลดความผิดพลาดในโปรเจ็กต์ Machine Learning ได้มากทีเดียว
