Docsity

Data Mining: Patterns, Prediction and Evaluation, Study Guides, Projects, Research of Data Mining

Toggle sidebar
bg1
Data Mining: Patterns, Prediction and Evaluation Page 1 of 3
Data Mining: Patterns, Prediction and Evaluation
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.
pf3

Partial preview of the text

Download Data Mining: Patterns, Prediction and Evaluation and more Study Guides, Projects, Research Data Mining in PDF only on Docsity!

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.

3. Unsupervised methods and association

Clustering groups objects by similarity. k-means minimises within-cluster variance, requires k and assumes roughly spherical clusters; hierarchical clustering produces a dendrogram and needs a linkage choice; DBSCAN finds arbitrary shapes and labels noise but is sensitive to its parameters. Cluster validity is genuinely difficult: silhouette, Davies-Bouldin and gap statistics disagree, and a cluster solution is a hypothesis, not a fact.

Dimensionality reduction - PCA, t-SNE, UMAP - serves visualisation and preprocessing, but t-SNE and UMAP distort global distances, so distances between clusters should not be interpreted. Association rules use support, confidence and lift; lift is the one that says whether a rule is interesting, because a high-confidence rule for a common item is trivial. Anomaly detection is unsupervised by nature and evaluated mostly by inspection, which makes precision at a fixed alert budget the practical metric.

  • k-means assumptions - k given, spherical, variance-based.
  • Validity - several indices, and a human judgement.
  • t-SNE/UMAP - visualisation only; do not read global distances.
  • Lift - the association measure that survives base rates. 4. Evaluation and deployment

Accuracy is misleading under class imbalance : a 99 per cent negative class gives 99 per cent accuracy to a model that predicts nothing. Use the confusion matrix , precision , recall , F1 and the ROC or precision-recall curve; for ranking and probability, use AUC and log loss or Brier score. The metric must be chosen from the cost of each error type, not from habit.

Cross-validation estimates generalisation, with stratified folds for imbalance and nested folds when hyperparameters are tuned, otherwise the tuning leaks into the estimate. Feature selection must also sit inside the cross-validation loop. After deployment, drift in the input distribution or in the relationship to the outcome degrades performance silently, so monitoring, retraining policy and a fallback are part of the model, not of the operations team's goodwill. Fairness audits belong here too: a model can be accurate and discriminatory at once.

  • Imbalance - never report accuracy alone.
  • Cost-based metric - choose from the error costs.
  • Nested CV - tuning inside the loop or the estimate is optimistic.
  • Drift - monitor inputs, outputs and outcomes after launch. Task Method Strength Watch out for Classification Random forest, boosting, logistic regression

Strong tabular accuracy Leakage and imbalance

Regression Linear, regularised, tree ensembles

Interpretable baselines Non-linearity and outliers

Clustering k-means, hierarchical, DBSCAN

Exploratory structure k choice and validity

Association Apriori, FP-growth Readable rules Trivial rules without lift Anomaly detection Isolation forest, density methods

Finds the unusual Alert budget and precision

For each method, know the assumption it makes and the diagnostic that reveals a violation. Data mining exams reward the assumption, not the algorithm name.