Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
The Weather Data and Linkages | Hierarchical Clustering
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

The Weather Data and Linkages

Let's see how will the dendrograms with different linkage parameter values will look like for the weather data.

Note, that to explore the task's result you will need to scroll over the output block on the right and below.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Note, that you received four dendrograms in the console. To explore them scroll the console down.

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 3. Capítulo 5
toggle bottom row

The Weather Data and Linkages

Let's see how will the dendrograms with different linkage parameter values will look like for the weather data.

Note, that to explore the task's result you will need to scroll over the output block on the right and below.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Note, that you received four dendrograms in the console. To explore them scroll the console down.

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 3. Capítulo 5
toggle bottom row

The Weather Data and Linkages

Let's see how will the dendrograms with different linkage parameter values will look like for the weather data.

Note, that to explore the task's result you will need to scroll over the output block on the right and below.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Note, that you received four dendrograms in the console. To explore them scroll the console down.

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

¿Todo estuvo claro?

Let's see how will the dendrograms with different linkage parameter values will look like for the weather data.

Note, that to explore the task's result you will need to scroll over the output block on the right and below.

Tarea

Table

For the weather data stored in the data variable build the dendrograms for each of 4 types of linkage ('single', 'average', 'complete', and 'ward'. These are already stored in the linkages list). Follow the next steps:

  1. Import the functions needed:
  • AgglomerativeClustering from sklearn.cluster.
  • dendrogram and linkage from scipy.cluster.hierarchy.
  1. Iterate over the linkages list using the dummy variable link.
  2. Within the dist variable compute the distances using 3-14 (these are positions, not indices!) columns of data, and passing the method parameter to link.
  3. Build the dendrogram for dist, setting no_labels to True.

Note, that you received four dendrograms in the console. To explore them scroll the console down.

Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 3. 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