Module 4 — Prediction: learning patterns from the past
Lesson 4 of 16
Classification
Regression predicts a number.
Classification predicts a category.
The core question is:
Given some inputs, which class does this observation belong to?
Examples include:
- spam or not spam,
- fraud or legitimate,
- cat or dog,
- healthy or faulty,
- pedestrian or no pedestrian,
- customer likely to churn or not.
At its simplest:
INPUTS → MODEL → CLASS
For example:
email text
↓
classification model
↓
spam
Binary classification
The simplest classification problem has two possible classes.
For example:
YES / NO
FRAUD / NOT FRAUD
DISEASE / NO DISEASE
FAILURE / NO FAILURE
This is called binary classification.
We can represent the target as:
Y ∈ {0, 1}
where, for example:
1 = fraud
0 = legitimate
Multiclass classification
Some problems have more than two possible classes.
For example:
cat
dog
fox
or:
red
amber
green
This is multiclass classification.
The model must decide which class is most plausible.
Classification often begins with probabilities
A classifier does not necessarily jump directly from input to one class.
It may first estimate a probability distribution.
For example:
Cat: 0.80
Dog: 0.15
Fox: 0.05
The final predicted class is:
Cat
because it has the highest probability.
So the richer structure is:
INPUT
↓
MODEL
↓
CLASS PROBABILITIES
↓
CLASS DECISION
Probability and classification
Suppose a medical classifier predicts:
P(Disease) = 0.82
The system might then label:
Disease
if the decision threshold is:
0.50.
But the probability and the class label are different things.
The probability describes belief.
The label is a decision produced from that belief.
Thresholds turn probabilities into classes
Suppose:
P(Fraud) = 0.43.
If the classification threshold is:
0.50,
the prediction becomes:
Not fraud.
If the threshold is:
0.30,
the prediction becomes:
Fraud.
The model output did not change.
The decision rule changed.
Classification depends not only on the model, but also on the threshold used to convert probability into action.
There is no universal correct threshold
A threshold of:
0.50
may seem natural.
But it is not automatically optimal.
Suppose missing fraud is extremely costly.
The service may use a lower threshold:
0.20.
Suppose falsely accusing someone of fraud is extremely costly.
The threshold may be much higher.
Threshold selection depends on:
- false-positive cost,
- false-negative cost,
- available review capacity,
- service objectives.
Prediction and decision remain separate
Consider:
P(Disease) = 0.35.
Should treatment be given?
That depends on:
- treatment risk,
- disease severity,
- availability of further tests,
- cost,
- patient preference.
The classifier provides information.
It does not determine the decision.
Classification uses inputs
Suppose we want to classify whether a transaction is fraudulent.
Inputs might include:
- transaction value,
- time,
- location,
- device,
- historical account behaviour.
Conceptually:
TRANSACTION FEATURES
↓
CLASSIFIER
↓
P(Fraud)
↓
Fraud / Not fraud
The target label must be defined
Suppose we train a model to predict:
Fraud.
What does fraud mean in the dataset?
Perhaps:
- confirmed by investigation,
- reported by customer,
- reversed by bank,
- convicted in court.
These are different definitions.
The model learns the label we give it.
So:
Before building the classifier, define the class.
Labels are representations
Recall from Module 2:
data is created through systems of measurement.
Labels are no different.
A label such as:
toxic comment
may depend on:
- human judgement,
- policy,
- cultural context.
A label such as:
high-performing employee
may depend on:
- manager ratings,
- promotion history.
Classification learns the representation encoded in the training labels.
Labels can be wrong
Suppose a dataset contains:
1 million emails.
Humans label them:
spam
or:
not spam.
Some labels will inevitably be wrong.
The model is therefore learning from imperfect supervision.
This is called label noise.
Ambiguous classes
Some observations genuinely sit near boundaries.
Suppose an image is:
- blurry,
- partially obscured.
Is it a:
dog
or:
wolf?
Humans may disagree.
The problem may contain real ambiguity.
A good model should ideally reflect that uncertainty rather than pretending every example belongs to an obvious class.
Classification boundaries
Imagine two inputs:
x₁
and:
x₂.
Some observations belong to:
Class A.
Others belong to:
Class B.
A classifier learns a decision boundary separating regions of the input space.
Conceptually:
REGION A → Class A
REGION B → Class B
The boundary determines where predictions change.
A simple threshold classifier
Suppose:
x = temperature
and we classify:
Cold
or:
Warm.
A simple rule might be:
if x < 15°C → Cold
otherwise → Warm
The decision boundary is:
15°C.
This is a very simple classifier.
Real classification boundaries can be complex
Suppose fraud depends on:
- transaction value,
- location,
- time,
- user history.
There may be no simple single threshold.
The model may learn a complicated decision boundary across many dimensions.
This is one reason modern machine-learning classifiers can be powerful.
Logistic regression
Despite its name, logistic regression is often used for classification.
Instead of predicting an unrestricted numerical value, it predicts something interpretable as:
probability between 0 and 1.
For example:
P(Default) = 0.72.
A threshold then converts the probability into a class.
Why not ordinary linear regression?
Suppose we encode:
Fraud = 1
Not fraud = 0.
A linear regression model might predict:
1.4
or:
-0.3.
Those values do not make sense as probabilities.
Logistic regression constrains the output into:
0 to 1.
Classification can use simple models
Not every classifier needs to be a neural network.
Common approaches include:
- logistic regression,
- decision trees,
- nearest neighbours,
- support-vector machines.
Different models learn different kinds of decision boundaries.
Decision trees
A decision tree classifies observations through a sequence of questions.
For example:
Transaction > €1,000?
↓
Yes
New device?
↓
Yes
Unusual location?
↓
Yes
↓
High fraud risk
The tree divides the input space into regions.
Nearest neighbours
Another simple classifier is k-nearest neighbours.
Suppose a new observation appears.
We find nearby examples in the training dataset.
If most neighbours belong to:
Class A,
we predict:
Class A.
The idea is:
Similar observations may have similar labels.
Support-vector machines
A support-vector machine, or SVM, attempts to find a boundary separating classes.
In a simple two-dimensional problem, imagine:
Class A points
on one side
and:
Class B points
on the other.
An SVM seeks a separating boundary with a large margin between the classes.
The examples closest to the boundary are particularly important.
These are the support vectors.
Why the margin matters
Suppose many possible lines separate two classes.
One line passes extremely close to several observations.
Another leaves a wider gap.
The wider-margin boundary may be more robust to:
- noise,
- small changes in inputs.
The SVM formalises this idea.
Support-vector machines can use kernels
Sometimes the classes cannot be separated by a straight line in the original input space.
A kernel allows an SVM to represent more complex boundaries.
Conceptually:
original inputs
↓
transform into richer representation
↓
find separating boundary there
This was an important idea in machine learning before deep neural networks became dominant.
Classification can be linear or nonlinear
Suppose two classes are separated cleanly by:
x₁ + x₂ > threshold.
A linear classifier may work well.
But if the classes form:
- circles,
- clusters,
- complicated shapes,
a nonlinear model may be needed.
Model complexity should match the structure of the problem.
Classification can overfit
Suppose we have a small dataset.
A highly flexible classifier creates a complicated boundary that perfectly surrounds every training point.
Training accuracy becomes:
100%.
But the boundary may be capturing:
- noise,
- accidental patterns.
New observations may be classified poorly.
This is overfitting.
Classification can underfit
Now suppose the real decision boundary is complex.
We insist on using one straight line.
The classifier may systematically misclassify large regions.
This is underfitting.
Again we face the balance:
too simple → underfit
too complex → overfit
Accuracy
One simple classification metric is:
accuracy.
Conceptually:
Accuracy = correct predictions / total predictions
Suppose:
90 out of 100
predictions are correct.
Accuracy is:
90%.
This sounds simple.
But accuracy can be dangerously misleading.
Class imbalance
Suppose fraud occurs in:
1% of transactions.
Imagine a classifier that always predicts:
Not fraud.
It will be correct:
99% of the time.
Accuracy:
99%.
Fraud detection:
0%.
So high accuracy does not necessarily mean a useful classifier.
The confusion matrix
For binary classification, predictions fall into four categories.
True positive
Model predicts positive.
Reality is positive.
False positive
Model predicts positive.
Reality is negative.
True negative
Model predicts negative.
Reality is negative.
False negative
Model predicts negative.
Reality is positive.
These form the confusion matrix.
False positives
Suppose a fraud system predicts:
Fraud
but the transaction was legitimate.
That is a:
false positive.
Possible consequences include:
- payment blocked,
- customer inconvenience,
- human review.
False positives have a cost.
False negatives
Suppose the system predicts:
Not fraud
but the transaction was fraudulent.
That is a:
false negative.
Possible consequence:
- financial loss.
False negatives also have a cost.
The important question is:
Which mistake matters more?
Different applications have different error costs
Consider:
Spam filter
False positive:
important email goes to spam.
False negative:
spam reaches inbox.
Now consider:
Cancer screening
False positive:
additional testing and anxiety.
False negative:
disease missed.
The same statistical error categories have very different real consequences.
Precision
Precision asks:
Among the cases predicted positive, how many really were positive?
Conceptually:
PRECISION = TRUE POSITIVES / ALL PREDICTED POSITIVES
For fraud detection:
Of all transactions we flagged as fraud, how many actually were fraud?
High precision means:
few false alarms.
Recall
Recall asks:
Among the real positive cases, how many did we find?
Conceptually:
RECALL = TRUE POSITIVES / ALL ACTUAL POSITIVES
For disease screening:
Of all people who actually had the disease, how many did we detect?
High recall means:
few missed positives.
Precision and recall trade off
Suppose a fraud system uses a very high threshold.
It flags only extremely suspicious transactions.
Likely:
high precision
but:
lower recall.
Now lower the threshold.
The system catches more fraud.
Recall increases.
But more legitimate transactions are flagged.
Precision may fall.
The threshold changes the trade-off.
There is no universally best trade-off
Suppose:
missing fraud costs €10
while:
blocking a legitimate transaction costs €1,000.
We may prefer high precision.
Now reverse the costs.
We may prefer high recall.
The appropriate classifier depends on the service objective.
Classification is therefore partly policy
The model may produce:
P(event).
But someone decides:
- threshold,
- review rule,
- action.
These choices determine:
- false positives,
- false negatives.
Classification systems therefore contain governance decisions even when the predictive model itself is unchanged.
One model, many operating points
Suppose the model ranks observations from:
least suspicious
to:
most suspicious.
We can choose different thresholds.
Each threshold creates a different:
- true-positive rate,
- false-positive rate.
So a classifier is not necessarily one fixed decision.
It may provide a family of possible operating points.
ROC curves
A receiver operating characteristic, or ROC curve, shows how:
true-positive rate
and:
false-positive rate
change as the classification threshold changes.
It helps visualise the trade-off across all possible thresholds.
This allows us to compare classifiers before choosing a specific operating rule.
Probability calibration matters
Suppose a model says:
P(Fraud) = 0.8.
If the classifier is calibrated, transactions receiving predictions around 0.8 should actually be fraudulent roughly:
80% of the time.
If only:
30%
are fraud, the model is overconfident.
Classification needs both:
- discrimination,
- calibration.
Ranking versus probability
A classifier can rank cases correctly while producing poor probability estimates.
For example:
Case A riskier than Case B
may be correct.
But predicted probabilities:
90% and 80%
might correspond to true risks:
9% and 8%.
The ranking works.
The calibration does not.
Different applications care about different properties.
Hard classification loses information
Suppose:
Case A
P(Disease) = 51%
Case B
P(Disease) = 99.9%
With a 50% threshold, both become:
Disease.
The class label hides a large difference in confidence.
This is why probabilistic outputs are often preferable.
The class boundary can be arbitrary
Suppose risk is continuous.
We classify:
low risk
or:
high risk
at:
20%.
A person with:
19.9%
becomes low risk.
A person with:
20.1%
becomes high risk.
Their underlying probabilities are almost identical.
The categorical decision creates a sharp boundary that reality may not contain.
Categories are representations
This connects directly to Module 2.
Suppose disease severity actually varies continuously.
We categorise patients as:
- mild,
- moderate,
- severe.
The categories are useful.
But they simplify reality.
Classification always relies on some definition of class boundaries.
Multiclass classification
Suppose an image can contain:
- cat,
- dog,
- fox.
The model may output:
P(Cat) = 0.6
P(Dog) = 0.3
P(Fox) = 0.1.
The probabilities sum to:
1.
The model selects:
Cat.
This is multiclass classification.
Multi-label classification
Sometimes more than one label can be true at once.
Suppose an image contains:
- person,
- bicycle,
- traffic light.
The output is not one class.
It is a set of labels.
This is multi-label classification.
Hierarchical classification
Classes can also have structure.
For example:
Animal
↓
Mammal
↓
Dog
↓
Labrador
A model might predict at several levels.
This is hierarchical classification.
It can preserve more structure than treating every label as unrelated.
Classification from images
Computer vision provides classic classification problems.
Input:
pixels
Output:
object class.
For example:
image
↓
neural network
↓
Cat: 97%
Modern vision models learn internal representations that help distinguish objects.
Classification from sound
Suppose the input is an audio recording.
Possible outputs:
- speech,
- music,
- alarm,
- engine noise.
Or:
spoken word = "hello".
Audio classification transforms time-varying signals into categories.
Classification from text
Suppose the input is a customer message.
The output might be:
- complaint,
- billing query,
- technical support.
This allows a service to route requests automatically.
Again:
TEXT
↓
CLASSIFIER
↓
CATEGORY.
Classification can create allocation decisions
Suppose customer requests are classified as:
- urgent,
- non-urgent.
The urgent class receives faster service.
Now classification affects:
who receives scarce resources first.
The prediction is becoming part of service design.
Misclassification now has distributional consequences
Suppose one group is more often incorrectly classified as:
non-urgent.
Even if overall accuracy is high, that group receives worse service.
This is where classification connects to fairness.
Group performance matters
Suppose:
overall accuracy = 95%.
But:
Group A = 98%
Group B = 75%.
The global metric hides unequal performance.
We need to examine classification errors across relevant populations.
Base rates can differ between groups
This makes fairness complicated.
Suppose the true prevalence of an outcome differs between groups.
It may be mathematically impossible to satisfy every fairness criterion simultaneously.
Later we will explore:
- demographic parity,
- equalised odds,
- calibration.
There is no single universal definition of algorithmic fairness.
Sensitive features and proxies
Suppose a classifier does not receive:
protected characteristic.
But it receives:
- postcode,
- language,
- school,
- income.
These variables may proxy the excluded information.
So:
Removing a column does not necessarily remove the underlying information.
This will become important in Module 11.
Classification can reproduce history
Suppose historical hiring decisions become labels:
successful candidate
and:
unsuccessful candidate.
A classifier learns from that history.
If previous decisions were biased, the model can reproduce the pattern.
It may be highly accurate relative to historical labels.
That does not mean the service is fair.
Classification can change the future dataset
Suppose a loan classifier rejects an applicant.
We never observe:
whether they would have repaid.
So future training data contains outcomes mainly for:
approved applicants.
The classifier shapes its own future evidence.
This is a selection feedback loop.
The prediction affects what becomes observable
Conceptually:
APPLICANT
↓
CLASSIFIER
↓
APPROVE / REJECT
↓
If approved:
repayment outcome observed
If rejected:
counterfactual outcome unobserved
The training dataset is created partly by previous decisions.
This complicates learning.
Classification can be reflexive
Suppose a model labels someone:
high risk.
The service imposes:
- higher prices,
- fewer opportunities.
Those conditions may themselves make poor outcomes more likely.
The prediction can contribute to the future it predicts.
This is another reason causal reasoning matters.
A classification label is not a person
Suppose a model outputs:
High risk.
That describes:
a model prediction about a defined outcome under particular data and assumptions.
It does not describe someone's:
- character,
- worth,
- identity.
Numerical classifications can easily acquire meanings beyond what the model actually predicts.
This should be resisted.
Classification confidence should affect action
Suppose an image classifier predicts:
pedestrian: 99.9%.
The system acts accordingly.
Now:
pedestrian: 51%.
The correct response may not be:
Treat it exactly the same.
Perhaps the system should:
- slow,
- gather more information.
Uncertainty matters.
Abstention
A classifier does not have to answer every case.
It can have an additional response:
I don't know.
For example:
high confidence → automated decision
low confidence → human review.
This is called abstention or selective classification.
Abstention can improve reliability
Suppose the classifier is:
99% accurate on 80% of cases where it is confident.
It may be much less accurate on the remaining 20%.
The system can automate the easy cases and escalate the difficult ones.
This can improve service quality.
But human review is scarce
Suppose:
10 million cases
arrive each day.
If:
20%
require human review:
2 million reviews are needed.
That may be impossible.
The classification threshold therefore interacts with:
human capacity.
This turns classification into a resource-allocation problem.
Thresholds can be chosen based on capacity
Suppose a fraud team can investigate:
1,000 transactions per day.
The model ranks all transactions by risk.
The service may choose the threshold that produces approximately:
1,000 alerts.
Now the threshold is determined partly by:
available investigative resources.
This is different from saying:
Anything above 50% is fraud.
Prediction ranking can support queues
Classification scores can be used to prioritise a queue.
For example:
highest risk first.
This may be useful.
But it raises questions:
- Is the score calibrated?
- Does priority reflect consequence?
- Are some users systematically pushed down the queue?
Again, prediction becomes allocation.
Classification and rare events
Many important classification tasks involve rare positives.
Examples include:
- fraud,
- serious disease,
- catastrophic failure.
In these cases:
accuracy is especially misleading.
We need to focus on:
- precision,
- recall,
- base rates,
- tail performance.
Rare positive classes need enough examples
Suppose only:
10 failures
exist in a dataset of:
1 million observations.
The model has very little evidence about the positive class.
It may struggle to learn what failure looks like.
Rare-event classification is difficult because the cases we care about most may be the least represented.
Oversampling
One approach is to show the model positive examples more frequently during training.
This can help learning.
But then the training class balance differs from real-world prevalence.
Probability outputs may need recalibration.
Sampling choices affect classification.
Synthetic examples
We can also create synthetic examples of rare classes.
For example:
- simulated faults,
- generated attacks.
This can increase coverage.
But synthetic data reflects assumptions.
The model may still fail on rare real-world cases not represented by the simulation.
Classification and feature importance
Suppose a loan classifier outputs:
P(Default) = 0.72.
We may ask:
Why?
Perhaps:
baseline risk = 0.20
Then features such as:
- debt level,
- repayment history,
- income
shift the prediction.
Understanding those contributions helps explain the model.
Shapley values can explain classification too
Shapley-based methods can allocate predictive contribution among features.
For example:
baseline model score
plus:
feature contributions
leads to:
final prediction.
This is not limited to regression.
The same idea can help explain classification models.
Feature attribution does not prove causation
Suppose:
postcode
strongly increases predicted default risk.
A Shapley explanation may correctly say:
Postcode contributed substantially to the model's prediction.
That does not establish:
Living in that postcode causally increases default risk by that amount.
It explains the classifier.
Not necessarily the world.
Classification can use many models
The same classification problem can be solved using:
- logistic regression,
- decision tree,
- SVM,
- neural network.
Different models may have similar accuracy but:
- different boundaries,
- different probabilities,
- different robustness.
Model choice matters.
Ensembles
We can combine multiple classifiers.
For example:
Model A says Fraud
Model B says Fraud
Model C says Not fraud.
An ensemble can combine their predictions.
This may improve:
- accuracy,
- robustness,
- uncertainty estimation.
Classification and uncertainty
Suppose several models strongly disagree.
That disagreement may indicate:
epistemic uncertainty.
The system has insufficient evidence or the case lies near the boundary.
This may justify:
- additional information,
- human review.
Classification boundaries can move
Suppose user behaviour changes.
The historical boundary separating:
fraud
from:
legitimate
may no longer work.
Fraudsters adapt.
The classification problem itself is dynamic.
Adversarial systems
In fraud and cybersecurity, participants may deliberately change behaviour to evade detection.
Once a classifier becomes known, attackers adapt.
So:
MODEL
↓
ATTACKERS RESPOND
↓
DATA DISTRIBUTION CHANGES
↓
MODEL PERFORMANCE FALLS
Classification becomes part of a strategic game.
Adversarial examples
Machine-learning models can sometimes be fooled by small, carefully designed input changes.
An image may look almost unchanged to a human but produce a different classification.
These are adversarial examples.
They reveal that a model's decision boundary may differ from human perception.
Classification is not necessarily understanding
Suppose a neural network correctly classifies:
wolf.
Did it understand:
what a wolf is?
Perhaps it relied on:
- snow,
- background,
- camera artefacts.
High classification accuracy does not automatically reveal the internal representation.
This is why generalisation testing matters.
Shortcut learning
A classifier may learn an easy predictive feature rather than the concept we intended.
For example:
hospital identifier → disease label
because different hospitals serve different populations.
The relationship may work historically.
Deploy the model in a new hospital and performance collapses.
This is shortcut learning.
Train and test environments matter
Suppose images in training come from:
Camera A.
All positive cases happened to use:
Camera B.
A classifier may learn:
camera type
rather than:
disease.
Randomly splitting the same dataset into training and test sets may fail to reveal the problem.
External testing may be needed.
Classification should be evaluated where it will be used
A classifier intended for:
- Irish hospitals,
- rural roads,
- multilingual users
should be tested in those contexts.
A high benchmark score elsewhere does not guarantee deployment performance.
Decision boundaries are contextual
Suppose a medical system is deployed in:
screening.
We may prefer:
high recall.
Now deploy the same model for:
confirming diagnosis before risky surgery.
We may require much higher precision.
Same classifier.
Different operational objective.
Classification quality is multidimensional
A useful classifier may need:
- discrimination,
- calibration,
- robustness,
- fairness,
- low latency,
- explainability.
A model that maximises one metric may perform poorly on another.
There is no universal "best classifier".
Classification latency can matter
Suppose a pedestrian classifier is:
99.99% accurate
but takes:
20 seconds per image.
For autonomous driving, it is useless.
A slightly less accurate model responding in:
20 milliseconds
may be much more valuable.
Prediction quality includes timeliness.
Classification has a computational cost
Large models may require:
- more memory,
- more energy,
- more expensive hardware.
The additional predictive improvement may or may not justify the resource cost.
Later we will connect AI performance to:
- compute,
- data centres,
- physical infrastructure.
One classification at scale becomes a system problem
Suppose one classification costs almost nothing.
Now perform:
10 billion classifications per day.
Suddenly:
- compute,
- energy,
- latency
matter enormously.
Scale turns model design into infrastructure design.
Classification and feedback
A deployed classifier sits inside a loop:
INPUT
↓
CLASS PREDICTION
↓
DECISION
↓
ACTION
↓
WORLD CHANGES
↓
NEW DATA
The future training data depends partly on the model's previous predictions.
This means classification cannot always be understood as a static mapping.
Classification can become control
Suppose an autonomous vehicle repeatedly classifies:
road clear / road blocked.
The classification affects:
steering and braking.
New sensor observations arrive milliseconds later.
The system repeats.
Now classification is embedded inside a feedback control loop.
Perception in robotics is often classification
A robot may classify:
- pedestrian,
- vehicle,
- wall,
- doorway.
But classification is only one stage.
It then needs to determine:
- where the object is,
- how it is moving,
- what action to take.
So robotics combines:
classification
with:
regression
state estimation
planning
control.
Modern AI often combines regression and classification
Suppose an autonomous vehicle sees a pedestrian.
It might output:
Class: pedestrian
and:
Position: x, y
and:
Velocity: v
Classification answers:
What is it?
Regression answers:
Where is it and how is it moving?
Real systems often require both.
Language models blur traditional categories
A large language model does not simply classify text into one category.
At each step it performs something closer to multiclass classification over:
a vocabulary of possible next tokens.
For example:
token A: 0.40
token B: 0.30
token C: 0.10
and so on.
One token is selected.
Then the process repeats.
Next-token prediction is enormous multiclass classification
If the vocabulary contains:
100,000 possible tokens,
each prediction effectively distributes probability across:
100,000 classes.
Then:
one token
is chosen.
Repeated thousands of times, this produces language.
This helps connect basic classification theory to modern LLMs.
Classification teaches a broader lesson
A model takes:
continuous messy reality
and maps it into:
defined categories.
That is useful.
But we should always ask:
Who defined those categories?
Are the boundaries meaningful?
What information is lost?
What happens near the boundary?
This is as much a data-design question as a machine-learning question.
A useful classification checklist
Whenever someone presents a classification system, ask:
- What are the classes?
- Who defined them?
- Are labels reliable?
- How common is each class?
- What inputs are used?
- What probability does the model output?
- Is that probability calibrated?
- What threshold is used?
- Who chose the threshold?
- What are the false-positive consequences?
- What are the false-negative consequences?
- Is accuracy hiding class imbalance?
- How do precision and recall behave?
- Does performance differ across groups?
- Can the system abstain?
- What happens when confidence is low?
- Does deployment change future data?
These questions reveal the full classification system rather than only its headline accuracy.
The central idea
Classification predicts:
which category an observation belongs to.
At its simplest:
INPUTS
↓
CLASSIFICATION MODEL
↓
CLASS
But the more complete structure is:
INPUTS
↓
MODEL
↓
PROBABILITY DISTRIBUTION OVER CLASSES
↓
THRESHOLD / DECISION RULE
↓
CLASSIFICATION
↓
ACTION
This distinction matters.
The model provides evidence.
The service decides what to do with it.
Classification therefore introduces several important ideas:
- probabilities,
- thresholds,
- false positives,
- false negatives,
- class imbalance,
- decision boundaries,
- fairness.
And it reinforces a central theme of the course:
A prediction is not a decision.
In the next lesson, we will look at how models learn these predictive relationships without fooling themselves.
That begins with one of the most important practical ideas in machine learning:
training data and test data — why the examples used to teach a model must be separated from the examples used to judge whether it has actually learned to generalise.