Customer Segmentation
Customer segmentation is the process of dividing a customer base into smaller groups with common
Improved marketing efficiency: By targeting specific segments of customers, businesses can create more relevant and effective marketing campaigns, which can lead to higher conversion rates and lower marketing costs.
Increased customer loyalty: By providing personalized experiences and meeting the specific needs of different customer segments, businesses can build stronger relationships with their customers and increase customer loyalty.
Increased sales: By targeting specific segments with relevant products and offers, businesses can increase the chances of making a sale.
Improved customer experience: By understanding the needs and preferences of different customer segments, businesses can create a better overall customer experience and improve customer satisfaction.
Added Business Value
Customer segmentation is useful for a variety of purposes, including...

Creating Segmentations
This example uses a customer
table to create segmentations. The table contains customer information like demographics and product usage metrics.
- We
SELECT
data from thecustomer
table. These are used as the input to the clustering command,CLUSTER
. - The
CLUSTER
function is used to group each user into a specified cluster, given bycluster_id
. Theignore
parameter is being used to specify that thecustomer_id
column should be ignored in the clustering.
The final result shows your customers divided into clusters!

Understanding Segments
This example shows how you can easily understand the characteristics of each segment.
It's super simple - all you need to do is wrap your CLUSTER
function with EXPLAIN
! Infer then uses Explainable AI to examine your clustering model, and figure out what the drivers of each segment are.
The final result shows the importance of each column (features) in driving the formation of that segment. Now you can understand which different behaviours are in your data, and you can use this information to create a sweet marketing strategy!

Changing Granularity
This example shows how you can change your clustering model to change the granularity of your segments by reducing the minimum size of a segment/cluster.
By changing the min_cluster_size
parameter, we can choose a smaller value to get more clusters. Likewise, a higher value produces fewer clusters.
The final result should show you a clustering with more segments!