The Knowledge Discovery (KDD) Process
The 7 steps from raw data to knowledge, the architecture of a data-mining system, the kinds of data we can mine, and the five task primitives.
1Data mining = "knowledge mining from data"
In simple terms, data mining is extracting ("mining") knowledge from large amounts of data.
Mining gold from rocks is called gold mining, not rock mining. So "data mining" should really be called "knowledge mining from data": the data is the rock and the knowledge is the gold. The name stuck because "knowledge mining from data" is too long, and "knowledge mining" alone loses the idea of large amounts of data.
There are two views of how data mining relates to KDD (Knowledge Discovery from Data):
View 1: synonym
Many people use data mining and KDD to mean the same thing.
View 2: one step
Others see data mining as one essential step inside the larger knowledge discovery process. The notes use this view.
2The 7 steps of the KDD process
Knowledge discovery is an iterative sequence of these steps (Figure 2-1):
| # | Step | What happens |
|---|---|---|
| 1 | Data cleaning | Remove noise and inconsistent data |
| 2 | Data integration | Combine multiple data sources |
| 3 | Data selection | Retrieve the data relevant to the analysis task from the database |
| 4 | Data transformation | Transform or consolidate data into forms suitable for mining, e.g. summary or aggregation operations |
| 5 | Data mining | The essential step: intelligent methods are applied to extract data patterns |
| 6 | Pattern evaluation | Identify the truly interesting patterns using interestingness measures |
| 7 | Knowledge presentation | Visualisation and knowledge-representation techniques present the knowledge to the user |
- Steps 1–4 are all forms of data preprocessing: they prepare the data for mining.
- The data mining step may interact with the user or a knowledge base.
- Interesting patterns are presented to the user and may be stored as new knowledge in the knowledge base.
- In this view data mining is only one step of the whole process, but an essential one because it uncovers the hidden patterns.
"Explain the steps of the KDD process" is a very common question. Write the 7 steps in order with one line each, then add the point that steps 1–4 are preprocessing. A quick memory chain: C-I-S-T-M-E-P ("Can I See The Mined Evidence Please").
3Architecture of a typical data mining system
Figure 2-2 shows the components as layers. From the bottom up:
┌──────────────────────────┐
│ User interface │
└────────────┬─────────────┘
┌────────────┴─────────────┐ ┌──────────────┐
│ Pattern evaluation module│◄─►│ │
└────────────┬─────────────┘ │ Knowledge │
┌────────────┴─────────────┐ │ base │
│ Data mining engine │◄─►│ │
└────────────┬─────────────┘ └──────────────┘
┌────────────┴─────────────┐
│ Database / data warehouse│
│ server │
└────────────┬─────────────┘
data cleaning, integration & selection
Database Data warehouse WWW Other repositories
| Component | Role |
|---|---|
| User interface | Links the user and the system. The user can specify a data mining query/task, give information to focus the search, do exploratory mining on intermediate results, browse database/warehouse schemas, evaluate patterns and visualise them in different forms. |
| Pattern evaluation module | Uses interestingness measures and works with the mining modules to focus the search toward interesting patterns. Can use interestingness thresholds to filter out patterns. May be integrated with the mining module. |
| Data mining engine | The essential part: a set of functional modules for characterization, association & correlation analysis, classification, prediction, cluster analysis, outlier analysis and evolution analysis. |
| Knowledge base | Domain knowledge that guides the search or evaluates interestingness: concept hierarchies, user beliefs (to judge how unexpected a pattern is), extra interestingness constraints and thresholds, and metadata. |
| Database / data warehouse server | Fetches the relevant data for the user's request. |
For efficient mining, push the evaluation of pattern interestingness as deep as possible into the mining process. The search is then limited to interesting patterns only, and the system doesn't waste time generating patterns that will be thrown away.
4What kinds of data can be mined?
In principle data mining applies to any data repository and also to transient data such as data streams.
Relational databases
A DBMS = a collection of interrelated data (the database) plus software to manage and access it. The software handles defining structures, storage, concurrent/shared/distributed access, and consistency and security, even through system crashes or attempts at unauthorised access.
Data warehouses
The president wants sales per item type per branch for Q3. The data is spread across many databases at many sites, which makes this hard. With a data warehouse it is easy.
A data warehouse is a repository of information collected from multiple sources, stored under a unified schema, usually at a single site. It is built through:
Transactional databases
A file where each record is a transaction: a unique trans ID plus the list of items in the transaction (e.g. items bought). Extra tables can hold the date, customer ID, salesperson ID, branch and so on.
| Trans ID | List of item IDs |
|---|---|
| T100 | I1, I3, I8, I16 |
| T200 | I2, I8 |
This is the data used for market basket analysis (Apriori, Week 9).
Advanced database systems
| Type | Stores | Examples |
|---|---|---|
| Object-relational | Relational model extended with rich data types for complex objects and object orientation; each entity is an object | Sophisticated applications with complex structures |
| Temporal | Relational data with time-related attributes (several timestamps with different meanings) | Employee history with valid-from/valid-to |
| Sequence | Ordered events, with or without concrete time | Shopping sequences, web click streams, biological sequences |
| Time-series | Values measured repeatedly over time (hourly, daily…) | Stock exchange, inventory control, temperature and wind |
| Spatial / spatiotemporal | Space-related information | Maps, VLSI/CAD designs, medical and satellite images |
| Text | Word descriptions of objects: long sentences or paragraphs | Product specs, bug reports, notes |
| Multimedia | Image, audio, video | Content-based picture retrieval, voice mail, video-on-demand |
| Heterogeneous | Set of interconnected, autonomous component databases | Objects differ greatly between components |
| Legacy | Group of heterogeneous DBs combining different kinds of systems (relational, OO, hierarchical, network, spreadsheets, file systems) | Old enterprise systems |
| World Wide Web | Linked data objects for interactive access | Web usage mining |
Details worth remembering
- Spatial data formats
- Raster: n-dimensional bit/pixel maps (e.g. each pixel of a satellite image = rainfall in that area)
- Vector: roads, bridges, lakes as unions of points, lines and polygons
- Text data structure levels
- Unstructured: some web pages
- Semi-structured: e-mail, HTML/XML pages
- Well structured: library catalogues, which can be stored in relational DBs
- Multimedia needs support for large objects (gigabytes) and special storage and search. Audio and video need real-time retrieval at a steady rate (to avoid gaps and buffer overflows), so they are called continuous-media data. Promising approaches are multimedia data cubes, feature extraction and similarity-based pattern matching.
- Web usage mining (Weblog mining) means capturing user access patterns on the web. It helps system design (efficient access between related objects) and marketing (place ads on frequently visited pages, better customer classification).
5Data mining task primitives
A user specifies a data mining task as a data mining query. The query is defined in terms of task primitives, which let the user interactively communicate with the system to direct the mining and look at results from different angles.
There are five primitives (Figure 2-4):
| # | Primitive | Specifies | Example |
|---|---|---|---|
| 1 | Task-relevant data | Which portion of the database: the relevant attributes or dimensions | "Customers in Sri Lanka, attributes age, income, items bought" |
| 2 | Kind of knowledge to be mined | The function: characterization, discrimination, association/correlation, classification, prediction, clustering, outlier analysis, evolution analysis | "Find association rules" |
| 3 | Background knowledge | Domain knowledge that guides discovery and evaluation: concept hierarchies (mine at multiple levels of abstraction), user beliefs | Age hierarchy: 20–29 → young → all |
| 4 | Interestingness measures and thresholds | How to judge patterns, e.g. support and confidence for association rules. Rules below the user-given thresholds are uninteresting | min support 5%, min confidence 70% |
| 5 | Representation for visualising patterns | Output form: rules, tables, charts, graphs, decision trees, cubes | "Show as a decision tree" |
Data · Knowledge type · Background knowledge · Interestingness · Visualisation
Questions often say "List and explain the data mining task primitives". Give all five with one example each, as in the table.
6Quick revision sheet
| Concept | Remember it as |
|---|---|
| Data mining | Knowledge mining from data (gold, not rock) |
| KDD vs DM | DM is one essential step inside KDD |
| KDD steps | Cleaning → Integration → Selection → Transformation → Mining → Evaluation → Presentation |
| Preprocessing | Steps 1–4 |
| Architecture | UI · Pattern evaluation · Mining engine · Knowledge base · DB/DW server |
| Knowledge base holds | Concept hierarchies, user beliefs, thresholds, metadata |
| Data warehouse | Multiple sources, unified schema, single site; built by clean → integrate → transform → load → refresh |
| Transactional DB | Trans ID + list of items |
| Time-series vs sequence | Repeated measurements over time vs ordered events |
| Raster vs vector | Pixel maps vs points, lines and polygons |
| Continuous-media data | Audio/video needing steady real-time retrieval |
| Web usage mining | Mining user access patterns (weblogs) |
| 5 task primitives | Task-relevant data · Kind of knowledge · Background knowledge · Interestingness · Visualisation |
?Self-check quiz
10 questions on this week. Answer them all, then press Check my answers. Your best and latest scores are saved and shown on the subject page.