ML Engineer
Start here. Build forward.
Train, package and operate models whose behavior can be measured.
Follow the stages in order, or open a topic to check what you already know. Each panel includes learning content, a practice task and a role checkpoint. Save Learning, Done or Skipped as you go. Skipped topics do not count as completed.
Build your foundations
Python, files and debugging
Understand the concept
Python is the working language for many AI experiments. Learn to inspect small values before connecting a large model. Variables, lists, dictionaries, loops and functions are enough for a first useful script. Errors are information: read the traceback and isolate the smallest failing input.
Learn it step by step
- Create a function with explicit inputs and outputs.
- Read a small JSON file and validate required keys.
- Handle a missing file and malformed input.
- Write checks for normal and empty input.
Build a small proof
Build a script that counts tutorial topics from ten fictional records and reports invalid rows separately.
Ready to move on?
You can explain each line, reproduce one error and fix its cause without hiding the exception. Keep the expected output with the script.
Common mistake
Copying a large generated program without understanding its inputs makes even small changes difficult to verify.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Linear algebra and optimisation intuition
Understand the concept
Vectors, matrices, derivatives and gradients provide the language for model calculations. Begin with small numeric examples and visual intuition. A gradient describes a local direction of change; optimisation uses it to adjust parameters against a loss. It does not guarantee a globally best solution.
Learn it step by step
- Multiply a small matrix and vector by hand.
- Plot a simple quadratic loss.
- Follow several gradient steps.
- Compare a learning rate that converges with one that overshoots.
Build a small proof
Use a spreadsheet or short Python script to minimise a one-variable quadratic and log each step.
Ready to move on?
Explain what the gradient, learning rate and loss each represent in your example.
Common mistake
Memorising symbols without relating them to a calculation makes debugging training much harder.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Git and reproducible experiments
Understand the concept
Version control records changes so you can compare experiments and restore a known working state. A commit should describe a coherent change. Keep source code and small configuration files; credentials and large private datasets need separate handling.
Learn it step by step
- Initialise a repository and add a README.
- Commit a working baseline.
- Create a branch for one experiment.
- Compare the change and document how to reproduce it.
Build a small proof
Store two versions of a prompt or data-cleaning script and explain why the second version exists.
Ready to move on?
Another person can run the baseline from your instructions and identify exactly what changed between versions.
Common mistake
Do not commit secrets, private learner records or generated cache folders. Removing a secret from the latest file does not erase Git history.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Learn the core skills
What are training, validation and test data?
In simple words
When preparing for an exam, you study examples, use practice tests to improve and finally take an unseen exam. ML evaluation uses a similar separation. Training fits the model, validation guides your choices and testing checks the final design on held-out examples. The separation helps make your score more honest.
Two useful terms
Training set: examples used to fit a model. Held-out data: examples kept separate from fitting.
Build your understanding
A model needs evaluation on data it did not learn from. Training data fits parameters, validation data supports model choices and test data provides a final held-out check. The split must reflect how the system will be used: time, users and groups can create dependencies between rows.
Follow the steps
- Define what an independent example means for your task.
- Separate the test set before experimenting.
- Use validation data or cross-validation to choose settings.
- Evaluate the final design once on the held-out test set and report limitations.
Worked example
For 1,000 independent toy examples:
600 training + 200 validation + 200 test
For repeated users: keep each user in only one split.
For forecasting: use chronological splits.
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
Explain why randomly splitting multiple messages from the same person can overestimate performance on entirely new people.
Check your understanding
The model may learn person-specific patterns shared across splits. A group-based split better tests generalisation to new people.
A mistake to avoid
Do not repeatedly tune choices against the final test score. That gradually turns the test set into another validation set.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
What is classification in machine learning?
In simple words
Classification predicts a category. A message might be labelled spam or ordinary; a support request might be labelled billing or technical. Decide what each category means before collecting labels. A model cannot resolve inconsistent label rules just by seeing more examples.
Two useful terms
Class: one possible category. Classifier: a model that predicts a category.
Build your understanding
Classification assigns an input to a category. Start with a simple baseline and choose metrics that reflect your error costs. Accuracy alone can hide poor performance when one class dominates. Always inspect which cases the classifier gets wrong.
Follow the steps
- Define labels and ensure they are consistent.
- Measure class balance before fitting.
- Create a baseline that predicts the most common class.
- Compare a model using a confusion matrix and a suitable metric.
Worked example
Dataset: 95 ordinary messages, 5 spam messages
Always predict ordinary -> 95% accuracy
Spam recall -> 0 / 5 = 0
High accuracy, no useful spam detection.
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
Propose two different costs: blocking a genuine message and missing a spam message. Explain how those costs influence your preferred threshold.
Check your understanding
Lowering a spam decision threshold usually catches more spam but may flag more genuine messages. Measure both effects on validation data.
A mistake to avoid
A predicted probability is not automatically calibrated. A score of 0.9 does not guarantee 90% correctness without checking calibration.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
What is overfitting?
In simple words
A student can memorise the exact answers on one worksheet and struggle when the questions change. A model can do something similar: fit the training examples very well without learning patterns that transfer. Compare performance on unseen examples instead of celebrating the training score alone.
Two useful terms
Generalisation: working well on new examples. Regularisation: methods that discourage overly complex or unstable fitting.
Build your understanding
Overfitting happens when a model captures training-specific patterns that fail to generalise. A large gap between training and validation performance is a warning sign. More data, simpler models and regularisation can help, but poor splits or label problems require different fixes.
Follow the steps
- Compare training and validation scores using the same metric.
- Check whether the validation set represents deployment conditions.
- Reduce unnecessary model complexity and compare again.
- Use learning curves to explore how scores change with more training data.
Worked example
Model A: train accuracy 99%, validation 68%
Model B: train accuracy 84%, validation 81%
On this evaluation, B generalises better despite lower training accuracy.
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
List two reasons besides overfitting that could explain weak validation performance, such as shifted data or inconsistent labels.
Check your understanding
A score gap is evidence to investigate, not a complete diagnosis. Check splits, leakage and distribution differences before choosing a remedy.
A mistake to avoid
Do not increase complexity solely to improve training accuracy. Your goal is useful performance on unseen examples.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Practise with real decisions
What is a decision tree?
In simple words
A decision tree makes a prediction through a series of questions. A simple plant-care tree might ask whether soil is dry, then whether the plant was watered recently. Small trees can be easy to follow. Very deep trees can learn tiny exceptions that fail on new examples.
Two useful terms
Split: a question that divides examples. Leaf: a final node that provides a prediction.
Build your understanding
A decision tree predicts by applying a sequence of feature-based splits. It is easy to visualise when small, which makes it a useful teaching model. Deep trees can create tiny leaves that memorise noise. Tree rules describe associations in the fitted dataset, not universal laws.
Follow the steps
- Draw a two-question rule for a synthetic task.
- Fit a shallow tree and inspect its splits.
- Compare it with a deeper tree on held-out data.
- Look at the number of examples reaching each leaf.
Worked example
from sklearn.tree import DecisionTreeClassifier
x = [[10], [15], [40], [45]]
y = [1, 1, 0, 0]
m = DecisionTreeClassifier(max_depth=1, random_state=7).fit(x, y)
print(m.predict([[12], [42]])) # [1 0]
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
Add an inconsistent label for one low-moisture example. Compare how shallow and deep trees react.
Check your understanding
A shallow tree may ignore the isolated exception while a deeper tree can split around it. Evaluate which behavior generalises rather than assuming either is correct.
A mistake to avoid
Feature importance from a tree is not proof of causal influence. Correlated features and data composition affect the result.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
What is a neural network?
In simple words
A neural network combines numbers through connected layers to produce an output. Its weights are adjusted during training. Start with one small calculation before thinking about enormous models. The term “neural” is inspired by biology, but it does not establish that the system thinks or feels like a human brain.
Two useful terms
Weight: an adjustable multiplier. Activation: a function applied to a layer’s values.
Build your understanding
A neural network combines weighted inputs through layers and nonlinear transformations. Training adjusts weights to reduce a chosen loss. You can understand the basic computation with one neuron before learning larger architectures. More layers do not remove the need for careful data and evaluation.
Follow the steps
- Choose two inputs, two weights and a bias.
- Compute the weighted sum.
- Apply a simple activation such as ReLU.
- Compare the output with a target and describe the resulting error.
Worked example
x = [2, 3], weights = [0.5, -1], bias = 1
z = 2*0.5 + 3*(-1) + 1 = -1
ReLU(z) = max(0, z) = 0
This is a forward pass, not a complete training algorithm.
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
Change the bias to 3 and recompute the output. Explain which part of the computation changed.
Check your understanding
The new weighted sum is 1, so ReLU outputs 1. A bias shifts the activation boundary without changing the input weights.
A mistake to avoid
An analogy to a biological brain is only an analogy. It does not explain reliability, consciousness or general intelligence.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
What is AI model evaluation?
In simple words
A polished answer is not enough to know whether an AI system works. Evaluation checks specific requirements using examples and scoring rules. For a course assistant, you might check whether it finds the correct course, admits missing information and respects account permissions. Keep failure cases as part of your test collection.
Two useful terms
Test case: an input with an expected behavior. Metric: a defined measurement of performance.
Build your understanding
An AI evaluation checks whether a system meets a defined task. Build examples around realistic successes and failures, not only easy demonstrations. Keep the test set stable enough to compare versions and record the model, prompt and settings used. A single aggregate score can hide critical mistakes.
Follow the steps
- Define success in observable terms.
- Create normal, ambiguous, missing-information and adversarial examples.
- Write expected answers or scoring rules before running the system.
- Compare versions and inspect regressions before accepting a change.
Worked example
FAQ evaluation columns:
question | expected source | required facts | forbidden claim | result
Example: fees unknown | FAQ-3 | say unknown | invented fee | pass/fail
Read the example once, then explain each part aloud in your own words. If it includes Python, you can understand the idea first and run the code later in a local Python environment. Code is shown as text; this page does not execute it.
Try this yourself
Write five tests for an enrolment assistant. Include a user without Pro access and a request for a nonexistent course.
Check your understanding
A response should not promise enrolment if server-side permissions deny it. Include permission-sensitive cases, not just wording checks.
A mistake to avoid
Do not judge a model solely by another model’s unreviewed score. Human checks and deterministic validation are useful for important requirements.
Before looking at the answer, write a short explanation and one example of your own. Finish by naming one limitation of the method. Use Mark as read when you are ready, or return to the previous lesson if a term is unclear.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Ship, evaluate and improve
Batch pipelines and orchestration
Understand the concept
A pipeline moves data through repeatable stages such as extraction, validation, transformation and loading. Each stage should have a clear input and output. A rerun should not corrupt results or create duplicates. Start with a scheduled batch before adding streaming complexity.
Learn it step by step
- Define source and destination schemas.
- Validate required fields at ingestion.
- Make output writes repeatable.
- Record run status and failed rows.
Build a small proof
Build a local CSV-to-table pipeline that can rerun the same day’s input safely.
Ready to move on?
Run it twice and prove that row counts and values remain correct. Explain how late or invalid records are handled.
Common mistake
Appending every rerun without stable keys silently duplicates data.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Deployment, containers and rollback
Understand the concept
Deployment makes a working experiment available to users. It needs configuration, a reproducible environment, health checks and a way to roll back. A successful launch does not establish ongoing reliability. Monitor behavior after release and keep a known-good version.
Learn it step by step
- Document dependencies and configuration.
- Run a health check separately from a model call.
- Package a minimal service.
- Practise replacing it with the previous version.
Build a small proof
Deploy a mock prediction service locally in a container and simulate an unavailable dependency.
Ready to move on?
You can rebuild the environment and recover after a failed release without editing production files by hand.
Common mistake
Do not bake secrets into container images or assume the development machine matches production.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Monitoring quality, latency and cost
Understand the concept
AI monitoring needs more than uptime. Track response time, failures, input volume and task quality using a suitable sample of reviewed outcomes. Quality can change when users or source documents change. Log enough to diagnose failures without retaining unnecessary sensitive input.
Learn it step by step
- Define a service-level target.
- Record request outcome and latency.
- Track a stable evaluation set over releases.
- Create an alert and an investigation checklist.
Build a small proof
Produce a small report comparing two releases on success rate, p95 latency and estimated per-request cost.
Ready to move on?
You can tell whether a change improved usefulness while increasing cost or response time, and explain the trade-off.
Common mistake
An average hides slow tails and rare severe failures. Examine distributions and critical error categories.
Your role checkpoint
For the ML Engineer path, connect this topic to your capstone: Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Build something you can explain.
Ship a small prediction service with input validation, a baseline comparison and a rollback demonstration.
Role expectations vary by company. Use this path as a starting point and build evidence of your skills.