Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Mean Yearly Temperatures Across Clusters | K-Medoids Algorithm
Cluster Analysis in Python
course content

Conteúdo do Curso

Cluster Analysis in Python

Cluster Analysis in Python

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

bookMean Yearly Temperatures Across Clusters

The last chart we got was even harder to interpret than two chapters ago. But if we are talking about 'peeks', the number 4 best fits it.

Let's compare the yearly average temperatures across 4 predicted clusters.

Tarefa

Calculate the yearly average temperatures across each cluster. The structure of data is shown below. [object Object]

Follow the next steps:

  1. Create a KMedoids model with 4 clusters named model.
  2. Fit the 3-15 (these are positions, not indices) columns of data to model.
  3. Add the 'prediction' column to data with predicted by model labels.
  4. Group the data DataFrame by the prediction column, then apply the .mean() function twice: the first call will calculate the monthly means, the second one (with axis = 1) will calculate the yearly averages.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 5
toggle bottom row

bookMean Yearly Temperatures Across Clusters

The last chart we got was even harder to interpret than two chapters ago. But if we are talking about 'peeks', the number 4 best fits it.

Let's compare the yearly average temperatures across 4 predicted clusters.

Tarefa

Calculate the yearly average temperatures across each cluster. The structure of data is shown below. [object Object]

Follow the next steps:

  1. Create a KMedoids model with 4 clusters named model.
  2. Fit the 3-15 (these are positions, not indices) columns of data to model.
  3. Add the 'prediction' column to data with predicted by model labels.
  4. Group the data DataFrame by the prediction column, then apply the .mean() function twice: the first call will calculate the monthly means, the second one (with axis = 1) will calculate the yearly averages.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 5
toggle bottom row

bookMean Yearly Temperatures Across Clusters

The last chart we got was even harder to interpret than two chapters ago. But if we are talking about 'peeks', the number 4 best fits it.

Let's compare the yearly average temperatures across 4 predicted clusters.

Tarefa

Calculate the yearly average temperatures across each cluster. The structure of data is shown below. [object Object]

Follow the next steps:

  1. Create a KMedoids model with 4 clusters named model.
  2. Fit the 3-15 (these are positions, not indices) columns of data to model.
  3. Add the 'prediction' column to data with predicted by model labels.
  4. Group the data DataFrame by the prediction column, then apply the .mean() function twice: the first call will calculate the monthly means, the second one (with axis = 1) will calculate the yearly averages.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

The last chart we got was even harder to interpret than two chapters ago. But if we are talking about 'peeks', the number 4 best fits it.

Let's compare the yearly average temperatures across 4 predicted clusters.

Tarefa

Calculate the yearly average temperatures across each cluster. The structure of data is shown below. [object Object]

Follow the next steps:

  1. Create a KMedoids model with 4 clusters named model.
  2. Fit the 3-15 (these are positions, not indices) columns of data to model.
  3. Add the 'prediction' column to data with predicted by model labels.
  4. Group the data DataFrame by the prediction column, then apply the .mean() function twice: the first call will calculate the monthly means, the second one (with axis = 1) will calculate the yearly averages.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 2. Capítulo 5
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt