From the course: Machine Learning with Data Reduction in Excel, R, and Power BI

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

K-means clustering in two dimensions

K-means clustering in two dimensions

- [Instructor] We can perform the K-Means algorithm on a single dimension of data. But we can also use the algorithm on two, three or even more dimensions in a model. If we use two dimensions though, we can plot our results on a scatter plot visual with the identified clusters which almost lets us draw outlines around these shapes to emphasize their relationships to one another as clusters. In our studio, we've already set the seed to 100 for our model and created a results variable to store the outcomes from running the algorithm using the K-Means function. Let's update this formula to use two dimensions in the model instead of one, by adding the precipitation field, the rainfall, to our C function to select both these factors. So we now have two fields in the model. Let's also update the number of clusters from two to five because there are five climate zones in the US for these 25 cities. Let's leave the end start…

Contents