We're required to pass a distance matrix, so there should be no need to calculate any additional distances, right? What am I missing?
Documentation here: http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.cluster.hierarchy.linkage.html
We're required to pass a distance matrix, so there should be no need to calculate any additional distances, right? What am I missing?
Documentation here: http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.cluster.hierarchy.linkage.html
The linkage function does not need the metric argument, unlees you pass in your original observations instead of a distance matrix.
From your posted link
y : ndarray
[...] Alternatively, a collection of m observation vectors in n dimensions may be passed as an m by n array.
The linkage function checks, if you passed in a valid distance matrix - presumable using is_valid_y / is_valid_dm - and if not it will first apply pdist with the metric you have specified (and euclidean metric if nothing has been specified).
I think the metric is used for calculating the distance between the newly formed cluster ( depending in which method we use)