Chapter 5: Finding the Optimal Number of Single Variable Groups
In this chapter, we will learn that we have to preprocess data to find the optimal number of groups for the values. It is not an arbitrary number and is very difficult to determine with just a visual inspection of the data chart. We will work with just one variable in this chapter, and then, in the next chapter, we will use more than two variables to segment the data, which demands a more automatic process with K-means. In this chapter, we will also learn how to install and use the K-means Excel add-in included in this book and on GitHub. We have to use an R function for K-means in Excel because it is very difficult to do an automatic segmentation by hand in Excel.
The topics we will cover in this chapter are as follows:
- Finding an optimal number of groups for one variable
- Running the K-means function to get the centroids or group average
- Finding the groups and centroids of one-variable data with K-means...