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

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

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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

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

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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

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

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 2. Capítulo 5
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt