Data Mining: CRISP-DM, Task Families and Evaluation Metrics
Data Mining
This domain tests the process (CRISP-DM), the task families, and the metrics used to judge models: support, confidence, lift, precision, recall and accuracy. Expect one metric computation and one which-technique-fits question.
Core concepts
- CRISP-DM. Business understanding, data understanding, data preparation, modelling, evaluation, deployment. Preparation consumes the largest share of effort, commonly cited at 70-80%.
- Task families. Supervised methods use labelled data: classification predicts a class, regression predicts a number. Unsupervised methods work without labels: clustering segments records, association rules find co-occurrence.
- Algorithms. Decision trees are interpretable but overfit without pruning; k-NN is instance-based and needs feature scaling; naive Bayes is probabilistic and assumes conditional independence; neural networks are powerful but opaque; k-means requires choosing k and is sensitive to initial seeds.
- Association metrics. Support = share of transactions containing the itemset. Confidence = P(consequent | antecedent). Lift = confidence divided by the baseline support of the consequent; lift above 1 indicates positive association.
- Evaluation. Split into train, validation and test sets; use k-fold cross-validation. From the confusion matrix: accuracy, precision = TP/(TP+FP), recall = TP/(TP+FN), F1 is their harmonic mean. ROC/AUC measures ranking quality.
- Overfitting. Strong on training data, weak on new data; remedy with more data, simpler models, pruning or regularisation.
Worked example
From 1,000 baskets, bread appears 100 times, butter 200 times, and both 40 times. Evaluate bread to butter.
Support = 40/1,000 = 4%. Confidence = 40/100 = 40%. Baseline for butter = 200/1,000 = 20%. Lift = 0.40/0.20 = 2.0. Interpretation: 4% of baskets contain both items; 40% of bread buyers also buy butter, double the 20% rate expected by chance. The rule is useful for cross-merchandising, although its low support means it touches only a small share of transactions.
Traps
- Swapping support and confidence in the formulas.
- Celebrating 99% accuracy on a dataset with 1% positives - the accuracy paradox.
- Tuning on the test set, which inflates reported performance.
- Assuming lift above 1 proves causation rather than co-occurrence.