Machine Learning tutorials and worked examples
Frame modeling problems, build baselines, evaluate predictions and diagnose errors on real workflows.
Classification
Fit probabilities and inspect thresholded errors.
Logistic regression from scratch: fit probabilities and inspect errors
Implement stable binary cross entropy and its gradient in NumPy, train on invented data and compare held-out predictions with a constant baseline.
tutorial · 4 min read
Preprocessing
Choose transformations that match feature meaning and model geometry.
Scaling vs normalization: feature statistics or row lengths
Compare StandardScaler, MinMaxScaler and Normalizer inside a fixed training split, and show why the word normalization needs a precise definition.
comparison · 4 min read
Trees and split criteria
Calculate splits and evaluate tree complexity.
Decision-tree split criteria: calculate weighted Gini impurity
Enumerate thresholds on an explicit binary dataset, fit a one-level tree and compare held-out performance with a majority baseline.
tutorial · 4 min read
Model interpretation
Measure reliance while checking what an explanation can support.
Permutation feature importance: measure reliance and inspect correlated features
Fit a reproducible regression task, calculate held-out permutation importance and jointly shuffle correlated columns to expose an interpretation limit.
tutorial · 4 min read
Forecasting
Compare future predictions using chronological baselines.
Time series forecasting in machine learning: start with persistence and seasonal baselines
Compare fixed-origin persistence and weekly seasonal-naive forecasts on chronological development and test windows, with explicit dates and errors.
tutorial · 4 min read
Recommendation
Rank available items and test relevance at a declared budget.
Build a content-based recommendation system and test its top results
Rank an original miniature catalogue with TF-IDF and cosine similarity, exclude the seed item and evaluate top-k relevance without pretending to measure user satisfaction.
tutorial · 4 min read
Model evaluation
All on this topicChoose metrics, splits and diagnostic experiments that support valid conclusions.
Cross-validation for groups and time: check what a split holds out
Audit random, grouped and chronological folds on the same small table, and choose a split that matches the prediction you intend to make.
tutorial · 4 min readROC AUC vs PR AUC: inspect what changes with class balance
Compare ROC AUC, average precision and trapezoidal PR area on an explicit ranking, then change prevalence while preserving class-conditional scores.
comparison · 4 min readData leakage in machine learning: examples and prevention
Spot target leakage, preprocessing leakage and train-test overlap. See concrete examples and a Python pipeline that keeps fitted transformations separate.
troubleshooting · 6 min readOverfitting vs underfitting: examples and how to fix each
Tell overfitting from underfitting using training and validation error. Work through a demand example, diagnose the cause and choose a sensible next experiment.
troubleshooting · 6 min read
Regression
Fit predictions for numerical targets and inspect their errors.
Linear regression in machine learning: a worked Python example with a baseline
Learn linear regression with a worked prediction, runnable Python, a held-out test and a baseline. Explain coefficients and check where a line can fail.
tutorial · 6 min read
Unsupervised learning
All on this topicFind structure and unusual records without pretending clusters supply their own validation.
Machine learning for outlier detection: an Isolation Forest example in Python
Use machine learning to flag unusual rows for review. Run an Isolation Forest example, compare simple rules and understand thresholds and false alarms.
tutorial · 6 min readMachine learning for unlabeled data: a clustering example and how to check it
Explore unlabeled data with a runnable clustering example. Understand cluster IDs, scaling, useful checks and when you still need human labels.
tutorial · 6 min read
Applied machine learning
All on this topicConnect a prediction to a decision and a complete experiment.
Machine learning for business analytics: start with the decision, then the model
Plan a useful machine learning project for business analytics: define a decision, compare a rule, choose data and evaluate errors with a worked example.
explanation · 6 min readMachine learning for non-technical people: how to read a model report and what to ask
Understand machine learning without coding: follow a worked example, read a model report and ask useful questions before starting a project.
explanation · 6 min readMachine learning for predictive analytics: define the target, beat a baseline, test fairly
Learn predictive analytics through a clear target, prediction-time inputs, a baseline and held-out evaluation. Work through a forecast example and common errors.
tutorial · 6 min read
Projects
Plan useful model artifacts with explicit baselines and evaluation.
Machine learning projects for your portfolio: three briefs with evaluation plans
Build an ML portfolio with three practical project briefs covering prediction, document search and image classification, with baselines and clear deliverables.
project · 5 min read
Learning paths
All on this topicChoose prerequisites and a sequence of skills with concrete checkpoints.
Where to start with machine learning: a beginner's four-step path
Start machine learning with a four-step learning path: Python, data tools, maths and statistics, then models. Check your progress with practical tasks.
learning path · 8 min readHow to learn AI from scratch: a practical beginner's plan
Learn AI from scratch with a week-by-week plan: Python, data tools, maths, statistics, a first machine learning model and a small generative AI project, with a checkpoint for each stage and free resources.
learning path · 11 min readMachine learning engineer roadmap: seven stages, each with a checkpoint
A machine learning engineer roadmap in seven stages: Python as software, data tools, the maths a model uses, classical ML, production habits, deep learning and a portfolio. Each stage links to free lessons and ends in a checkpoint.
learning path · 11 min readHow to get an AI or machine learning internship: what to learn, build and explain
A student's plan for an AI or machine learning internship: the foundations interviewers test, two projects worth building, the questions your project will raise, and how to apply without overclaiming.
learning path · 7 min readAI engineer vs machine learning engineer: the difference, and what to learn for each
A machine learning engineer trains and deploys models; an AI engineer builds products on existing models. How the work, skills and maths differ, the foundations both share, and a learning order for each.
comparison · 7 min read
Interview preparation
Practise explaining modeling choices and their limitations.
Machine learning interview questions: how to prepare, with worked answers
Prepare for a machine learning interview with worked questions on splits, leakage, baselines, metrics and regression, plus a practical revision plan.
interview guide · 7 min read