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

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

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.

Tarefa

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.

Tarefa

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.

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

Tudo estava claro?

Seção 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.

Tarefa

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.

Tarefa

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.

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

Tudo estava claro?

Seção 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.

Tarefa

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.

Tarefa

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.

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

Tudo estava 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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. 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