Machine LearningIntermediate

Supervised Learning: Regression and Classification

The Andrew Ng-style core, hands-on in Python.

Taught by Bibek Sharma · Data Scientist

What you'll learn

  • Implement linear regression and batch gradient descent from scratch in NumPy
  • Explain cost functions, learning rates and convergence, and diagnose a training run that is not converging
  • Engineer, scale and select features using scikit-learn pipelines
  • Train logistic regression classifiers and interpret their probabilities and decision boundaries
  • Apply L1 and L2 regularisation and use learning curves to diagnose bias and variance
  • Choose the right metric, run cross-validation and tune hyperparameters with GridSearchCV

About this course

Supervised learning is the foundation of practical machine learning, and this course teaches it the way strong practitioners learn it: by building the algorithms yourself before reaching for a library. You will implement linear regression and gradient descent from scratch in NumPy, understand cost functions and learning rates by watching them work, then move to logistic regression for classification, regularisation to control overfitting, and the evaluation metrics that tell you whether a model is genuinely good. Every concept is paired with scikit-learn code so you can apply it to real datasets immediately. The course is for developers, analysts and students who know basic Python and want a rigorous but approachable grounding in regression, classification, gradient descent and model selection. Comfort with high-school algebra is enough; the calculus is explained as needed. By the end you will be able to train, tune and honestly evaluate supervised models on tabular data.

Course content

7 lessons
  1. 1The Supervised Learning SetupFeatures, labels, hypotheses and cost: the vocabulary and workflow every supervised model shares.Preview
  2. 2Linear Regression and the Cost FunctionFit a straight line to data, understand mean squared error, and see why the cost surface is a bowl.
  3. 3Gradient Descent From ScratchImplement batch gradient descent in NumPy, choose a learning rate, and diagnose convergence.
  4. 4Feature Engineering and ScalingStandardise features, add polynomial terms and encode categories inside a scikit-learn Pipeline.
  5. 5Logistic Regression for ClassificationTurn a linear score into a probability with the sigmoid, train with log loss, and read decision boundaries.
  6. 6Regularisation and the Bias-Variance Trade-offUse Ridge, Lasso and the C parameter to control overfitting, and read learning curves to diagnose bias or variance.
  7. 7Evaluation Metrics and Model SelectionPick the right regression and classification metrics, cross-validate honestly and tune with GridSearchCV.