Pattern Evaluation Methods in Data Mining

JA JASWANT Updated 25 Oct 2026
5 min read ·Lesson 56 of 87
In this post

Accuracy, precision, recall, and the confusion matrix are covered with a full worked example in the lesson on data mining operators; information gain is covered with a full worked calculation in the l

Accuracy, precision, recall, and the confusion matrix are covered with a full worked example in the lesson on data mining operators; information gain is covered with a full worked calculation in the lesson on attribute selection measures; and the objective/subjective interestingness measures used to evaluate discovered patterns specifically (rather than trained classifiers) are covered in the lesson on interestingness of patterns in data mining. This lesson covers two evaluation tools that haven't been covered yet and that solve a real gap the metrics above leave open: ROC/AUC, which evaluates a classifier across every possible decision threshold at once rather than just one, and cost-sensitive evaluation, which accounts for the fact that not all mistakes cost the same.

ROC and AUC: Evaluating Every Threshold at Once

A classifier that outputs a score rather than a hard yes/no decision (most do, internally) only becomes a classification once you pick a threshold above which a record counts as "positive." Precision and recall, as computed in the lesson on data mining operators, describe performance at exactly one threshold — AUC (Area Under the ROC Curve) instead measures how well the classifier ranks positives above negatives, regardless of what threshold you'd eventually pick. The most transparent way to compute it directly: take the probability that a randomly chosen positive example scores higher than a randomly chosen negative example. Suppose a classifier scores 3 positive examples (P1, P2, P3) and 3 negative examples (N1, N2, N3), and ranking every one of the 6 examples from lowest score to highest produces this order:

Lowest score                                          Highest score
N3  ->  N2  ->  P3  ->  N1  ->  P2  ->  P1

For every possible (positive, negative) pair — there are 3 x 3 = 9 such pairs — check whether the positive scored higher:

P3 vs N3: P3 scores higher -> counts
P3 vs N2: P3 scores higher -> counts
P3 vs N1: N1 scores higher -> does NOT count
P2 vs N3: P2 scores higher -> counts
P2 vs N2: P2 scores higher -> counts
P2 vs N1: P2 scores higher -> counts
P1 vs N3: P1 scores higher -> counts
P1 vs N2: P1 scores higher -> counts
P1 vs N1: P1 scores higher -> counts
Pairs where the positive outranks the negative = 8 out of 9
AUC = 8 / 9 ≈ 0.889

An AUC of 0.889 means an example drawn at random from the positive class outscores a randomly drawn negative about 89% of the time — well above the 0.5 an AUC would show for a classifier no better than random guessing, but not the 1.0 of a perfect ranking, since N1 outranked P3 here. This single number summarizes the classifier's discriminative ability across every threshold simultaneously, which is exactly why it's used to compare two classifiers before either one has actually been deployed at a specific cutoff.

Cost-Sensitive Evaluation: Not All Mistakes Are Equal

Precision, recall, and even AUC treat every misclassification as equally bad, which is rarely true in practice. Cost-sensitive evaluation assigns an explicit dollar (or other unit) cost to each kind of error and compares options by total expected cost rather than by an error rate that quietly assumes every error is interchangeable. Take a fraud-detection model where missing an actual fraud case (a false negative) costs the business $500 in unrecovered loss, while flagging a legitimate transaction for manual review (a false positive) costs $5 in review labor. Comparing two threshold choices on the same 1,000 transactions:

Threshold A (more sensitive): FN = 2,  FP = 50
Threshold B (more strict):    FN = 10, FP = 5
Expected cost A = (2 x $500) + (50 x $5) = $1,000 + $250 = $1,250
Expected cost B = (10 x $500) + (5 x $5) = $5,000 + $25  = $5,025

Threshold B produces far fewer false positives (5 versus 50) and might look better on a precision-focused report, but it costs four times more overall, because it misses far more of the actually-costly fraud cases. This is exactly the kind of decision the ROI framing in the lesson on the strategic value of data mining depends on: the "best" threshold is whichever one minimizes total expected cost given the actual cost of each error type, not whichever one produces the most favorable-looking precision or recall number in isolation.

