![]() So these are recent customers who can potentially become long-term customers. Cluster 3: This cluster is characterized by high recency and relatively lower frequency and moderate monetary values.These are likely inactive or at-risk customers. They don’t buy often, and haven’t made a purchase recently either. Cluster 2: Customers in this cluster tend to spend less.These customers still spend more and purchase more frequently than clusters 2 and 3. Cluster 1: This cluster is characterized by moderate recency, frequency, and monetary values.Let’s call the customers in this cluster champions (or power shoppers). Cluster 0: Of all the four clusters, this cluster has the highest recency, frequency, and monetary values.Notice how the customers in each of the segments can be characterized based on the recency, frequency, and monetary values: Plt.title('Average Monetary Value for Each Cluster') Plt.title('Average Frequency for Each Cluster') Plt.legend(bars, cluster_summary.index, title='Clusters') Plt.title('Average Recency for Each Cluster') # Plot the average RFM scores for each clusterīars = plt.bar(cluster_summary.index, cluster_summary, color=colors) ![]() ![]() Step 1 – Import Necessary Libraries and Modulesįirst, let’s import the necessary libraries and the specific modules as needed:Ĭolors = And for this, we’ll use K-Means clustering, an unsupervised machine learning algorithm that groups similar data points into clusters. But we’ll try to identify customer segments with similar RFM characteristics. If you’d like, you can explore and analyze further using these RFM scores. Then, we’ll map these values to the generally used RFM score scale of 1 - 5. We’ll use the information in the dataset to compute the recency, frequency, and monetary values. Monetary Value (M): How much money do they spend?.Frequency (F): How often do they make purchases?.Recency (R): How recently did a particular customer make a purchase?.It evaluates customers based on three key dimensions: RFM Analysis is a simple yet powerful method to quantify customer behavior. Let’s start by stating our goal: By applying RFM analysis and K-means clustering to this dataset, we’d like to gain insights into customer behavior and preferences. Our Approach: RFM Analysis and K-Means Clustering From data preprocessing to cluster analysis and visualization, we’ll code our way through each step.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |