Track · Machine learning and deep learning
Machine learning projects: from scikit-learn to PyTorch
Classic machine learning and PyTorch on real datasets (churn, rents, late deliveries, forecasts) with the metrics, validation and debugging that decide whether a model ships.
- 15
- Labs
- 12 h
- In total
- Beginner to intermediate
- Level
What you will build
- A churn model with a threshold chosen from what mistakes cost
- Cross-validated models and gradient boosting that explain every prediction
- Segmentation, forecasting and anomaly detection on real data
- A PyTorch training loop written from scratch, and a diverging run debugged
- An image classifier built with transfer learning
Before you start
- Python basics and a little pandas
- No statistics course needed; each lab explains the metric it uses
Tools you will use
scikit-learnpandasXGBoostPyTorchk-meansPCASHAPVision-language models
Labs in this track
In order, from the first lab to the hardest. Every lab stands on its own, so start wherever you like.
First models
Predict churn, clean a messy export, pick a threshold from a cost table and validate honestly.
- Lab 1Your First Machine Learning Model: Predict Churn with scikit-learnBuild a churn model end to end with scikit-learn on a realistic subscription dataset: hold back a test set, beat a no-model baseline, build a Pipeline with one-hot encoding and scaling, read AUC, precision and recall, catch two leaking columns behind a too-good-to-be-true score, compare logistic regression with gradient boosting by cross-validation, and turn the model into a call list the retention team can use.50 minBeginnerHostedPro# first-sklearn-model · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 2Metrics That Match the Business: Choose a Threshold from a Cost TableSet a fraud screen's threshold from what mistakes cost instead of the default 0.5: count true and false positives, compute precision, recall and flag rate, plot ROC and precision-recall curves and see why ROC AUC flatters a model when fraud is rare, price every threshold with a cost table, respect the review team's capacity, and report the result on a week of orders the choice never saw.45 minBeginnerHostedPro
- Lab 3Data Cleaning and Feature Engineering: Predict Rents From a Messy ExportTake a messy real-world export to a model that beats the baseline by 70%: fix units, spellings and mixed rent periods, compare against no-model baselines, build a scikit-learn pipeline with imputation, missing-value indicators, scaling and one-hot encoding, model a log target, run an ablation to keep only features that help, and look at the test set once.50 minBeginnerHostedPro# rent-features · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 4Overfitting and Cross-Validation: Find What Really Makes a Better CupWatch a model memorise 150 training rows, see how much a single validation split can lie, choose models by cross-validation, tame 60 noise columns with Ridge and Lasso, prove on pure noise that feature selection outside the pipeline fakes a good score, and finish with a grid search and one honest look at the test set.45 minIntermediateHostedPro# overfitting-and-cv · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 5Gradient Boosting with XGBoost: Predict Late Deliveries and Explain Every PredictionBeat a logistic regression with gradient-boosted trees on messy delivery data, watch extra rounds memorise the training set and stop them early, tune tree shape with a randomised search, compare split-count, gain and permutation importance against a planted noise column, and explain single predictions with per-feature contributions.50 minIntermediateHostedPro# gradient-boosting · step 1$ lab.check(1)Step 1 Completegrade ........... pass
More kinds of data
Clusters, time series, rare events and explanations: the problems tabular work actually brings.
- Lab 6Customer Segmentation with k-means and PCA: Scaling, Choosing k, Stability and DeploymentSegment 2,400 meal-kit customers without labels. Standardise and log-transform features so distances mean something, write k-means with k-means++ from scratch, choose the number of segments with silhouette and bootstrap stability, map customers onto principal components computed with the SVD, and assign new sign-ups with the original scaler and centroids.50 minIntermediateHostedPro# clustering-and-pca · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 7Time-Series Forecasting: Baselines, Backtesting, Calendar Features, Prediction Intervals and the Newsvendor RuleForecast a bakery's daily sales two weeks ahead. Beat naive and seasonal-naive baselines, backtest with rolling origins that never see the future, build calendar and lag features a 14-day forecast can actually know, turn backtest errors into prediction intervals and check their coverage, and choose how much to bake from the cost of a loaf left over versus a customer turned away.50 minIntermediateHostedPro# time-series-forecasting · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 8Imbalanced Data and Anomaly Detection: Average Precision, Rebalancing, Alert Budgets and Unseen FailuresPredict wind-turbine gearbox failures when only 5% of days precede one. See why accuracy misleads and average precision does not, test what oversampling and class weights really change, correct inflated probabilities with Bayes' rule, turn scores into a daily inspection budget measured in failures caught, and add a robust per-turbine anomaly detector for a failure mode no label ever showed.55 minIntermediateHostedPro
- Lab 9Explain a Model: Permutation Importance, Target Leakage, Partial Dependence and Exact Shapley ValuesAudit a loan-default model that looks too good. Find the column it leans on with permutation importance, trace that column to after the decision with the data dictionary, check the honest model's behaviour with partial dependence and ICE curves, compute exact Shapley values for single applicants, and turn them into truthful reason codes.50 minIntermediateHostedPro# explain-a-model · step 1$ lab.check(1)Step 1 Completegrade ........... pass
Deep learning with PyTorch
Tensors and autograd, a training loop from scratch, debugging a run that diverges, transfer learning and vision-language models.
- Lab 10PyTorch in 45 Minutes: Tensors, Autograd and Your First Training LoopLearn the four building blocks of every deep learning model on a CPU in 45 minutes: turn a table into tensors and standardise it, predict gradients on paper and verify them with autograd, write gradient descent by hand, rebuild it with nn.Linear, a loss and an optimiser, read the weights back in real units, and see a small ReLU network fit postage price bands that a straight line cannot.45 minBeginnerHostedPro# pytorch-in-45-minutes · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 11A PyTorch Training Loop From Scratch: Datasets, Epochs, Evaluation and Early StoppingWrite every part of a proper PyTorch training loop for a digit-reading network: a Dataset and seeded DataLoaders, an MLP with dropout, a training epoch that matches a reference loop weight for weight, evaluation with eval mode and no_grad, early stopping that restores the best weights, and a reproducible run that is saved, reloaded and tested once.45 minBeginnerHostedPro# training-loop · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 12Debug a PyTorch Training Run: NaN Loss, Broadcasting Bugs, Learning Rate and Data LeaksFix a broken PyTorch training job one symptom at a time: a loss that turns into NaN, a model stuck at the mean because of a silent broadcasting bug, a learning rate past the edge of stability, and a validation score that is too good to be true. Diagnose each with a real tool (gradient norms, overfitting one batch, a learning-rate range test, a single-feature leak scan), then turn them into a preflight that catches all four.50 minIntermediateHostedPro# debug-training-run · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 13Image Classification with Transfer Learning in PyTorch: From a Small CNN to a Fine-Tuned ResNetClassify satellite tiles with only 1,000 labels. Build a small CNN from scratch, then reuse an ImageNet-trained ResNet18: frozen features with a linear probe, a measured choice of which layer to cut at, and a careful fine-tune with frozen BatchNorm and per-layer learning rates. From about 65% to over 90% accuracy, on a CPU.50 minIntermediateHostedPro# transfer-learning · step 1$ lab.check(1)Step 1 Completegrade ........... pass
- Lab 14Vision-Language Models: Captioning and Visual QALoad Qwen2-VL, caption a real image, run a battery of visual question-answering prompts, and dissect the architecture: vision encoder, projector, language model: to see exactly how pixels become tokens the LLM can reason over.35 minIntermediateGPUPro
- Lab 15Visual Q&A with NVIDIA VLMsSend images to a Vision-Language Model via NIM, answer questions about them, extract structured fields from a receipt-style image, and compare two VLMs on the same task: all through the OpenAI-compatible chat endpoint.30 minIntermediateHostedPro# vlm-visual-qa · agentPOST /api/agent/invoke200 OK · graded
Guides for this track
Questions about this track
No. The scikit-learn and PyTorch labs run on hosted CPUs in your browser, and the vision-language labs use hosted NVIDIA models or start a GPU for you.
Basic Python is enough. Each lab explains the metric it uses and why it fits the problem.
Most take 45 to 55 minutes and save your progress between steps.
These labs train and evaluate models from data. The LLM tracks build on top of language models; this track teaches the fundamentals they rest on.
Other tracks
LLM training and fine-tuning
LoRA and QLoRA fine-tuning, DPO alignment, and a tokenizer and tiny GPT built from scratch.
Start with AI
Your first AI call, a chatbot, tested prompts and everyday automations. No machine learning background needed.
LLMOps and MLOps
vLLM serving, load tests against SLOs, tracing, drift monitoring and prompt tests in CI.
Every lab with Pro
This track and every other one, plus every practice test. $29.99 a month, cancel any time.