Data Mining
Data mining is not just a big query. It is the search for patterns that were not explicitly requested.
In plain English
It is looking for patterns in a big box of receipts, not just finding one receipt.
The one idea
Data mining searches for patterns and predictions, not known records; the output is a model or rule that must be validated on data it did not see.
A query answers a question you already know how to ask. Mining proposes patterns you did not specify, which makes false discovery and overfitting the central risks.
By the end
- 01Define data mining.
- 02Distinguish classification, clustering, and association rules.
- 03Know the role of feature selection and evaluation.
- 04List common data-mining tools.
What mining adds
A normal query answers a known question, such as "How many orders in March?" Data mining looks for hidden structure. It might ask, "Which customers are likely to churn?" It combines statistics, machine learning, and database techniques on large datasets.
Core techniques
Classification predicts a label from labeled examples. Clustering groups similar records without labels. Association rules find items that co-occur, such as products bought together. Regression predicts a numeric value; anomaly detection finds unusual records.
classification: churn = yes/no
clustering: group customers by behavior
association: {bread} -> {butter}
regression: predicted revenue
anomaly: unusual transactionProcess and tools
A mining project selects data, cleans it, engineers features, trains a model, evaluates it on held-out data, and deploys it. Tools include SQL analytics, Python libraries such as scikit-learn, R, and dedicated platforms. The hard part is usually data quality and problem framing, not the algorithm.
Market basket rules
A grocery chain records which items appear together in each basket.
Count baskets containing bread and butter together.
Support measures how often the combination occurs.
Measure how often butter appears when bread is present.
Confidence measures the strength of the rule bread → butter.
Test the rule on a later month.
If the pattern does not hold, it was a property of the training period, not the business.
ConclusionA mining result is a hypothesis until it survives held-out data. Support and confidence are not proof of causation.
The trade-off
No free correctness.
Gain
Discovery of structure that a fixed query would never ask for.
Cost
Overfitting, spurious correlations, privacy exposure, and models that decay.
Verdict
Treat every rule as a claim with a validation plan, not as a fact because the algorithm found it.
Recap
What to keep.
Takeaways
- +Data mining finds patterns rather than answering a fixed query.
- +Classification predicts labels; clustering groups unlabeled data.
- +Association rules find co-occurring items.
- +Evaluation on held-out data is essential.
- +Data quality and problem framing dominate the work.
Traps
- !Confusing a normal aggregate query with mining.
- !Evaluating a model on the training data.
- !Ignoring data leakage.
Focus
- →Distinguish classification, clustering, and association.
- →Explain why held-out evaluation matters.
- →Name two tools used in practice.
Check yourself
Before you turn the page.
Which technique groups unlabeled records by similarity?
What is an association rule?