Supervised Learning Fundamentals
Supervised learning uses examples that include both the input and a target label. Labels record the available teaching signal; they can contain errors or reflect imperfect measurement. The model learns a mapping that can predict the target for new inputs.

Learning objectives
What you will be able to do
- Explain supervised learning fundamentals accurately in your own words.
- Recognise how the concept appears in real AI products and professional work.
- Identify an important limitation, risk or evaluation requirement.
- Apply the concept through a practical activity and knowledge check.
Core explanation
Build the right mental model
The two major supervised tasks are classification and regression. Classification predicts a category such as fraudulent/not fraudulent. Regression predicts a numeric value such as energy demand or delivery time.
Labels must be meaningful and consistently produced. If different experts apply different rules, the model receives contradictory teaching signals. Label quality is often more important than adding a more complex algorithm.
Performance must be judged with a metric that matches the consequence of error. In medical screening or intrusion detection, missing a true event may be more serious than raising an extra alert.
Define the target before collecting examples
In supervised learning, each training example pairs inputs with a target. For classification, the target is a category; for regression, it is a numeric quantity. A target definition should explain precisely what is being predicted, when the prediction is made and how the reference answer becomes known. “Predict problems” is too vague to label consistently.
Consider a fictional equipment-monitoring task. A classification target might be “a technician confirms a fault within the following seven days.” A regression target might be “hours until the next confirmed fault.” These are different prediction problems even if they use the same sensor inputs. The second also needs a plan for equipment that has no observed fault before the study ends.
Treat labels as measurements with limitations
A label is not automatically unquestionable truth. It may reflect a human assessment, a recorded event or an operational rule. Missing records, inconsistent definitions and delayed observations can produce misleading labels. Write a labelling guide, inspect disputed examples and distinguish “no event recorded” from “the event definitely did not occur.”
Only use information available at the prediction time. A repair invoice created after a fault might help predict the label in a historical spreadsheet, but it cannot help a system warn about that same fault in advance. Including it creates an unrealistically easy task. The intended timing must therefore guide both feature selection and evaluation.
Connect scores to decisions carefully
A binary classifier may produce a score that a threshold converts into a positive or negative prediction. Lowering a threshold often flags more cases, which can increase both detected positives and false alarms. A model score is not necessarily a calibrated probability; do not describe a score of 0.8 as an 80% personal certainty without checking its meaning.
A confusion matrix records four outcomes: true positives, false positives, false negatives and true negatives. Precision asks how many positive predictions were correct. Recall asks how many actual positive cases were detected. They answer different operational questions, so report them with the underlying counts rather than choosing whichever number sounds more impressive.
Label
The correct target supplied with a training example.
Classification
Prediction among discrete categories.
Regression
Prediction of a continuous numeric value.
Decision threshold
The score boundary used to convert a probability into an action.
Inspect a fictional fault-alert result
A held-out set contains 20 equipment cases: five confirmed faults and 15 cases without a confirmed fault. The model flags six cases, four of which are real faults. Therefore true positives = 4, false positives = 2, false negatives = 1 and true negatives = 13. Check that all four counts total 20.
Precision is 4 ÷ 6 ≈ 66.7%; recall is 4 ÷ 5 = 80%; accuracy is (4 + 13) ÷ 20 = 85%. An always-negative baseline would be correct on the 15 non-fault cases, giving 75% accuracy, while detecting none of the faults. That comparison shows why accuracy alone is incomplete.
The next decision is operational. Can technicians review six alerts? How costly is the missed fault? Are the cases representative of the equipment in use? These invented numbers are enough to practise the calculation but not enough to choose a deployment threshold or claim reliability.
Apply your learning
Practical activity
- In five minutes, define a fictional binary target and the time at which a prediction is needed.
- In five minutes, construct a 12-case result with three actual positives: two true positives, one false negative, two false positives and seven true negatives.
- In five minutes, calculate precision, recall and accuracy.
- In five minutes, explain the consequence of each error type and name one feature that would leak future information.
Compare with an explained example answer
There are four positive predictions, so precision = 2 ÷ 4 = 50%. Recall = 2 ÷ 3 ≈ 66.7%. Accuracy = (2 + 7) ÷ 12 = 75%. The counts sum to 12 and actual positives sum to three.
For a pre-fault alert, a later repair outcome is a leaking feature. A false positive uses review time; a false negative misses a fault. The relative cost depends on the equipment and response process, which the toy counts do not establish.
Write your answers in a learning journal. The value comes from connecting the concept to your own profession.
Knowledge check
Test your understanding
Q1What makes a task supervised?
Answer: Training includes target categories or values, rather than only unlabelled input examples.
Q2Can high accuracy hide poor fault detection?
Answer: Yes. If faults are rare, predicting no fault can be accurate overall while missing every fault.
Q3Why specify prediction time?
Answer: It determines which inputs are legitimately available and prevents later information from leaking into the prediction.
If you cannot explain the answer without reading it, revisit the core explanation and example before continuing.
Continue with authoritative sources
Important industry resources
These links lead to official organisations, industry laboratories or established open-source learning projects.