Supervised Learning for Data Sciences
Supervised learning trains models on labelled examples to predict a known target, either a number (regression) or a class (classification). The unit covers linear and logistic regression, tree-based models and gradient boosting, plus validation methods such as cross-validation and metrics like precision, recall and AUC.
Stage: Machine Learning · Part of the Data Science roadmap · Last reviewed 19 November 2026
What to learn in Supervised Learning
- Train a logistic regression and a gradient boosting classifier with scikit-learn
- Split data into train, validation and test sets correctly
- Use k-fold cross-validation to compare models fairly
- Pick precision, recall, F1 or AUC based on the cost of errors
- Diagnose overfitting by comparing training and validation scores
Supervised Learning interview questions
How do you handle a heavily imbalanced classification problem?
Avoid accuracy as the metric, since predicting the majority class scores well. Use precision-recall, F1 or AUC-PR, consider class weights or resampling inside cross-validation, and tune the decision threshold to match the real cost of false positives and negatives.
What is overfitting and how do you reduce it?
Overfitting is when a model fits noise in the training data and does poorly on new data. Reduce it with more data, simpler models, regularisation, early stopping, feature selection and cross-validation to detect it.
Where Supervised Learning fits in the Data Science roadmap
Supervised Learning belongs to the Machine Learning stage (intermediate level), which takes about 6 hours. Predict and explain.
Other units in this stage
Back to the full Data Science roadmap