Clustering with big data

5 visualizaciones (últimos 30 días)
Filipa Cardoso
Filipa Cardoso el 17 de Jul. de 2018
Comentada: Filipa Cardoso el 14 de Ag. de 2018
I have a vector with 5 million distances [5000000*1] obtained by using the pdist function and the goal is to do hierarchical cluster analysis. However when i use the linkage function i get the following error:
Error using linkage (line 240) Requested 1x12081952473360 (90017.6GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information.
I would like to know how to avoid this error and if that's not possible, which function I should use to make the cluster analysis.
Thanks in advance.

Respuesta aceptada

Bernhard Suhm
Bernhard Suhm el 6 de Ag. de 2018
Maybe you are using the LINKAGE function incorrectly. You already has the pairwise distances, but for some reason the LINKAGE function thinks that you are passing the samples (X), not the distances (Y). LINKAGE should not have a trouble linking 5,000,000 distances, probably it is a matter of just putting the distances in the right form.
  2 comentarios
Bernhard Suhm
Bernhard Suhm el 10 de Ag. de 2018
Also, the input to linkage needs to have the same format as the output of pdist function. Maybe you need to transpose your distance input...
Filipa Cardoso
Filipa Cardoso el 14 de Ag. de 2018
I was indeed using the linkage function wrong since i was transposing the output of the pdist function.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by