Supervised Learning Essentials

A practical tour of regression, classification, and the evaluation metrics — accuracy, precision, recall, and overfitting checks — that reveal whether a model truly works.

Accuracy, precision, and recall

Why accuracy alone can fool you Once a model makes predictions, you need to know whether it is any good. The obvious metric is accuracy: the share of predictions it got right. It is useful — but on the wrong data it hides disaster. The 99% trap Suppose one transaction in a hundred is fraudulent. […]

Choosing the threshold is a business decision

Most classifiers do not output a class. They output a probability A fraud model does not say “fraud”. It says 0.73. Something then has to decide that 0.73 counts as fraud — and that something is a threshold you choose, not a fact the model discovered. Almost everyone leaves it at 0.5 because that is […]

Cross-validation and the split you got wrong

One split can be lucky. Several cannot all be Hold out 20% of the data, score on it, and you get a number. Do it again with a different 20% and you get a different number — sometimes markedly different, especially on smaller datasets. Neither is wrong; both are one sample of the model’s behaviour. […]

A model card for the model you built

The document that makes a model safe to hand over A trained model on its own is an artefact nobody else can judge. A model card is the short, honest document that travels with it — what it does, on whom, how well, and where it should not be used. The practice comes out of […]