Return-Path: X-Original-To: apmail-mahout-user-archive@www.apache.org Delivered-To: apmail-mahout-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53FDA18830 for ; Tue, 21 Jul 2015 01:12:24 +0000 (UTC) Received: (qmail 55643 invoked by uid 500); 21 Jul 2015 01:12:08 -0000 Delivered-To: apmail-mahout-user-archive@mahout.apache.org Received: (qmail 55578 invoked by uid 500); 21 Jul 2015 01:12:08 -0000 Mailing-List: contact user-help@mahout.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@mahout.apache.org Delivered-To: mailing list user@mahout.apache.org Received: (qmail 55566 invoked by uid 99); 21 Jul 2015 01:12:08 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jul 2015 01:12:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9FE6C18A23E for ; Tue, 21 Jul 2015 01:12:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.63 X-Spam-Level: *** X-Spam-Status: No, score=3.63 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, KAM_INFOUSMEBIZ=0.75, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 81MEb3wOYm6n for ; Tue, 21 Jul 2015 01:12:01 +0000 (UTC) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 6F8E543E2E for ; Tue, 21 Jul 2015 01:12:01 +0000 (UTC) Received: by wicgb10 with SMTP id gb10so41026162wic.1 for ; Mon, 20 Jul 2015 18:11:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9ffFrDEctLEPE/K7QPav1qN+IHEu/teZx/RdR3dgmfE=; b=U54D7Kcq3PJ5fZRn96Vtgt+tqnIjcA91ZtrrVlLeR1VGC99RTwUKXw1kFlamnIYFkx rasdB2NXlpn9RjQ2mk74fTQdCOz2sI8vC5lG5meteS0OnWgehwW5OrmbdDUavyMuiRT1 ggNMK1nO3nC2hyUV0RDJMqXYn2rQBXUMbCgeTqHX5+OvAap/JawSGL1Ob+rKyzm4Cfk4 jKGbQrUREqbWiQm9Zz5L9kyzQKiSElSFaSBPcdu6KrN1laqFus3ljjl+reMMu//gNFgq 1E9RhM/m4IAplsObGgdh0uQoEIEf9PU7+RtilnkdDq2sI19/+sUSzQ7SDTeijhU9Vl5B Acow== MIME-Version: 1.0 X-Received: by 10.180.21.175 with SMTP id w15mr26861344wie.58.1437441068778; Mon, 20 Jul 2015 18:11:08 -0700 (PDT) Received: by 10.180.160.226 with HTTP; Mon, 20 Jul 2015 18:11:08 -0700 (PDT) In-Reply-To: References: Date: Mon, 20 Jul 2015 18:11:08 -0700 Message-ID: Subject: Re: Kmeans clusterdump Interpretation From: Andrew Musselman To: "user@mahout.apache.org" Content-Type: multipart/alternative; boundary=047d7b6d9bac4a4961051b58542f --047d7b6d9bac4a4961051b58542f Content-Type: text/plain; charset=UTF-8 I'm not sure centroid id is even a defined thing, especially since the centroid, in my understanding, is just a point in space, not necessarily a point in your data. Are you trying to find the most-central point in a given cluster? On Mon, Jul 20, 2015 at 5:18 PM, Ankit Goel wrote: > Hi, > I've been messing with mahout 0.10 and kmeans clustering with a solr 4.6.1 > index. The data is news articles. The --field option for kmeans is set to > "content". The idField is set to "title" (just so i can analyse it faster). > The clusterdump of the kmeans result gives me a proper output, but I cant > figure out the id of the vector chosen as the center. There are only 14-15 > articles so I am not hung up about the cluster performance at this time. > > I used random seeds for the kmeans commandline. > For reference, this is the commandline cluster dump I am executing > > bin/mahout clusterdump -i $MAHOUT_HOME/testCluster/clusters-3-final > -p $MAHOUT_HOME/testCluster/clusteredPoints -d $MAHOUT_HOME/dict.txt -b 5 > > The output I get is off the form > > :{"r": > > top terms > > xxxxx==>xxxxx > > Weight : [props - optional]: Point: > > 1.0 : [distance=0.0]: [{"account":0.026}.......other features] > > 1.0 : [distance=0.3963903651622338]: [....] > > > So how exactly do I get the centroid id? I have even tried accessing it > with java > > ClusterWritable value.getValue().getCenter() but this just gives me the > features and values of the centroid. > > Also, please do explain the meaning of "account":0.026 (just making sure I > know it right). I used tfidf. > > -- > Regards, > Ankit Goel > http://about.me/ankitgoel > --047d7b6d9bac4a4961051b58542f--