Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #34254

Re: Python Cluster

References <7de5b6b5-a8fa-471a-b5df-3c03adb21640@googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2012-12-04 14:02 -0700
Subject Re: Python Cluster
Newsgroups comp.lang.python
Message-ID <mailman.476.1354654960.29569.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, Dec 4, 2012 at 12:04 PM, <subhabangalore@gmail.com> wrote:

> Dear Group,
>
> I am trying to use the cluster module as,
> >>> from cluster import *
> >>> data = [12,34,23,32,46,96,13]
> >>> cl = HierarchicalClustering(data, lambda x,y: abs(x-y))
> >>> cl.getlevel(10)
> [[96], [46], [12, 13, 23, 34, 32]]
> >>> cl.getlevel(5)
> [[96], [46], [12, 13], [23], [34, 32]]
>
> but now I want to visualize it if any one suggest how may I use
> visualization(like matplotlib or pyplot etc.) to see the data?
>

You mean like a dendrogram?  Scipy has support for that.  It uses
matplotlib to do the actual plotting.

http://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.dendrogram.html

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python Cluster subhabangalore@gmail.com - 2012-12-04 11:04 -0800
  Re: Python Cluster Dave Angel <d@davea.name> - 2012-12-04 14:25 -0500
  Re: Python Cluster Ian Kelly <ian.g.kelly@gmail.com> - 2012-12-04 14:02 -0700
  Re: Python Cluster Miki Tebeka <miki.tebeka@gmail.com> - 2012-12-04 13:03 -0800
    Re: Python Cluster subhabangalore@gmail.com - 2012-12-04 18:36 -0800

csiph-web