[SciPy-user] Looking for a way to cluster data

Gary Ruben gruben at bigpond.net.au
Sat Apr 25 23:18:59 EDT 2009


Hi all,

I'm looking for some advice on how to order data points so that I can 
visualise them. I've been looking at scipy.cluster for this purpose but 
I'm not sure whether it is suitable so I thought I'd see whether anyone 
had suggestions for a simpler suggestion of how to order the coordinates.

I have a binary 3D array containing 1's that form a shape in a 3D volume 
against a background of 0's - they form a skeleton of a connected, 
branched structure. Furthermore, the points are all 26-connected to each 
other, i.e. there are no gaps in the skeleton. The longest chains may be 
1000's of points long.
It would be nice to visualise these using the mayavi mlab plot3d 
function, which draws tubes and which requires ordered coordinates as 
input, so I need to get ordered coordinate lists that traverse the 
points along the branches of the skeleton. It would also be nice to 
preferentially cluster long chains since then I can cull very short 
chains from the visualisation.

scipy.cluster seems to be able to cluster the points but I'm not sure 
how to get the x,y,z coordinates of the original points out of its 
linkage data. This may not be possible. Maybe the scipy.spatial module 
is a better match to my problem.

Any suggestions?

Gary



More information about the SciPy-User mailing list