A hierarchical clustering package for Scipy.
Questions tagged [hcluster]
11 questions
10
votes
2 answers
problem with hierarchical clustering in Python
I am doing a hierarchical clustering a 2 dimensional matrix by correlation distance metric (i.e. 1 - Pearson correlation). My code is the following (the data is in a variable called "data"):
from hcluster import *
Y = pdist(data,…
user248237
7
votes
2 answers
Converting ndarray generated by hcluster into a Newick string for use with ete2 package
I have a list of vectors created by running:
import hcluster
import numpy as np
from ete2 import Tree
vecs = [np.array(i) for i in document_list]
where document_list is a collection of web documents I am analysing. I then perform hierarchical…

user1221408
- 71
- 1
- 3
3
votes
1 answer
python hcluster, distance matrix and condensed distance matrix
I'm using the module hcluster to calculate a dendrogram from a distance matrix. My distance matrix is an array of arrays generated like this:
import hcluster
import numpy as np
mols = (..a list of molecules)
distMatrix = np.zeros((10, 10))
for i…

Mo Sander
- 1,303
- 1
- 10
- 14
3
votes
1 answer
How to use sparse matrix in python hcluster?
I'm trying to use hcluster library in python. I have no enough python knowledges to use sparse matrix in hcluster. Please help me anybody. So, that what I'm doing:
import os.path
import numpy
import scipy
import scipy.io
from hcluster import…

Daniel
- 534
- 4
- 16
3
votes
1 answer
Dendrogram through scipy given a similarity matrix
I have computed a jaccard similarity matrix with Python. I want to cluster highest similarities to lowest, however, no matter what linkage function I use it produces the same dendrogram! I have a feeling that the function assumes that my matrix is…

Kyle Pierce
- 61
- 1
- 6
2
votes
1 answer
How to build & install hcluster?
I download hcluster from http://pypi.python.org/pypi/hcluster , then unzip to a folder , then type "python setup.py install" . It seems OK for it shows:
Z:\>python setup.py install
running install
running build
running build_py
running…

bigbug
- 55,954
- 42
- 77
- 96
1
vote
0 answers
Unable to find vcvarsall.bat even if there is in my computer
I am trying to install hcluster library link with easy_install but I have an error "error: Setup script exited with error: Unable to find vcvarsall.bat"
The problem is that if I search in my pc, the file is here "C:\Program Files (x86)\Microsoft…

Tasos
- 7,325
- 18
- 83
- 176
0
votes
0 answers
Heatmap with NA values
I was trying to plot a heatmap however in my matrix i have a bunch of NAs. I don't want to throw away the whole rows so i am looking for a solution here.
The first error is NA/NaN/Inf in foreign function call (arg 11). I am thinking the hcluster…

Zhen
- 1
0
votes
1 answer
How to reduce leaves length for fitting labels in R dendrogram?
I produced a cluster with hcluster.
original dendogram.
For formatting purposes I used as.dendogram. When I did that my labels were cut of.
vertical dendogram
Even more by the horizontal orientation. The one I need.
horizontal dendogram
The problem…

Milton Alves
- 47
- 6
0
votes
1 answer
Can not install hcluster from pypi under python 2.6 on xp
I am using the setup.py file supplied with hcluster with the following lines added:
sys.path.append("c:\\Program Files\\Python26\\Lib\\site-packages\\hcluster-0.2.0")
sys.path.append("c:\\Program…
0
votes
1 answer
Error in hierarchical clustering with hcluster in python
I am trying to ran the following code, and I get an AttributeError: 'module' object has no attribute 'hcluster', raised in the last line.
I am running in Mountain Lion, I use pip and homebrew, and hcluster is in…

fekioh
- 894
- 2
- 9
- 22