Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
February vs July Average Temperatures | K-Means Algorithm
Cluster Analysis in Python
course content

Course Content

Cluster Analysis in Python

Cluster Analysis in Python

1. K-Means Algorithm
2. K-Medoids Algorithm
3. Hierarchical Clustering
4. Spectral Clustering

February vs July Average Temperatures

Well, as you remember, there are no 100% correct answers to clustering problems. For the last task you solved it seems like 5 clusters might be a good option.

Let's visualize the results of clustering into 5 groups by building the scatter plot for average February vs July temperatures, which are one of the coldest and hottest months respectively.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 1. Chapter 7
toggle bottom row

February vs July Average Temperatures

Well, as you remember, there are no 100% correct answers to clustering problems. For the last task you solved it seems like 5 clusters might be a good option.

Let's visualize the results of clustering into 5 groups by building the scatter plot for average February vs July temperatures, which are one of the coldest and hottest months respectively.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 1. Chapter 7
toggle bottom row

February vs July Average Temperatures

Well, as you remember, there are no 100% correct answers to clustering problems. For the last task you solved it seems like 5 clusters might be a good option.

Let's visualize the results of clustering into 5 groups by building the scatter plot for average February vs July temperatures, which are one of the coldest and hottest months respectively.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Well, as you remember, there are no 100% correct answers to clustering problems. For the last task you solved it seems like 5 clusters might be a good option.

Let's visualize the results of clustering into 5 groups by building the scatter plot for average February vs July temperatures, which are one of the coldest and hottest months respectively.

Task

Table
  1. Create a KMeans model named model with 5 clusters.
  2. Fit the numerical columns of data (2 - 13 indices) to model.
  3. Add the 'prediction' column to the data DataFrame with predicted by model labels.
  4. Build a scatter plot of average 'Feb' vs 'Jul' temperatures, having each point colored with respect to the 'prediction' column of the data DataFrame.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 7
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt