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

Contenido del 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.

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 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.

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo claro?

Sección 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.

Tarea

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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones

¿Todo estuvo 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.

Tarea

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.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 2. Capítulo 5
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt