Determining the groups and average value (centroids) of two and three variables
Now that we know the optimal number of groups for two and three variables (revenue, quantity, and month) by running the Elbow function, we will perform these activities:
- Getting the groups with the K-means algorithm for two and three variables
- Visualizing centroids or the average value of each group for two and three variables
- Charting the product value range of each group for revenue, quantity, and month
For the revenue and quantity variables, we can visualize the minimum and maximum values of quantity for the best revenue group.
Also using three variables (revenue, quantity, and month of sale), we can explore which months of the year demand a higher quantity of products and what are the revenue ranges to see whether it is worth moving this large logistic operation to get the revenue.
Getting the groups with the K-means algorithm for two and three variables
We are going...