Finding structure in data without fooling yourself
Computer Science | Undergraduate (Level 6) | December 2026
WHAT IS INSIDE
1. The data mining process
2. Supervised methods
3. Unsupervised methods and association
4. Evaluation and deployment
Exam question patterns
Glossary of exam-ready definitions
1. The data mining process
Data mining is the application of statistical and algorithmic methods to large data sets to find patterns
that are valid, novel and useful. The CRISP-DM cycle - business understanding, data understanding,
preparation, modelling, evaluation, deployment - is worth naming because most failures happen before
modelling: undefined questions, leakage, and data that does not measure what it claims.
Data preparation dominates effort: cleaning, missing-value handling, encoding, scaling and feature
construction. Leakage is the classic error - including a variable that is only available after the outcome,
or scaling before splitting - and it produces excellent validation scores that collapse in production. Every
preprocessing step must be fitted on training data only.
• Question first - a pattern without a decision attached is a curiosity.
• Leakage - any post-outcome information in the features.
• Fit on train only - scaling, imputation and selection included.
• Documentation - record the data version and every transformation.
2. Supervised methods
Classification predicts a label; regression predicts a value. Decision trees split on impurity reduction
and are interpretable but unstable; random forests and gradient boosting average many trees and
dominate tabular prediction, at the cost of interpretability that must then be recovered with importance
measures or SHAP values. k-nearest neighbours is simple and sensitive to scaling; naive Bayes is fast
and makes a strong independence assumption; support vector machines find maximum-margin
boundaries and need kernel choice.
Model choice is a bias-variance decision. A model too simple underfits; too flexible and it overfits the
training sample. Regularisation, pruning, early stopping and ensembling control the variance. The
reported performance must come from data the model has not seen, and the split must respect the data's
structure - by time for temporal data, by group for repeated measures - or the estimate is optimistic.
• Bias-variance - the trade-off every tuning decision moves.
• Trees vs ensembles - interpretability against accuracy.
• Scaling - required for distance and margin methods, not for trees.
• Split by structure - time and group splits, not random, where relevant.
Data Mining: Patterns, Prediction and Evaluation Page 1 of 3