Data mining

Data mining is the process of finding useful patterns, such as groupings, associations and anomalies, in large collections of data using methods from statistics, machine learning and database systems.

A supermarket that studies millions of receipts to learn which products are bought together is data mining. So is a bank flagging transactions that do not fit a customer's usual pattern. The aim is to extract patterns and knowledge from large datasets, drawing on statistics, machine learning and database systems. It is usually described as the analysis step within a wider process known as knowledge discovery in databases, or KDD.

The standard tasks are anomaly detection (finding unusual records), association rule learning (finding items that go together, often called market basket analysis), clustering (grouping similar records without predefined categories), classification (sorting new items into known categories, such as spam or not spam), regression (modelling a numerical relationship) and summarisation (producing a compact description of the data).

The name is something of a misnomer, since the goal is to dig knowledge out of data rather than to dig up the data itself. The term spread around 1990 in the database community. Gregory Piatetsky-Shapiro coined knowledge discovery in databases for a 1989 workshop, and the two phrases are now used almost interchangeably. CRISP-DM, a process model first released in 1999, defines six phases: business understanding, data understanding, data preparation, modelling, evaluation and deployment.

There is an older, critical usage too. In the 1960s statisticians and economists used terms such as data dredging and data fishing for combing through data without a hypothesis, and in 1983 the economist Michael Lovell used data mining in the same critical sense. Search enough variables and some patterns will appear by chance. The sensible use of mining is to generate ideas that are then tested on fresh data, not to treat every correlation found as a discovery.

The phrase matters in AI law as well. Text and data mining is the term copyright law uses for automated analysis of works such as web pages and books, which makes it central to questions about AI training. The EU's 2019 Directive on Copyright in the Digital Single Market created an exception for text and data mining for scientific research (Article 3) and a general exception (Article 4) that applies only if the rightsholder has not opted out. The UK has had an exception for text and data mining for non-commercial research since 2014.

Common questions

What is data mining, with an example?

Data mining is searching large datasets for useful patterns. A classic example is market basket analysis, where a retailer analyses sales records to find products that are often bought together and uses that to plan promotions or store layouts. Fraud detection, which flags transactions that look unlike a customer's normal behaviour, is another.

Is data mining the same as machine learning?

They overlap heavily. Data mining describes the goal of discovering patterns in data, while machine learning is a family of methods for learning from data, many of which data mining uses. Machine learning is also used for tasks such as generating text or images, which are not usually called data mining.

What is KDD?

KDD stands for knowledge discovery in databases, a term coined by Gregory Piatetsky-Shapiro for a 1989 workshop. It describes the whole process of turning data into knowledge, including selection, preparation and interpretation, with data mining as the analysis step. The two terms are often used as synonyms.

Is text and data mining legal for AI training?

It depends on the jurisdiction. In the EU, the 2019 copyright directive allows text and data mining for scientific research and, more generally, unless rightsholders have opted out. In the UK the exception covers non-commercial research. Other countries rely on different rules.

Finding more

Search for "data mining tasks", "CRISP-DM" or "knowledge discovery in databases" for the technical side, and "text and data mining exception" for the legal side. Textbooks and university course material cover the methods well. For the law, go to the legislation itself and to guidance from copyright offices and regulators rather than summaries written by parties to AI copyright disputes.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.