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

Kursinhalt

Cluster Analysis in Python

Cluster Analysis in Python

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

book
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.

Aufgabe

Swipe to start coding

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 7
toggle bottom row

book
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.

Aufgabe

Swipe to start coding

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 7
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt