mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Eastman <jeast...@windwardsolutions.com>
Subject Re: AbstractCluster() constructor
Date Mon, 04 Nov 2013 14:51:40 GMT
I can't think of a good reason not to do this, but I've not been in that code for a while.
If you make that change, do all of the unit tests still run? Can you write another test that
uses DenseVectors? If yes, then please submit a JIRA patch.

Jeff


On Nov 3, 2013, at 1:30 PM, "DeBarr, Dave" <debarr@mitre.org> wrote:

> Hi,
> 
> Curiosity question: why not use point.clone() in the constructor for org.apache.mahout.clustering.AbstractCluster()?
> 
> This would allow the use of DenseVector, which is much faster (no dictionary lookups)
when clustering dense SIFT descriptors to form visual words (instead of sparse document vectors).
> 
> Thanks,
> Dave
> 
>  protected AbstractCluster(Vector point, int id2) {
>    setNumObservations(0);
>    setTotalObservations(0);
>  //setCenter(new RandomAccessSparseVector(point));
>    setCenter(point.clone());
>    setRadius(center.like());
>    setS0(0);
>    setS1(center.like());
>    setS2(center.like());
>    this.id = id2;
>  }
> 
> 


Mime
View raw message