Machine Learning · Level 101
Machine Learning 101 — Could I Be a Machine Learning Engineer?
Shadow a junior ML engineer at Solstice AI — from raw measurements to your first trained classifier.
Machine Learning · Level 101
Machine Learning 101 — Could I Be a Machine Learning Engineer?
Shadow a junior ML engineer at Solstice AI — from raw measurements to your first trained classifier.
Machine Learning 101 — Could I Be a Machine Learning Engineer?
Prerequisite: Data Science 101.
This course assumes you can already use VS Code, Jupyter Notebooks, Python and pandas. We won't reteach those. Instead, you'll discover how machine learning engineers turn a table of numbers into a working prediction.
You have joined Solstice AI, a London applied-AI startup that builds prediction tools for other companies. Your manager is Priya Shah, a lead machine learning engineer who mentors new joiners before letting them touch a client project.
Over five modules you will do real junior-ML-engineer work:
- Understand what machine learning engineers do and whether the career appeals to you.
- Turn a spreadsheet of real measurements into features and labels a model can learn from.
- Train your first classifier and see it make predictions.
- Learn why a model that is "too good" on old data can fail on new data — and how to check.
- Deliver a short model report to Priya on a new client dataset.
The mindset to keep throughout:
data → features → model → evaluation → decision
Before you start — create your project folder
Open File Explorer (or Finder on Mac).
Create a folder called ml101 inside your existing coding folder (the same
parent folder you used for Data Science).
Inside ml101, create:
Open VS Code. Choose File → Open Folder and open ml101.
You will save notebooks in notebooks/, charts in outputs/charts/, and
short written answers in report/.
Tools
- VS Code
- Jupyter Notebook
- Python
- pandas
- matplotlib
- scikit-learn
If you need a package you have not installed yet:
pip install pandas matplotlib scikit-learn jupyter ipykernelModule 1 — What is Machine Learning?
Manager email
From: Priya Shah
Subject: Welcome to Solstice AIWelcome aboard. Before I give you any data, I need to know whether you understand what a machine learning engineer actually does — and whether you'd enjoy that kind of work.
This week, read about three organisations that hire ML engineers in the UK: Google DeepMind, Wayve and Faculty. Check each one's careers page and, if it has one, its blog or "how we work" page — those usually explain the day-to-day work better than a job advert does. Then send me a one-page note answering:
- What does a machine learning engineer do day to day?
- How is that different from a "data scientist" or a "research scientist"?
- Which organisation sounds most interesting to you, and why?
No Python required today. Think like a researcher, not a programmer.
— Priya
Why this matters
Companies do not hire ML engineers because prediction is magic. They hire them because decisions made under uncertainty, at scale, are expensive to get wrong.
An ML engineer's job is to:
- turn messy real-world data into something a model can learn from;
- choose and train a model that predicts well on data it has never seen;
- explain how confident the model is, and where it is likely to be wrong.
If you dislike being precise about what "working" actually means, you will not enjoy this career — even if you like the idea of AI.
What you'll learn
- What machine learning is, and how it differs from traditional programming
- The difference between ML engineering, data science and research
- What "training" and "prediction" actually mean, in plain English
- Typical UK career paths and graduate salaries
- Whether this style of work feels motivating to you
Programming vs machine learning
In traditional programming, a human writes the rules:
"If the transaction is over £1,000 and from a new device, flag it."
In machine learning, a human instead supplies examples — past
transactions labelled fraud or not fraud — and lets an algorithm work
out the rules itself.
Traditional programming: rules → answers. Machine learning: answers → rules.
This distinction matters because ML earns its keep exactly where writing rules by hand is impractical: too many edge cases, patterns too subtle for a human to write down, or the "correct rule" itself changing over time.
Three types of role
| Role | Focus | Typical day |
|---|---|---|
| ML engineer | Building and shipping trained models | Data pipelines, training scripts, monitoring |
| Data scientist | Answering business questions with data | Analysis, experiments, dashboards, some modelling |
| Research scientist | Advancing what's possible | Reading papers, new architectures, long experiments |
Solstice AI mostly hires ML engineers: people who take a promising idea and turn it into something a client can rely on in production.
Your tasks
Create a new file:
report/module1_ml_research.md
Answer the following in clear prose (roughly 300–500 words total).
Task 1 — Research three organisations
Visit the careers pages of Google DeepMind, Wayve and Faculty. For each one, also check its blog or engineering section if it has one — many ML employers explain their actual day-to-day work there, not just in job adverts.
For each organisation, note:
- what the organisation says it does;
- one example role that mentions machine learning, models or data;
- where in the UK it is based;
- whether it hires graduates or offers internships.
Task 2 — Compare graduate pay (roughly)
Search "machine learning engineer graduate salary UK" and read two recent sources (job boards, BrightNetwork, company pages). You do not need exact figures — estimate a range and cite your sources.
Task 3 — Explain the difference
In your own words: what is the difference between an ML engineer, a data scientist and a research scientist? Which one would you rather shadow for a week?
Task 4 — Pick one organisation
Which of the three would you most like to learn more about? One honest paragraph — there is no correct answer.
Reflection questions
Add a short section at the bottom of your report:
- Did you enjoy the research, or did you find it tedious?
- Did any job description sound exciting? Any sound miserable?
- Do you like the idea of a model being wrong in ways you have to explain?
- Would you rather build the model, or decide what "success" means for it?
Manager feedback
From: Priya Shah
Good first effort. A few things strong ML engineers always do in week one:
- They distinguish what a company builds from marketing language on its careers page.
- They notice that "AI" job titles vary hugely — engineer, scientist, researcher are not interchangeable.
- They ask what happens when the model is wrong, before they ask how accurate it is.
Tomorrow we look at real data. Bring your Python environment.
— Priya
AQA Mathematics links
- Statistics — interpreting data and sources critically
- Probability — machine learning predictions are rarely certainties
Beyond A-Level
Look up supervised, unsupervised and reinforcement learning. This course focuses on supervised learning — Wayve, for example, uses reinforcement learning too, to let a system learn from trial and error.
Module 2 — Data as Training Material
Manager email
From: Priya Shah
Subject: A healthtech client, a small dataset, a big questionOne of our clients supports clinicians who screen patients for signs of breast cancer. They want to know: could a model flag concerning cases from cell measurements alone?
Before we train anything, I want you to properly understand the data: what each column means, how many cases we have, and how balanced the two outcomes are.
Do not train a model yet. Show me you understand the raw material first.
— Priya
Why this matters
Before Solstice AI trains a single model, someone answers boring-sounding questions:
- What does each column actually measure?
- How many examples do we have of each outcome?
- Is anything missing, duplicated, or on a wildly different scale?
Skipping this step is how engineers end up training a model that looks brilliant and works nowhere.
What you'll learn
- Load a real, well-known dataset with scikit-learn
- Identify features (inputs) and the label (what we're predicting)
- Check class balance — how many of each outcome exist
- Understand why scale and units matter before training
Step 1 — Create the notebook
In VS Code, create:
notebooks/module2_data_as_training_material.ipynb
Select your Python kernel (same as Data Science).
Section 1 — Load the dataset
Question
Can we load real diagnostic data without downloading a file by hand?
Code
from sklearn.datasets import load_breast_cancer
import pandas as pd
data = load_breast_cancer()
print(data.DESCR[:900])What the code does
load_breast_cancer() is a real, anonymised dataset built into
scikit-learn: measurements taken from digitised images of breast tissue
samples, alongside whether each sample was diagnosed malignant or
benign. DESCR prints the dataset's own documentation — always read this
before touching the numbers.
Section 2 — Build a features table and a label
Question
What do the features and the label actually look like as a table?
Code
features = pd.DataFrame(data.data, columns=data.feature_names)
label = pd.Series(data.target, name="diagnosis")
features.head()What the code does
features is a table where each row is one patient sample and each
column is one measurement (e.g. mean radius, mean texture). label
holds the answer for each row: 0 or 1.
In machine learning:
- features = the inputs the model is allowed to use;
- label = the correct answer we are trying to predict.
Section 3 — What does the label mean?
Question
Which number means "malignant" and which means "benign"?
Code
print(data.target_names)
label.value_counts()What the code does
target_names tells you 0 maps to malignant and 1 maps to benign —
always check this; it is not always intuitive which number means what.
value_counts() shows how many samples fall into each class. This dataset
has noticeably more benign cases than malignant ones — an early sign that
class balance will matter later.
Section 4 — Look at feature scales
Question
Are all the features measured on similar scales?
Code
features.describe().T[["mean", "std", "min", "max"]]What the code does
describe() gives summary statistics per column; .T transposes it so
each row is one feature. Notice that some features (like mean area) have
values in the hundreds, while others (like mean smoothness) sit below 1.
Models that compare distances between points — which you'll meet later — can be misled if one feature's scale dwarfs another's. Keep this in mind; you will not fix it in this module, but you should be able to spot it.
Section 5 — Visualise one feature by diagnosis
Question
Does one feature look genuinely different between malignant and benign samples?
Code
import matplotlib.pyplot as plt
plot_data = features.copy()
plot_data["diagnosis"] = label.map({0: "malignant", 1: "benign"})
fig, ax = plt.subplots(figsize=(7, 5))
for name, group in plot_data.groupby("diagnosis"):
ax.hist(group["mean radius"], bins=20, alpha=0.6, label=name)
ax.set_xlabel("Mean radius")
ax.set_ylabel("Count")
ax.set_title("Mean radius by diagnosis")
ax.legend()
plt.savefig("../outputs/charts/module2_mean_radius_by_diagnosis.png", dpi=150)
plt.show()What the code does
Two overlapping histograms let you see whether malignant and benign samples separate at all on this one feature. If they overlap almost completely, that feature alone will not predict much; if they separate cleanly, it is a strong candidate feature.
Section 6 — Write your findings
Add a markdown cell in your notebook answering:
- How many samples are malignant, and how many are benign?
- Name two features that look like they might separate the classes well,
based on your histogram (try at least one other feature besides
mean radius). - Why might it matter that this dataset has more benign than malignant cases, if we were building a real screening tool?
Reflection questions
- Did looking at raw numbers before modelling feel like a wasted step, or a necessary one?
- Would you feel comfortable explaining what "mean radius" measures to a clinician?
- Does working with medical data feel different from working with market or exam data? Why?
Manager feedback
From: Priya Shah
Good work. Two habits to keep:
- Read the label meanings before you write a line of modelling code. Getting
0and1backwards is a classic, embarrassing mistake.- Notice imbalance early. A dataset with 90% one class can make a lazy model look accurate while being useless.
Tomorrow we train an actual model. Today's discipline is what makes that safe to do.
— Priya
AQA Mathematics links
- Statistics — describing distributions, mean, spread
- Data presentation — histograms as a way to compare groups
Beyond A-Level
Look up class imbalance in machine learning. Real-world datasets — fraud, disease, faults — are very often imbalanced, and it is one of the first things a working ML engineer learns to check for.
Module 3 — Training Your First Model
Manager email
From: Priya Shah
Subject: Time to train somethingYou understand the data. Now train a model that predicts diagnosis from the cell measurements.
Keep it simple: a single, easy-to-explain model, split fairly between training and testing, and an honest accuracy number.
I want to see the model's predictions compared with the true diagnoses — not just one summary number.
— Priya
Why this matters
A trained model is only useful if you can trust the number you report for it. Testing a model on the same data it learned from is like marking your own exam with the answers in front of you — it will always look good and tell you nothing.
What you'll learn
- Split data into a training set and a test set
- Train a simple classifier (logistic regression) with scikit-learn
- Make predictions on unseen data
- Calculate accuracy and read a confusion matrix
Step 1 — Create the notebook
notebooks/module3_training_your_first_model.ipynb
Section 1 — Load the data again
Question
Can we get back to a clean features table and label?
Code
from sklearn.datasets import load_breast_cancer
import pandas as pd
data = load_breast_cancer()
features = pd.DataFrame(data.data, columns=data.feature_names)
label = pd.Series(data.target, name="diagnosis")
features.shape, label.shapeWhat the code does
Same loading pattern as Module 2 — consistency saves debugging time.
shape confirms every row in features has a matching row in label.
Section 2 — Split into training and test sets
Question
How do we hold back data the model has never seen?
Code
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(
features, label, test_size=0.2, random_state=42, stratify=label
)
X_train.shape, X_test.shapeWhat the code does
train_test_split randomly holds back 20% of the data as a test set the
model will never train on. random_state=42 makes the split reproducible.
stratify=label keeps the same proportion of malignant/benign cases in
both sets — important given the imbalance you spotted in Module 2.
Section 3 — Train a logistic regression model
Question
Can a model learn the pattern from the training set?
Code
from sklearn.linear_model import LogisticRegression
model = LogisticRegression(max_iter=5000)
model.fit(X_train, y_train)What the code does
Logistic regression is one of the simplest classifiers: it learns a
weight for each feature, combines them, and squashes the result into a
probability between 0 and 1. fit() is where the actual "training" happens
— the model adjusts its weights to best match y_train.
max_iter=5000 gives the training process enough attempts to settle on good
weights; scikit-learn will warn you if it needs more.
Section 4 — Predict on the test set
Question
What does the model predict for data it has never seen?
Code
predictions = model.predict(X_test)
pd.DataFrame({
"actual": y_test.values,
"predicted": predictions,
}).head(10)What the code does
predict() runs the trained model on X_test — data it never saw during
fit(). Comparing actual and predicted side by side is the most honest
first look at whether the model works.
Section 5 — Accuracy
Question
What fraction of predictions were correct?
Code
from sklearn.metrics import accuracy_score
accuracy = accuracy_score(y_test, predictions)
accuracyWhat the code does
Accuracy is the proportion of predictions that matched the true label:
A high number here feels reassuring — but on an imbalanced dataset, a model that always predicts "benign" could still score well. That's why Priya asked for more than one number.
Section 6 — Confusion matrix
Question
Where exactly does the model go wrong?
Code
from sklearn.metrics import confusion_matrix, ConfusionMatrixDisplay
import matplotlib.pyplot as plt
cm = confusion_matrix(y_test, predictions)
disp = ConfusionMatrixDisplay(cm, display_labels=data.target_names)
disp.plot()
plt.title("Diagnosis: predicted vs actual")
plt.savefig("../outputs/charts/module3_confusion_matrix.png", dpi=150)
plt.show()What the code does
A confusion matrix breaks predictions into four groups: correct malignant, correct benign, and the two kinds of mistake. For a screening tool, the mistake of predicting "benign" when the sample is actually malignant is far more serious than the reverse — and accuracy alone would never show you that.
Section 7 — Write your summary
Add a markdown cell answering:
- What was your test accuracy?
- Looking at the confusion matrix: did the model make more of one kind of mistake than the other?
- If Solstice AI shipped this model as-is to a hospital, what would worry you?
Reflection questions
- Did training the model feel anticlimactic compared to Module 2's data work?
- Would you trust this model's accuracy number without seeing the confusion matrix?
- Which mistake would you rather a screening tool make: a false alarm, or a missed case? Why?
Manager feedback
From: Priya Shah
Solid first model. Notice that
fit()was one line — the discipline before and after it is where the actual engineering happens.Never report accuracy alone on an imbalanced problem. The confusion matrix is what a clinician would actually ask to see.
Tomorrow: why a model that looks perfect on training data can still fail in the real world.
— Priya
AQA Mathematics links
- Probability — a prediction as a probability, not a certainty
- Proportion — accuracy as a ratio of correct outcomes
Beyond A-Level
Look up precision and recall. They split accuracy into "of the cases we flagged, how many were real?" and "of the real cases, how many did we catch?" — the second question matters enormously in medical screening.
Module 4 — Teaching a Model to Generalise
Manager email
From: Priya Shah
Subject: Your model looks amazing on paper. I don't believe it yet.A junior analyst on another team trained a model that scored 99.8% accuracy on the data it was trained on — and then performed badly for the client in production.
Before we trust any model here, I want you to understand overfitting: when a model memorises its training data instead of learning a pattern that generalises.
Show me the difference between training accuracy and test accuracy as a model gets more complex — and tell me where you'd stop.
— Priya
Why this matters
A model that performs brilliantly on data it has already seen tells you almost nothing. The question that matters is: does it work on new data? Every ML engineer learns to distrust suspiciously perfect training results.
What you'll learn
- What overfitting is and why it happens
- Compare training accuracy and test accuracy across model complexity
- Use a decision tree's
max_depthas a simple "complexity dial" - Recognise the shape of an overfitting curve
Step 1 — Create the notebook
notebooks/module4_generalisation.ipynb
Section 1 — Load and split the data
Question
Do we have the same clean split as Module 3?
Code
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
import pandas as pd
data = load_breast_cancer()
features = pd.DataFrame(data.data, columns=data.feature_names)
label = pd.Series(data.target, name="diagnosis")
X_train, X_test, y_train, y_test = train_test_split(
features, label, test_size=0.2, random_state=42, stratify=label
)What the code does
Same split as Module 3, with the same random_state, so results are
comparable.
Section 2 — Train a decision tree
Question
What is a decision tree, and how does it predict?
Code
from sklearn.tree import DecisionTreeClassifier
tree = DecisionTreeClassifier(max_depth=2, random_state=42)
tree.fit(X_train, y_train)
tree.score(X_train, y_train), tree.score(X_test, y_test)What the code does
A decision tree predicts by asking a sequence of yes/no questions about
the features (e.g. "is worst radius above 16.8?"). max_depth limits how
many questions it is allowed to ask — a simple way to control complexity.
.score() returns accuracy directly. With a shallow tree, training and test
accuracy should be fairly close.
Section 3 — Increase complexity and compare
Question
What happens as we let the tree ask more questions?
Code
depths = range(1, 15)
train_scores = []
test_scores = []
for depth in depths:
model = DecisionTreeClassifier(max_depth=depth, random_state=42)
model.fit(X_train, y_train)
train_scores.append(model.score(X_train, y_train))
test_scores.append(model.score(X_test, y_test))
pd.DataFrame({
"max_depth": list(depths),
"train_accuracy": train_scores,
"test_accuracy": test_scores,
})What the code does
We loop over increasing tree depths, training a fresh model each time and
recording both accuracies. Watch what happens to train_accuracy as depth
increases — and whether test_accuracy keeps up.
Section 4 — Plot the overfitting curve
Question
Can we see the gap between training and test performance?
Code
import matplotlib.pyplot as plt
plt.figure(figsize=(8, 5))
plt.plot(depths, train_scores, marker="o", label="Training accuracy")
plt.plot(depths, test_scores, marker="o", label="Test accuracy")
plt.xlabel("Tree max_depth (complexity)")
plt.ylabel("Accuracy")
plt.title("Overfitting: training vs test accuracy")
plt.legend()
plt.savefig("../outputs/charts/module4_overfitting_curve.png", dpi=150)
plt.show()What the code does
As max_depth grows, training accuracy climbs toward 1.0 — the tree is
increasingly able to memorise its training examples. Test accuracy usually
rises for a while, then flattens or falls. The gap between the two lines
is overfitting, made visible.
Section 5 — Choose a sensible depth
Add a markdown cell answering:
- At roughly what
max_depthdoes test accuracy stop improving? - What happens to the gap between the two lines as depth keeps increasing past that point?
- If you had to ship one of these trees to a client, which
max_depthwould you choose, and why?
Reflection questions
- Did the "perfect" training accuracy at high depth feel impressive or suspicious?
- Would you have known to check this if Priya hadn't asked?
- Do you find this kind of scepticism satisfying, or frustrating?
Manager feedback
From: Priya Shah
This is the single most important lesson in your first month here. A model's job is to generalise, not memorise.
From now on, whenever someone shows you a suspiciously good result, ask: "Good on what data?" Test accuracy — never training accuracy — is what we report to clients.
— Priya
AQA Mathematics links
- Graphs — reading a trend and where it changes shape
- Sequences — accuracy as depth increases, one step at a time
Beyond A-Level
Look up cross-validation. Instead of one train/test split, it splits
the data several different ways and averages the result — a more reliable
way to pick max_depth than a single split like the one you used today.
Module 5 — Final Project
Manager email
From: Priya Shah
Subject: New client, same workflow — wine qualityA different client makes wine and wants to know whether basic chemical measurements can predict whether a bottle would be rated "good" by tasters.
Use the same workflow you've now practised twice: understand the data, split it fairly, train a simple classifier, and check it isn't overfitting.
Deliverables:
- Notebook with your full workflow
- One chart
- A 400-word note in
report/module5_wine_quality_note.md— Priya
Why this matters
Real ML engineering work is rarely a single novel technique — it is applying a trustworthy workflow to a new problem quickly and correctly. Today you do that without a section-by-section script.
Step 1 — Create the notebook
notebooks/module5_wine_quality_project.ipynb
The dataset
Use scikit-learn's built-in wine dataset:
from sklearn.datasets import load_wine
data = load_wine()This contains chemical measurements (alcohol, acidity, colour intensity and
more) from wine samples, each labelled with one of three cultivars. Read
data.DESCR first, exactly as you did in Module 2.
Your task
Work through the same steps as Modules 2–4, in your own structure:
- Understand the data — features, label meanings, class balance.
- Split fairly — training and test sets, stratified by label.
- Train a model — logistic regression or a decision tree; your choice.
- Check for overfitting — compare training and test accuracy; if using
a decision tree, try more than one
max_depth. - Evaluate honestly — accuracy plus a confusion matrix.
- Chart — one chart that would help Priya understand the result at a glance.
You are not given code for this one. Reuse and adapt what you wrote in Modules 2–4.
Write the research note
Create report/module5_wine_quality_note.md with this structure:
- Question — restate the client's question in one sentence.
- Method — model used, split strategy, how you checked for overfitting.
- Results — test accuracy, and one observation from the confusion matrix.
- Limitations — dataset size, whether three classes made this harder than the earlier two-class problem, anything else you'd want to know.
- Recommendation — should this client trust a model like this? One paragraph.
Reflection questions
- Did this feel like a job task or a school exercise?
- Which part would you want to do again — the data work, the modelling, or the writing?
- After five modules, do you want to learn more about this career?
Manager feedback
From: Priya Shah
If I received this note on my desk, I would read the limitations section first — that tells me whether I can trust the analyst.
You are not an ML engineer yet. But you now think in features, labels, generalisation and honest evaluation. That is the right direction.
Next, Machine Learning 102 goes further: you'll build and train an actual neural network — starting from a single artificial neuron, all the way up to a network trained on thousands of real images.
— Priya
AQA Mathematics links
- Statistics — comparing groups, describing distributions
- Probability — multi-class prediction as more than one possible answer
Beyond A-Level
Look up multi-class classification. Predicting one of three or more categories (rather than just two) is common in real ML work — image labelling, document categorisation, and more.
Module 6 — What You Have Learned
By the end of Machine Learning 101, you have learned to:
- research what ML engineers do and whether the work appeals to you;
- understand a dataset's features and label before touching a model;
- train a simple classifier and evaluate it honestly;
- recognise and diagnose overfitting;
- apply the full workflow to a new dataset and deliver a written recommendation.
If you enjoyed turning data into a working prediction, and being sceptical of your own results, machine learning may be worth exploring further.
Continue to Machine Learning 102 when you are ready to build and train your first neural network.