Introduction
Welcome to a new module in your Alteryx journey! In the previous module, we focused entirely on supervised learning. We built a logistic regression model to predict a specific, known outcome: whether a Titanic passenger survived. We used a "labeled" dataset where the correct answer was already known for our training data.
Today, we pivot to a different and equally powerful area of predictive analytics: unsupervised learning. As the name implies, this is where we work with data that has no predefined labels or target variables. Instead of predicting a known outcome, our goal is to discover hidden patterns, structures, and relationships within the data itself.
This lesson specifically addresses the learning outcome: Explain the use cases for clustering as an unsupervised learning technique. We will define what clustering is and, more importantly, explore the practical business problems it can solve. This conceptual foundation is essential before we dive into building clustering models in Alteryx.
Part 1: From Supervised to Unsupervised Learning
The fundamental difference between supervised and unsupervised learning lies in the data you start with and the questions you can answer.
- Supervised Learning: You have an input and a known output (the "target variable"). The goal is to learn the mapping function from input to output.
- Question: "Based on passenger age and class, can we predict survival?"
- Unsupervised Learning: You only have input data, with no corresponding output variables. The goal is to model the underlying structure or distribution in the data.
- Question: "Can we find natural groups of customers based on their purchasing behavior?"
To solidify these concepts, let's watch a short video that clarifies the distinction and introduces clustering.
Supervised vs. Unsupervised Learning
This video from IBM Technology provides a clear, high-level overview of unsupervised learning and its main tasks. It introduces clustering as a primary example.
Please watch the following segments: What is Unsupervised Learning? (01:36 - 02:05) Clustering Explained (02:05 - 02:32) How it Works (03:55 - 04:22) Key Advantages (04:54 - 05:13) Focus on how these algorithms work on their own with unlabeled data to find inherent patterns.
As the video explained, clustering is the process of grouping data points such that objects in the same group (called a cluster) are more similar to each other than to those in other clusters. The algorithm doesn't know what these groups represent beforehand; it discovers them based purely on the mathematical relationships in the data.
Part 2: Common Business Use Cases for Clustering
Now that you understand the "what," let's focus on the "why." Clustering is not just a theoretical exercise; it drives significant business value across many industries. Let's explore the most common applications.
Tool Mastery | K-Centroids Cluster Analysis
This article from the Alteryx Community provides a great introduction to cluster analysis and its applications.
Read the first three paragraphs, starting from 'Cluster analysis has a wide variety of use cases...' and ending at '...you do not provide the target groups for analysis.' Pay close attention to the definition of Market Segmentation.
Use Case 1: Customer and Market Segmentation
This is perhaps the most classic and intuitive use case for clustering. Businesses have vast amounts of customer data—demographics, purchase history, web activity, etc. Clustering can sift through this data to identify distinct customer personas.
Imagine an e-commerce company. A clustering model might identify groups like:
- High-Value Frequent Shoppers: High purchase frequency, high average order value.
- Bargain Hunters: Shop primarily during sales events, use discount codes.
- New Customers: Recently signed up, made one or two small purchases.
By identifying these segments, a business can stop using a one-size-fits-all approach and instead tailor its marketing strategies, product recommendations, and communication to the specific characteristics of each group.

Use Case 2: Anomaly and Fraud Detection
In many datasets, most data points follow a consistent pattern. Anomalies, or outliers, are data points that deviate significantly from these patterns. Clustering is an excellent way to identify them.
When you perform clustering, you can analyze the results to find points that:
- Don't belong to any cluster (are very far from all cluster centers).
- Form a very small cluster of their own.
These outliers are often of great interest. For example, in financial data, an outlier transaction could represent a fraudulent charge. In network data, it might signal a security breach. In manufacturing, it could indicate a faulty sensor or a product defect.

Use Case 3: Other Powerful Applications
The power of clustering extends to many other domains. The same fundamental principle of "finding groups of similar things" can be applied in various ways.
Alteryx stats tool for beginners: part 1 - Clustering
This article from The Data School blog highlights several other interesting applications of clustering.
Read the section titled 'Clustering', focusing on the paragraph that begins 'There are a number of interesting real-world use cases...'.
As the article mentions, other use cases include:
- Location Optimization: A retail chain can cluster geographic locations based on demographics, traffic patterns, and local competition to identify the most promising sites for new stores.
- Document or Content Classification: Clustering can group news articles, research papers, or customer reviews by topic, allowing users to easily navigate large volumes of text.
- Biology: Researchers use clustering to group genes with similar expression patterns, which can help in understanding genetic diseases.
The key takeaway is that whenever you have a dataset and a need to find natural, data-driven groupings without a predefined target, clustering is a technique you should consider.
A First Look at Clustering in Alteryx
While this lesson is conceptual, it's helpful to see how these ideas connect to the Alteryx platform. You'll find the clustering tools in the Predictive Grouping tool category.
The primary tool for this task is the K-Centroids Cluster Analysis tool. The typical workflow involves:
- Preparing your data: Selecting numeric fields for analysis and often standardizing them (we'll cover this in the next lesson).
- (Optional but recommended) Using the K-Centroids Diagnostics tool to help determine the optimal number of clusters for your data.
- Running the K-Centroids Cluster Analysis tool to create the model and group your data.
- Using the Append Cluster tool to add a new column to your dataset that assigns a cluster number to each record.
You don't need to build this workflow today, but it's good to be aware of the tools you'll be using as we move forward.
Conclusion
In this lesson, you've transitioned from the world of supervised learning to unsupervised learning and explored the "why" behind clustering.
Key Takeaways:
- Unsupervised learning finds hidden patterns in unlabeled data, unlike supervised learning, which predicts a known target.
- Clustering is an unsupervised technique that automatically groups similar data points together.
- The primary use cases for clustering are powerful and practical, including:
- Customer Segmentation: To create targeted marketing and personalized experiences.
- Anomaly/Fraud Detection: To identify unusual data points that need investigation.
- Location Analysis: To inform strategic decisions like site selection.
Preview of the Next Lesson:
You can't just feed any dataset into a clustering algorithm. The quality of your clusters depends heavily on the data you use. In our next lesson, we will focus on the crucial first step of any clustering project: preparing data for clustering by selecting appropriate fields and applying scaling. This will set us up to successfully build our first clustering model in Alteryx.