Training data-তে ভালো performance পাওয়া মানেই model ভালো generalize করবে এমন নয়।
আমরা আসলে জানতে চাই:
Model unseen data-তে কেমন perform করবে?
সাধারণভাবে dataset ভাগ করা যায়:
Train
Validation
Test
Train Set
Model-এর parameters শেখার জন্য ব্যবহার করা হয়।
Training
→ Learn model parameters
Validation Set
Development phase-এ বিভিন্ন decision নেওয়ার জন্য ব্যবহার করা হয়:
model selection
hyperparameter tuning
threshold selection
feature decisions
error analysis
Test Set
Final development-এর পরে model-এর performance-এর unbiased estimate পাওয়ার জন্য ব্যবহার করা হয়।
Test set ideally development decision-এর বাইরে রাখা হয়।
Important
Test set বারবার দেখে model modify করতে থাকলে test set আর truly unseen থাকে না।
তখন সেটি practically validation data-এর মতো আচরণ করতে শুরু করে।
Time-Based Problems
সব dataset-এ random train-test split appropriate নয়।
বিশেষ করে future prediction বা time-series problem-এ random split করলে future information indirectly training-এ চলে আসতে পারে।
তাই chronological split ব্যবহার করা যেতে পারে:
Jan–Jun
→ Train
July
→ Validation
August
→ Test
অর্থাৎ:
Past
→ Train
More recent past
→ Validation
Future
→ Test
এতে deployment-এর real-world scenario-এর সঙ্গে validation process বেশি consistent থাকে।
**দুটি গুরুত্বপূর্ণ correction আমি বিশেষভাবে করেছি:**
1. **Logistic regression:** `e^(β)`-কে সরাসরি “feature 1 unit বাড়লে probability 2x” বলা হয়নি; এটি *odds ratio*—এখানে interview-এ ভুল করা খুব common।
2. **Confidence vs Prediction interval:** confidence interval mean/expected response-এর uncertainty, prediction interval নতুন individual observation-এর uncertainty—এবং prediction interval wider হওয়ার কারণটাও পরিষ্কার করা হয়েছে।