
z
Clustering Customers on E-commerce Platforms
Clustering customers on e-commerce platforms involves grouping them based on behaviors, preferences, and other shared characteristics. We look for patterns of behavior, such as purchasing methods, amounts typically spent, or interests. By skillfully utilizing clustering, we can significantly increase the average size of purchases made by individual customers while simultaneously retaining customers in our store.
What are the key benefits of clustering?
Clustering allows for the creation of more personalized offers that are better tailored to the needs and preferences of different customer groups. For example, customers who frequently buy electronics may receive promotional offers for new gadgets, while book lovers might receive literary recommendations.
Understanding the preferred forms of communication for various customer groups allows for more effective outreach. For some customers, SMS messages are mere spam, while for others, they are a valuable source of information. Better alignment of offers with customer needs increases the likelihood of purchase, which translates to higher revenues.
A customer who finds what they are looking for quickly and effortlessly is satisfied. Every organism has evolved techniques for conserving its own energy and resources. Where a customer quickly finds the sought item without effort, they will return, as this solution proves economical in energy consumption, making the purchase easy and accurate. Customers who feel that their needs are understood and met tend to return to the sales platform more often.
Clustering leads to increased efficiency in managing marketing campaigns. It enables more precise market segmentation and the creation of more effective marketing campaigns. For instance, promotions targeted specifically at customers who frequently purchase premium products may be more effective than general campaigns. This allows for better management of the marketing budget by allocating funds to campaigns aimed at the most promising segments or specific customer clusters. To sell well and enjoy customer trust, one must know their customers well.
Understanding Customers
Clustering allows for better analysis of customer behaviors, aiding in the identification of trends and purchasing patterns. Clustering involves finding similar customers and placing them in common sets. It is a method based on machine learning techniques, which is why it is often difficult to clearly understand the criteria for selecting customers into specific clusters. Assigning customers to clusters helps better understand which products are popular among designated groups. This way, one can better forecast future needs and adjust the assortment accordingly.
What are the most common techniques for utilizing clustering?
Knowing the price sensitivity of customers from a specific cluster allows us to offer them more expensive versions of the products they are currently purchasing (known as upselling). Knowing the preferences of customers from a particular cluster allows us to recommend related products (known as cross-selling). Both techniques significantly increase the volume of sales per customer.
Clustering helps understand which products are most frequently purchased by different customer groups, facilitating better inventory management by reducing costs associated with storing unpopular goods.
We Can Earn a Lot by Assigning Customers to Clusters on E-commerce Platforms
Thanks to effective grouping of customers into clusters, it is possible to increase Customer Lifetime Value (CLV). Thus, a range of methods can be employed to encourage customers to remain in the store and isolate them from factors that accelerate the decision to leave the store.
Carpet Bombing or Precision Ammunition?
Perhaps the worst thing a company in the e-commerce sector can do is bombard customers with an overwhelming amount of information. One of the companies for which I developed a recommendation system had a habit of bombarding customers with additional proposals, discounts, and all sorts of offers after a successful transaction. Marketers operated under the assumption that the more flyers and ads they sent, the greater the likelihood something would yield results. The effect was easy to predict.
Precisely targeted ads are more effective and cost less than mass campaigns that may not reach the right audience. Mass sending of more or less random offers leads to customer irritation and discouragement. On the other hand, customers who receive personalized recommendations and offers are more likely to make a purchase, which increases the conversion rate.
Clustering customers on e-commerce platforms is a strategic tool that helps better understand customers, personalize offers, optimize marketing campaigns, and manage the assortment, ultimately resulting in higher revenues and profits. An equally important benefit is the increase in customer retention in the store.
How to Start Grouping Customers into Clusters?
As I mentioned earlier, to effectively know your customers, you must assign them to clusters. Most people believe that assigning specific individuals to certain sets is grouping. Most will also say that grouping involves identifying certain characteristics of individual people and, based on one or more traits, assigning those individuals to specific sets, segments, or groups.
Yes, one can accept such a definition of grouping. So we can group our customers into women and men, select age ranges: “very young,” “young,” “middle-aged,” “older.” We could then perform a transposition and create groups of customers such as “young men,” “older men,” “middle-aged women.” In this case, we have a customer population that has two traits: age categories and gender. We can add another category, such as “profession,” and for example, “frequency of visits to the store.” We would then see new groups, such as “middle-aged men, plumbers, visiting the store three times a month.”
But what do we do if we have not four traits but 40 or even 140 traits? Unfortunately, in the age of computerization, customers are described automatically with dozens of different traits. These are fixed traits, such as place of residence, type of activity, gender, as well as variable traits resulting from customer behavior on the online store: “decision class” (how quickly the customer makes decisions on the website), shopping efficiency class, depending on whether customers always buy or sometimes just browse the site without purchasing. There are many various customer traits resulting from their behavior. The most common analyses focus on their average spending level in the store, their frequency, stability in visiting the store, and the intervals between individual visits. All these behaviors are subject to classification. This means, for example, that a customer in decision class 1 almost always buys, while a customer in decision class 10 almost never buys. One can analyze an infinite number of various behaviors. A precise analysis of just customer behavior can easily lead to the collection of several dozen traits.
Customers are clustered to identify individuals with common characteristics. Now let’s imagine how filters can be used to group customers based on hundreds of collected traits.
Grouping is Not Clustering
Clustering and grouping are terms often used interchangeably. However, they are very different methods of preliminary data analysis. Here’s how they differ.
Clustering is a machine learning technique that involves grouping similar objects into sets (clusters). The goal of clustering is to find structures in the data. It is an unsupervised method, meaning it does not rely on validation and model improvement techniques.
Grouping is the process of organizing elements into groups based on certain criteria, such as gender, age, or interests. Grouping is a broad concept and can refer to various techniques, including clustering. Generally, grouping is usually done using simple filters. In contrast, clustering is used for exploratory analyses, where the goal is to discover natural groups or structures in complex data. Typically, we do not understand what the individual identified groups mean. It is said that similar or even identical objects are being sought. A model of artificial intelligence tries to find structures in the data based on very vague and complicated similarities. Understanding this similarity may be too complex for humans. That is why validation of clustering is applied.
In summary, clustering is most often used, for example, in customer segmentation, grouping genes with similar functions, or identifying subgroups within communities in social networks. In contrast, grouping is used, for instance, when organizing email messages into categories: spam vs. non-spam, simple groups like women – men, or market segments such as traditional channel – modern channel.
In conclusion, clustering is a specific technique of grouping that pertains to finding structures in data without supervision. Grouping is a broader concept that can include various techniques and methods, both supervised and unsupervised. Undoubtedly, simple grouping is insufficiently effective in the context of customer analysis. Grouping based on many criteria is extremely difficult and impractical.
PCA Method
To create a few traits from a cloud of dozens describing customers, which will allow for effective assignment to clusters, the PCA (Principal Component Analysis) method should be used.
PCA is a statistical technique used for dimensionality reduction and simplifying the analysis of large sets of variables. A dataset often contains many variables, which can be challenging to analyze. The goal is to transform information into principal components, where most of the information is contained. Initially, the data is standardized, meaning that each variable has a mean of 0 and a standard deviation of 1. This is important because the PCA method is sensitive to the scale of variables. Next, a covariance matrix is created, which shows how each pair of variables is related. Covariance measures how individual variables interact regarding direction and strength. Of course, from the perspective of the mill owner, the operation of the algorithm does not matter. What is essential is to know that, for example, from 150 customer traits, the PCA method has extracted 4-5 principal components. In the first component are the most effective, most distinct customer traits. In the subsequent components, less important information about customer specifics is found.
The principal components are independent of one another and contain most of the information from the original data. They can be used for further analysis, such as data visualization or modeling.
The PCA method helps identify hidden patterns and relationships between variables. It reduces noise and redundancy in the data, which can improve the performance of analytical models. Thus, PCA is a powerful tool in data analysis that helps simplify complex datasets while retaining as much relevant information as possible. It allows individuals to avoid making arbitrary decisions about which variables to eliminate from a vast cloud of information to facilitate further material analysis.
Clustering County Data
A year ago, I published an article on the platform „Medium” titled „Segmentation of a Population Containing Very Many Features. PCA Analysis and Clustering by k-means Method,” describing how to cluster objects with a large number of features.
The analysis focused on the „Communities and Crime” database containing information about 1,994 counties in the United States. The database was created in the context of analyzing criminal event occurrences. The objective was to identify the characteristics influencing crime levels in these counties. Each of the 1,994 counties in the database had 124 traits. This situation is very similar to having a large number of customers on an e-commerce platform described by a vast number of traits.
The aim of the task was to find communities that are similar in terms of characteristics. The goal was to group similar counties and assign them to specific clusters. This enabled the application of special methods for treating these counties using methods tailored to specific clusters. It also allowed for the use of effective benchmarking tools by comparing municipalities within clusters and finding niches and anomalies in certain areas. This method is very similar to clustering customer populations.
The detailed process in Python is described in the aforementioned article. The municipalities were assigned to seven clusters. To verify whether the clusters were indeed different from one another, it was necessary to compare the clusters based on their traits.
Example of Clustering Quality Assessment
For example, we could create 4 groups of workers: “white plumbers,” “black plumbers,” “white taxi drivers,” “black taxi drivers.” We would then place these individuals in a table, where one column would indicate the profession and rows would indicate skin color, thereby creating very clear group divisions.
The same applies to assessing the quality of clustering. A scatter plot is created, and the clusters are analyzed concerning two traits.
In our case, we had over 100 traits describing individual communities. Therefore, we used the previously described PCA method to consolidate these traits into a few, in our example, 7 principal traits. Thus, when comparing principal component 1 to principal component 2, we see distinct areas of colors. Each dot represents one county. Colors indicate clusters.
The above plot shows that clusters 1, 2, and 3 significantly differ in position regarding the two principal components. The problem arises with cluster 7, which ambiguously assigned counties. Communities in cluster 7 intermingle with clusters 6 and 4. It is noteworthy that the visually least number of counties are assigned to cluster 7. The most counties are assigned to clusters 1, 6, and 2. In PCA methodology, the first two components hold the most significant cognitive importance, containing the most information.
Subsequent plots present the comparison of the first PCA component with the next, less significant components. It appears that a high quality of county assignment to specific clusters has been maintained. Communities in the clusters evidently differ from each other.
Summary
The worst thing a company operating in the e-commerce industry can do is bombard customers with random promotions, flyers, and information. We live in an age of information overload, and most of it is treated as waste. A customer who has to deal with removing unnecessary offers or ignoring irrelevant suggestions will be unnecessarily burdened, leading them to leave our store in search of a place to shop with less effort.
Conversely, a customer who receives accurate suggestions and offers will conserve their energy in searching for products, making them more willing to shop at our store.
One can therefore assume that an effective customer relationship through relevant suggestions and appropriate offers is key to retaining them in our store.
To create relevant offers, we must know the customer. However, it is inefficient to build an individual offer for each of them. Of course, there are such techniques, and everything depends on the scope of the offer being created. However, in most cases, offers are built for entire groups of customers. Customers in clusters share a high level of similarity. Consequently, a whole strategy can be constructed for building relationships with individuals in specific clusters. The foundation for creating such algorithms is the accurate assignment of customers to clusters. Since customers are described in databases using dozens of different traits and metrics, it is impossible to create groups of customers through filtering. Machine learning methodology comes to the rescue, effectively finding similar individuals.
Wojciech Moszczyński
Wojciech Moszczyński is a graduate of the Department of Econometrics and Statistics at Nicolaus Copernicus University in Toruń, specializing in econometrics, finance, data science, and management accounting. He specializes in optimizing production and logistics processes. He conducts research in the field of the development and application of artificial intelligence. He has been involved in popularizing machine learning and data science in business environments for years.
Naprawdę dobrze napisane. Wielu autorom wydaje się, że mają rzetelną wiedzę na opisywany temat, ale tak nie jest. Stąd też moje zaskoczenie. Po prostu świetny artykuł. Będę rekomendował to miejsce i często odwiedzał, żeby poczytać nowe posty.