Data Mining Strategies and Applications
KDD Process Foundations
Beyond the Query
You already know how to pull data from a database. With a few lines of SQL, you can retrieve specific records, join tables, and perform aggregations. But answering a known question is different from discovering something entirely new. How do you find valuable, unexpected patterns in massive datasets? The answer isn't a single, magic query. It's a structured, iterative process.
Knowledge Discovery in Databases (KDD)
noun
The non-trivial process of identifying valid, novel, potentially useful, and ultimately understandable patterns in data.
Many people use the terms "Data Mining" and "KDD" interchangeably, but that's not quite right. Data Mining is a single, crucial step within the larger KDD process. Think of KDD as the entire project of building a house, from drafting blueprints to final inspection. Data Mining is the specialized work of laying the foundation and framing the structure. It’s essential, but it doesn't happen in a vacuum. The work you do before and after is what makes the final result useful.
The KDD Pipeline
The KDD process is a multi-stage pipeline. It provides a roadmap for turning raw data into actionable knowledge. While often shown as a linear sequence, it's highly iterative. You'll frequently loop back to earlier stages as you learn more about your data.
Let's walk through these stages using a common goal: a retail company wants to reduce customer churn.
1. Selection This first step is about defining your business objective and identifying the right data to help you achieve it. Instead of grabbing the entire database, you target specific subsets. For our churn problem, we aren't interested in warehouse inventory data. We select customer demographics, purchase history, website activity, and customer support ticket logs.
2. Preprocessing Raw data is almost always messy. This is the cleanup phase, and it's where data miners spend a surprising amount of time. You'll handle missing values (e.g., a customer with no listed age), correct inconsistencies (e.g., 'USA' vs. 'United States'), and remove noise or outliers that could skew your results. This step is the foundation of the 'garbage in, garbage out' principle. Clean data is essential for meaningful results.
3. Transformation Here, you convert the cleaned data into a format suitable for mining algorithms. This often involves creating new variables from existing ones, a process called feature engineering. For example, you might transform a customer's raw purchase dates into a more useful feature like 'average days between purchases' or 'total spent in the last 90 days'. You might also normalize data, scaling numerical values to a common range to prevent certain features from dominating the model.
4. Data Mining This is the core of the process where algorithms are applied to the prepared data to find patterns. You might use a classification algorithm to predict which customers are likely to churn, or a clustering algorithm to discover natural groupings of customers based on their purchasing behavior. This is the step that gets the most attention, but its success depends entirely on the quality of the previous stages.
5. Interpretation & Evaluation Finding a pattern isn't enough. Is it valid? Is it useful? In this final stage, you analyze the output from the mining algorithms. You might find that customers who haven't made a purchase in 60 days and have recently contacted support are at high risk of churning. You evaluate the pattern's reliability and its potential business impact. If the insights are valuable, you present them to stakeholders. If not, you loop back to an earlier stage, perhaps by selecting additional data or trying a different transformation.
KDD vs. CRISP-DM
You'll often hear about another methodology called CRISP-DM, which stands for Cross-Industry Standard Process for Data Mining. It's very similar to the KDD process and is arguably the most popular framework used in the industry today.
CRISP-DM has six phases: Business Understanding, Data Understanding, Data Preparation, Modeling, Evaluation, and Deployment. The first two phases map closely to KDD's 'Selection', Data Preparation covers 'Preprocessing' and 'Transformation', and 'Modeling' is the 'Data Mining' step.
The key difference is emphasis. CRISP-DM is explicitly business-focused, starting with a deep dive into business objectives. It also includes a final 'Deployment' phase, which is about integrating the discovered knowledge into the organization's operations, like building a dashboard that flags at-risk customers in real-time. Both frameworks champion the same core idea: successful data mining is a structured, cyclical process, not a one-off task.
How does "Data Mining" relate to the "Knowledge Discovery in Databases" (KDD) process?
A data analyst for an e-commerce company creates a new variable called 'average_days_between_purchases' by analyzing a customer's order dates. Which stage of the KDD process does this activity belong to?
This foundational process is your guide for any data mining project. By following these steps, you ensure that your work is targeted, methodical, and ultimately, useful.
