mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Schulte <johannes.schu...@gmail.com>
Subject Re: In-memory kmeans clustering
Date Tue, 09 Apr 2013 16:22:36 GMT
dataPoints can be in memory or from disk, and you can sample the dataPoints
for initialClusters.


On Tue, Apr 9, 2013 at 6:16 PM, Johannes Schulte <johannes.schulte@gmail.com
> wrote:

> Hi,
> this worked for me without having to fiddle with map reduce classes
>
>  List<Cluster> initialClusters = new ArrayList<Cluster>();
>
>         Iterable<Vector> dataPoints = Lists.newArrayList();
>
>
>         ClusterClassifier prior =
>
>                 new ClusterClassifier(initialClusters,
>
>                         new KMeansClusteringPolicy(0.01));
>
>
>         ClusterClassifier clustered = newClusterIterator().iterate(dataPoints, prior,
10);
>
>         List<Cluster> finalClusters = clustered.getModels();
>
>
> On Tue, Apr 9, 2013 at 4:29 PM, Dan Filimon <dangeorge.filimon@gmail.com>wrote:
>
>> Apologies for not getting back to you more quickly!
>>
>> You can use Mahout KMeansDriver and have it run locally (so not as a
>> MapReduce, but locally).
>> There's a static method KMeansDriver.run() whose last argument is
>> runSequential. You need to set this to true.
>>
>> The thing is it will still read and write the vectors to disk. Is this
>> okay?
>>
>>
>>
>>
>>
>> On Tue, Apr 9, 2013 at 5:24 PM, Ted Dunning <ted.dunning@gmail.com>
>> wrote:
>>
>> > This seems surprising.
>> >
>> > I don't think we removed it.
>> >
>> > Does anybody know better than I?
>> >
>> >
>> > On Mon, Apr 8, 2013 at 2:16 PM, Ahmet Ylmaz <
>> ahmetyilmazefendi@yahoo.com
>> > >wrote:
>> >
>> > > Hi,
>> > >
>> > > It seems to be that in-memory kmeans clustering is removed from Mahout
>> > 0.7.
>> > >
>> > > Does this mean that it is no longer possible to do in-memory kmeans
>> > > clustering with Mahout?
>> > > Or, is Hadoop based kmeans clustering the only option?
>> > >
>> > >
>> > > Thanks
>> > > Ahmet
>> > >
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message