[Scipy-tickets] [SciPy] #1272: Some hierarchical clustering methods not working for proximity matrices
SciPy Trac
scipy-tickets@scipy....
Wed Oct 13 18:58:40 CDT 2010
#1272: Some hierarchical clustering methods not working for proximity matrices
---------------------------+------------------------------------------------
Reporter: cassio | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 0.9.0
Component: scipy.cluster | Version: 0.7.0
Keywords: |
---------------------------+------------------------------------------------
Description changed by warren.weckesser:
Old description:
> The following methods: ward, centroid, median, in the package
> scipy.cluster.hierarchy are not working on a proximity matrix.
>
> Suppose I have 5 objects and a condensed distance matrix of 10 pairwise
> distances, when I try to run any of the above methods I get:
>
> ValueError: Valid methods when the raw observations are omitted are
> 'single', 'complete', 'weighted', and 'average'.
>
> I don't understand why I cannot use ward, centroid or median only
> providing the proximity matrix, as those algorithms clearly allow for
> this (relational methods).
>
> In R I can use the hclust command and generate the hierarchies for ward,
> centroid and median.
>
> Sample code to generate the problem:
>
> from pylab import *
> from numpy import *
> from scipy.cluster.hierarchy import *
>
> y = random_sample(10)
> Z = ward(y)
New description:
The following methods: ward, centroid, median, in the package
scipy.cluster.hierarchy are not working on a proximity matrix.
Suppose I have 5 objects and a condensed distance matrix of 10 pairwise
distances, when I try to run any of the above methods I get:
ValueError: Valid methods when the raw observations are omitted are
'single', 'complete', 'weighted', and 'average'.
I don't understand why I cannot use ward, centroid or median only
providing the proximity matrix, as those algorithms clearly allow for this
(relational methods).
In R I can use the hclust command and generate the hierarchies for ward,
centroid and median.
Sample code to generate the problem:
{{{
from pylab import *
from numpy import *
from scipy.cluster.hierarchy import *
y = random_sample(10)
Z = ward(y)
}}}
--
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1272#comment:1>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list