Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'skip:[ 20': 0.03; 'subject:Python': 0.05; 'scipy': 0.05; '34,': 0.09; 'matplotlib': 0.09; 'pyplot': 0.09; 'suggest': 0.11; 'dec': 0.15; '12:04': 0.16; 'lambda': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'module': 0.19; 'email addr:gmail.com>': 0.20; 'trying': 0.21; 'import': 0.21; '>>>': 0.22; 'header:In-Reply-To:1': 0.25; 'message- id:@mail.gmail.com': 0.27; 'actual': 0.28; 'that.': 0.30; 'received:209.85.215.46': 0.30; 'etc.)': 0.32; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; 'uses': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'mean': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'group,': 0.60; 'dear': 0.66; 'to:name:python': 0.84; 'url:reference': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=OBuygtVn0Pr8mC262r3ntOXAYE1wKvdyC0HM64YvJ5g=; b=lLDfg8l2Z8QIkQopzMXKgKYxTJmSOTvYWmtArmFZLQltQRHTl2BTEidarpAUy85JgY SBpccohwwLBXN1GP7FlwQMIgRTRgLpU5iSgzR4ktpHU063Q/iWGe8t5UX5nHifTVKzYY B5zhX+H7vwT++nCwEi+LAPf+lWWxOGtg2acn3H514hIUAftqaa5/T0k8jkANJJJPoWAI XOErVzay8T8CYS4fTmbromDdFvasLvaNqozKtJpxDXX6hlPeUPbps+4GOLZBUR/Dkped enr/9jBbQIGrSIDFRZC3DGMDODB15t76Int7bGNRmep49e9aTP3ZRCA8iCnCIVRcZ9FN bjZA== MIME-Version: 1.0 In-Reply-To: <7de5b6b5-a8fa-471a-b5df-3c03adb21640@googlegroups.com> References: <7de5b6b5-a8fa-471a-b5df-3c03adb21640@googlegroups.com> From: Ian Kelly Date: Tue, 4 Dec 2012 14:02:07 -0700 Subject: Re: Python Cluster To: Python Content-Type: multipart/alternative; boundary=bcaec55404988c3bb504d00d2f11 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 56 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1354654960 news.xs4all.nl 6880 [2001:888:2000:d::a6]:54486 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34254 --bcaec55404988c3bb504d00d2f11 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Dec 4, 2012 at 12:04 PM, 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 --bcaec55404988c3bb504d00d2f11 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Tue, Dec 4, 2012 at 12:04 PM, <subha= bangalore@gmail.com> wrote:
Dear Group,

I am trying to use the cluster module as,
>>> from cluster import *
>>> data =3D [12,34,23,32,46,96,13]
>>> cl =3D 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 visualizati= on(like matplotlib or pyplot etc.) to see the data?
<= br>You mean like a dendrogram?=A0 Scipy has support for that.=A0 It uses ma= tplotlib to do the actual plotting.

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