What Is Data Mining? Techniques Explained With Worked Examples
Data mining finds hidden patterns in large datasets. This guide explains the KDD and CRISP-DM process and works through association rules, a decision tree, k-means and fraud metrics by hand, with RBI's MuleHunter.ai and 2025-26 fraud data as Indian examples.

Data mining is the step in a data project where algorithms search a large dataset for patterns nobody wrote down in advance: items bought together, customers who behave alike, transactions that look like fraud. It sits inside a bigger process called knowledge discovery in databases (KDD), which also covers choosing, cleaning and checking the data. The core techniques are association rules, classification, clustering, regression and anomaly detection. This guide explains each one with a small worked example you can redo by hand or in Python, using Indian banking and retail cases.
Key takeaways (checked 23 Nov 2026)
- Data mining is one step of a larger process. Fayyad, Piatetsky-Shapiro and Smyth's 1996 paper in AI Magazine defines KDD as finding "valid, novel, potentially useful, and ultimately understandable patterns in data". Mining is the step that runs the algorithms.
- Indian payments now generate data at a scale only automated mining can screen. RBI's Annual Report 2025-26 records 2,41,617 million UPI transactions in 2025-26, or about 662 million a day.
- Banks already run mining models in production. RBI says its MuleHunter.ai model, which scores how likely each bank account is to be a mule account, was live in 26 banks as of 31 March 2026.
- Accuracy is the wrong yardstick for rare events. In our worked fraud example, a model with 99.58% accuracy still raises five false alarms for every real fraud it catches.
- Personal data now has rules. India notified the Digital Personal Data Protection (DPDP) Rules on 14 November 2025, with an 18-month phased compliance period.
What is data mining?
Data mining is the use of algorithms to find useful, previously unknown patterns in large datasets. Typical outputs are rules ("customers who buy X also buy Y"), groups of similar records, predictions of a label such as fraud or not fraud, and lists of unusual records. The patterns must hold on new data and be useful to someone.
The name borrows from mining because most of the material is waste rock: the valuable pattern is a small part of a very large pile of records. The most cited definition comes from Usama Fayyad, Gregory Piatetsky-Shapiro and Padhraic Smyth (AI Magazine, 1996). They call the whole process knowledge discovery in databases and describe data mining as one step in it: the step that applies algorithms to extract patterns. The steps around it decide whether those patterns mean anything.
That distinction matters in practice. A model run on badly chosen or uncleaned data will still produce patterns. They will just be wrong. Most of the time on a real project goes into the steps around the algorithm.
Is data mining the same as machine learning or data analytics?
No, but they overlap heavily. Data mining is the goal: discover patterns in existing data. Machine learning supplies many of the algorithms used to do it, such as decision trees and k-means. Statistics supplies the tests that tell you whether a pattern is real. Data analytics answers business questions with data, often without any mining.
| Term | Main question | Typical output |
|---|---|---|
| Data mining | What patterns are hidden in this data? | Rules, clusters, risk scores, outlier lists |
| Machine learning | Can a program learn to predict from examples? | A trained model that scores new data |
| Statistics | Is this effect real, and how sure are we? | Estimates, confidence intervals, tests |
| Data analytics | What happened, and what should we do? | Reports, dashboards, recommendations |
A fraud team uses all four. Analysts track fraud counts on dashboards. Mining finds new patterns in past cases. A machine learning model scores each new transaction. Statistics checks whether a new rule actually reduced losses. For a broader view, see our guides on what data science is and machine learning applications with worked examples.
What are the steps in the data mining process?
Most teams follow CRISP-DM, the Cross-Industry Standard Process for Data Mining. It has six phases: business understanding, data understanding, data preparation, modelling, evaluation and deployment. Modelling, where the algorithms run, is only one of them. IBM's documentation notes that the order is not strict and projects often move back and forth between phases.
- Business understanding. Write the question as a decision: "flag accounts for review so that analysts check at most 500 a day", not "find fraud".
- Data understanding. Profile what you have: counts, missing values, date ranges, how the label (fraud or not) was recorded.
- Data preparation. Select, clean, join and transform. This is Fayyad's selection, preprocessing and transformation steps, and it usually takes most of the time.
- Modelling. Run the mining algorithm: Apriori, a decision tree, k-means and so on.
- Evaluation. Test on data the model has not seen, using a measure that matches the business goal (recall and precision for fraud, not accuracy).
- Deployment. Put the model where it scores live data, then monitor it, because patterns drift.
What are the main data mining techniques?
Five techniques cover most real work. Association rules find items that occur together. Classification predicts a known label, such as fraud or genuine. Clustering groups similar records without labels. Regression predicts a number. Anomaly detection flags records unlike the rest. The first three are worked through below.
| Technique (algorithms) | Question it answers | Example |
|---|---|---|
| Association rules (Apriori, FP-Growth) | What occurs together? | Bill items bought together |
| Classification (decision tree, logistic regression, gradient boosting) | Which known class is this? | Mule account or genuine |
| Clustering (k-means, DBSCAN, hierarchical) | Which records are alike? | Customer segments |
| Regression (linear regression, random forest) | How much? | Next month's demand |
| Anomaly detection (isolation forest, z-scores) | What does not fit? | A sensor reading far outside normal |
Classification and regression are "supervised": they learn from past records where the answer is known. Clustering, association rules and most anomaly detection are "unsupervised": there is no answer column, only the data.
How do association rules work? A market basket example
Association rules measure how often items appear together and how much one item raises the chance of another. Three numbers do the work: support (how common the pair is), confidence (how often the right item follows the left) and lift (how much more often than chance). The Apriori algorithm keeps only item sets common enough to matter.
Take ten bills from a college canteen:
| Bill | Items | Bill | Items |
|---|---|---|---|
| 1 | chai, samosa, biscuit | 6 | coffee, sandwich, biscuit |
| 2 | chai, samosa | 7 | chai, samosa |
| 3 | chai, biscuit | 8 | coffee, samosa |
| 4 | coffee, sandwich | 9 | chai, biscuit |
| 5 | chai, samosa, sandwich | 10 | chai, samosa, biscuit |
For a rule over bills, where is the number of bills containing both and :
Chai is on 7 bills, samosa on 6 and both on 5. So support is 5/10 = 0.5. Confidence of samosa → chai is 0.5/0.6 = 0.83: five of the six samosa buyers also took chai. Lift is 0.5/(0.7 × 0.6) = 1.19, so samosa buyers take chai 19% more often than an average customer. A lift of 1 would mean no link at all.
Apriori with minimum support 0.3 and minimum confidence 0.6 works level by level. All five single items pass the support test. Of the ten possible pairs, only chai + samosa (0.5) and chai + biscuit (0.4) reach 0.3. No three-item set can pass, because Apriori prunes any triple with a pair that failed. That pruning rule, from Agrawal and Srikant's 1994 VLDB paper, is what keeps the algorithm fast on millions of bills.
The last row is the lesson. Coffee → sandwich has the strongest link (lift 2.22) but covers only two bills, too few to trust. Coffee and chai never appear together, so their lift is 0. In real work you set support and confidence thresholds from the business question, then rank surviving rules by lift.
How does classification work? A decision tree for mule accounts
Classification learns from labelled past records to predict the label of new ones. A decision tree does it by asking one yes/no question at a time, always choosing the question that best separates the classes. "Best" is usually measured by Gini impurity, which is 0 for a pure group and 0.5 for a 50/50 mix of two classes.
This is the kind of problem RBI's MuleHunter.ai tackles. A mule account is a bank account used to receive and pass on fraud money. According to RBI's Annual Report 2025-26, the model uses behavioural and transactional features to give every account a probability of being a mule. It was running in 26 banks as of 31 March 2026, and each bank decides what to do with a flagged account. We don't know MuleHunter's features, so here is an illustrative ten-account table with two simple ones:
- Pass-through: 80% or more of money received leaves within 24 hours.
- New account: opened less than 90 days ago.
Four of the ten accounts are mules. Gini impurity for a group where a fraction are mules is:
At the root, , so . The tree tries each question and takes the size-weighted Gini of the two groups it creates:
| Split on | "Yes" group | "No" group | Weighted Gini (gain) |
|---|---|---|---|
| Pass-through | 5 accounts, 4 mules, G = 0.32 | 5 accounts, 0 mules, G = 0 | 0.16 (gain 0.32) |
| New account | 5 accounts, 3 mules, G = 0.48 | 5 accounts, 1 mule, G = 0.32 | 0.40 (gain 0.08) |
Pass-through cuts impurity four times as much, so the tree asks it first. Inside the pass-through group, "new account?" separates three certain mules from a mixed pair (one mule, one genuine), which goes to a human reviewer.
Real trees do the same thing over dozens of features and thousands of thresholds. scikit-learn's DecisionTreeClassifier uses Gini by default. Teams usually move on to ensembles of trees (random forests, gradient boosting) for higher accuracy, but a single tree is still the easiest model to explain to a risk committee.
Why is accuracy misleading in fraud detection?
Because fraud is rare. If 1 transaction in 1,000 is fraud, a model that calls everything genuine is 99.9% accurate and catches nothing. Fraud models are judged on recall (the share of frauds caught) and precision (the share of alerts that are real fraud), and on how many alerts analysts can actually review.
Take 1,000,000 transactions with 1,000 frauds. A model catches 800 and raises 4,000 false alarms:
Here TP (true positives) = 800 frauds caught, FN = 200 frauds missed, FP = 4,000 false alarms and TN = 995,000 genuine transactions passed. So recall is 800/1,000, precision is 800/4,800 and accuracy is 995,800/1,000,000.
The model is useful even though only one alert in six is real fraud, because it finds 80% of the frauds in 0.48% of the traffic. The F1 score, which combines precision and recall, is 0.28. Moving the alert threshold trades one against the other. A bank sets it by asking how many alerts its team can check each day.
Real data is noisier than this example. RBI's Annual Report 2025-26 shows 10,114 fraud cases involving ₹48,021 crore reported by banks and financial institutions in 2025-26, against 23,722 cases and ₹32,803 crore in 2024-25. Card, internet and digital payment cases fell from 13,332 to 293. Read these numbers with RBI's own notes. They count only frauds of ₹1 lakh and above. The amount involved is not the amount lost. Frauds reported in a year may have happened years earlier. And 2025-26 includes 314 older cases worth ₹30,199 crore that were reclassified after a court judgement. Before mining any dataset, check how it was counted.
How does clustering work? k-means on customer data
Clustering groups records that are similar without being told the groups in advance. k-means, the most used method, starts with k guessed centres. It assigns each record to its nearest centre, moves each centre to the mean of its records, and repeats until nothing changes. Each round lowers the inertia: the total squared distance from records to their centres.
Our example has twelve customers, each described by visits per month and average bill (in hundreds of rupees), with k = 3. We start badly on purpose: two of the three starting centres sit in the same group.
Inertia falls 216 → 142.1 → 130.5 → 115.4 → 49.0 → 22.5, and the algorithm stops after five centre updates. The three segments are occasional big spenders (about 2 visits, ₹1,450 bill), mid-range regulars (8.5 visits, ₹825) and frequent small spenders (14.5 visits, ₹300).
Three practical warnings:
- Scale your features. k-means uses distance. If one column is in rupees and another in visits, the rupee column dominates. We kept both on similar scales; in practice, standardise first.
- You choose k. The algorithm will happily split data into 3 or 30 groups. Use the business question, an elbow plot of inertia, or silhouette scores to pick k.
- Starts matter. A bad start can get stuck in a poor solution. scikit-learn's default k-means++ start spreads the first centres apart, and its
n_initsetting reruns the algorithm from several starts and keeps the best.
Where is data mining used in India today?
Data mining is used wherever large volumes of records need screening or grouping. In India the biggest users are banks and payment firms (fraud and mule-account detection), retail and e-commerce (basket analysis, recommendations, customer segments), telecom (churn), manufacturing (anomaly detection on sensor data) and the public sector (tax and benefit fraud).
The scale is what forces automation. RBI's Annual Report 2025-26 counts 2,41,617 million UPI transactions in 2025-26, worth ₹314.2 lakh crore. That is about 662 million a day, or roughly 7,700 every second. Nobody can review that by hand. Rules and models decide which few transactions or accounts a person should look at. For worked examples from retail, banking, factories and hospitals, see applications of business analytics in six industries.
Engineers meet the same ideas on the shop floor. Clustering vibration signatures, flagging anomalous sensor readings and mining warranty claims for parts that fail together are all data mining. The same methods apply, just to different columns.
Which data mining tools should you learn first?
Learn SQL to pull and join data, then Python with pandas and scikit-learn for the techniques above. Add mlxtend for association rules. Weka and KNIME are free tools that let you build mining workflows with little or no code, which helps you learn the concepts. R is common in statistics-heavy teams.
| Tool | What it is for | Cost |
|---|---|---|
| SQL | Selecting, joining and aggregating data (the "data preparation" phase) | Free databases available |
| Python: pandas + scikit-learn | Cleaning, decision trees, k-means, evaluation metrics. scikit-learn 1.9.1 was released on 10 Sep 2026 | Free, open source |
| mlxtend | Apriori and association rules (support, confidence, lift) | Free, open source |
| Weka | Point-and-click mining from the University of Waikato | Free, open source |
| KNIME Analytics Platform | Visual drag-and-drop workflows | Free desktop version |
If you are new to the maths, the order that works for most learners is: statistics and probability, then SQL, then Python, then the algorithms. Skill-Lync's Statistics and Probability for Data Sciences and SQL for Data Science courses cover the first two steps.
Is data mining legal in India?
Mining your organisation's own business data is legal, but mining personal data now falls under the Digital Personal Data Protection Act, 2023 and the DPDP Rules notified on 14 November 2025. Personal data needs a lawful basis, usually consent for a stated purpose. The Rules allow 18 months for phased compliance; the top penalty is ₹250 crore.
According to PIB's backgrounder on the Rules, that ₹250 crore ceiling applies when a data fiduciary fails to maintain reasonable security safeguards. In practice, a project team should collect only the columns it needs, prefer aggregated or pseudonymised data, and document why each personal field is used. This is a summary for learners, not legal advice. Your organisation's privacy or legal team has the final word.
Is data mining a good career in India?
Data mining is a skill used across data analyst, data scientist, fraud analyst and machine learning roles, not usually a job title on its own. Skill-Lync's placement records show data science learners hired at a median 3.6 LPA. Recruiters include market research, automotive, EV and equity research firms, not only IT companies.
The figures come from Skill-Lync's placement data: 3,711 records up to 7 Nov 2026 (snapshot of 15 Nov 2026). For the data science domain (n = 174), the median offer is 3.6 LPA, with a 25th percentile of 3.0 LPA and a 75th percentile of 4.26 LPA. The most frequent recruiters in that group are NielsenIQ (14), RNTBCI (10), Kabira Mobility (8), William O'Neil (6), Ola Electric (6) and TCS (5). These are self-reported placements of Skill-Lync learners, mostly starting offers from 2021-23, so treat them as a starting point, not a market average. We will update them as new placements come in. For a role-level view, see the data analyst salary page.
The Post Graduate Program in Data Analytics and Data Science covers SQL, Python, statistics and machine learning algorithms with projects in each module. If you want help choosing between that and a shorter course, talk to a Skill-Lync counsellor. To compare the two career tracks first, read data science vs data analytics.
Frequently asked questions
What are the 5 main techniques of data mining?
The five main techniques are association rules, classification, clustering, regression and anomaly detection. Association rules find items that occur together. Classification predicts a known label. Clustering groups similar records without labels. Regression predicts a number. Anomaly detection flags records unlike the rest. Most real projects combine two or three of them.
What is KDD in data mining?
KDD stands for knowledge discovery in databases, the whole process of turning raw data into useful knowledge. Fayyad, Piatetsky-Shapiro and Smyth (1996) list its steps as selection, preprocessing, transformation, data mining, and interpretation and evaluation. Data mining is the one step that runs the pattern-finding algorithms on the prepared data.
What is a real-life example of data mining?
RBI's MuleHunter.ai is a current Indian example. It uses behavioural and transactional features to give each bank account a probability of being a mule account used to move fraud money. RBI says it was implemented in 26 banks as of 31 March 2026. Each bank then decides how to act on a flagged account.
Is data mining the same as data science?
No. Data science is the broader field: collecting, cleaning, analysing, modelling and communicating with data. Data mining is one part of it, the discovery of patterns in existing data with algorithms. A data scientist uses data mining techniques alongside statistics, experiments, visualisation and software engineering to answer questions and build products.
Do I need coding to learn data mining?
You can learn the ideas without coding. Weka and KNIME let you build mining workflows by pointing and clicking. Most jobs, though, expect SQL and Python with pandas and scikit-learn. A practical path is to learn the concepts on small examples like the ones in this article, then repeat them in Python.
Sources and further reading
- U. Fayyad, G. Piatetsky-Shapiro and P. Smyth, From Data Mining to Knowledge Discovery in Databases, AI Magazine 17(3), 1996
- IBM Documentation, CRISP-DM Help Overview (SPSS Modeler; accessed 23 Nov 2026)
- Reserve Bank of India, Annual Report 2025-26, Chapter VI: Regulation, Supervision and Financial Stability (Tables VI.2 and VI.3; MuleHunter.ai, para VI.57)
- Reserve Bank of India, Annual Report 2025-26, Chapter IX: Payment and Settlement Systems (Table IX.1, UPI volume and value)
- PIB, DPDP Rules, 2025 Notified (backgrounder, November 2025)
- R. Agrawal and R. Srikant, Fast Algorithms for Mining Association Rules, VLDB 1994
- S. Raschka, mlxtend, association_rules user guide (support, confidence, lift definitions)
- scikit-learn documentation: Decision trees, Clustering (k-means), Model evaluation; release history on PyPI
- Weka (University of Waikato) and KNIME Analytics Platform
- Skill-Lync placement records, snapshot of 15 Nov 2026 (3,711 records up to 7 Nov 2026; aggregates only)