A Naming Collision Worth Flagging: "Lift" in Two Different Contexts

A lift chart, used to evaluate a ranking model, compares how many true positives you'd catch by acting on the top-scored X% of records against how many you'd catch by selecting X% at random — a completely different measurement from the lift used to score association rules, covered in the lesson on association rule mining, which compares the observed co-occurrence of two items against what independence would predict. Both use the word "lift" to mean "how much better than a baseline," but a classification lift chart's baseline is random selection while an association rule's lift baseline is statistical independence between two items — worth keeping straight specifically because the same term appears in both contexts with genuinely different formulas behind it.

Where the Rest of Pattern Evaluation Is Covered

Accuracy, precision, recall, F1, and the confusion matrix are covered with a full worked example in the lesson on data mining operators; information gain and the Gini index are covered with a full worked example in the lesson on attribute selection measures; cross-validation is covered with a hand-verified 5-fold example in the lesson on major issues in data mining; and the objective/subjective distinction for evaluating discovered patterns (as opposed to trained classifiers) is covered in the lesson on interestingness of patterns in data mining.

0 Comments

Reviewed before they appear

No comments yet.

Data Mining
Introduction to Data Mining Data Mining Implementation Process Data Mining Architecture Data Mining Techniques KDD: Knowledge Discovery in Databases History of Data Mining Data Mining Tools Data Mining vs Machine Learning Facebook Data Mining Social Media Data Mining Methods Clustering in Data Mining Text Data Mining Bagging vs Boosting Data Mining vs Data Warehousing Social Media Data Mining Data Mining: Bayesian Classifiers Data Mining: World Wide Web Different Types of Clustering Bitcoin Mining and Blockchain Data Mining Orange Data Mining Data Mining vs Big Data Decision Tree Induction Educational Data Mining Data Mining in Healthcare Apriori Algorithm Data Integration in Data Mining Difference Between Data Mining and Text Mining Discretization in Data Mining Redundancy and Correlation in Data Mining Classification of Data Mining Systems Classification Algorithms in Data Mining Data Generalization in Data Mining Classification and Prediction in Data Mining Regression in Data Mining What Is an Outlier in Data Mining Data Cleaning in Data Mining Data Processing in Data Mining Data Mining Task Primitives Web Content Mining, Web Structure Mining, and Web Usage Mining Binning in Data Mining KDD vs. Data Mining Noise in Data Mining BIRCH in Data Mining Stemming in Data Mining Feature Transformation in Data Mining Visual and Audio Data Mining Class Comparison Methods in Data Mining Data Selection in Data Mining Tasks and Functionalities of Data Mining Ubiquitous and Invisible Data Mining Importance of Data Mining Data Quality in Data Mining Mining Frequent Patterns in Data Mining Data Warehouse and OLAP Technology for Data Mining Need for Data Mining Pattern Evaluation Methods in Data Mining Logarithms and Exponents in Complexity Analysis Time Series Clustering What is the C4.5 Algorithm and How Does It Work? Expanding Contractions in Text Mining Cosine Similarity in Data Mining Lazy Learning in Data Mining Neural Networks in Data Mining Building a Text Normalizer Shallow Parsing Data Pipeline Orchestration Big Data vs Small Data Myths of Data Mining Data Reduction in Data Mining Data Mining Models Difference Between Data Mining and Data Science Difference Between Data Mining and Statistics Difference Between Data Mining and Web Mining Difference Between Data Mining and Data Analysis Difference Between Business Intelligence and Data Mining Difference Between Data Mining and Data Visualization Data Mining vs Data Analytics Types of Data Mining Difference Between Data Profiling and Data Mining Predictive Analytics vs Data Mining Difference Between Data Mining and OLAP Descriptive and Predictive Data Mining Difference Between Spatial and Temporal Data Mining Difference Between Classification and Clustering in Data Mining Hierarchical Clustering in Data Mining Density-Based Clustering in Data Mining What Is Aggregation in Data Mining?
Ask about this post
AI Ask about this post

Ask questions about Pattern Evaluation Methods in Data Mining and get answers drawn from it.

Signed-in readers only.