You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Abhinav M Kulkarni <ab...@gmail.com> on 2012/08/01 22:20:08 UTC

Unable to find KMeans Cluster class

Hi,

I have following code snippet from the book 'Hadoop in Action':

Vector vec = vectors.get(i);
Cluster cluster = new Cluster(vec, i, new EuclideanDistanceMeasure());

I am unable to find Cluster class anywhere with constructor as above. In 
fact under package
org.apache.mahout.clustering Cluster is defined as an interface and not 
as a class.

Is there any version mismatch or something? Or I need to import Cluster 
class from some other package that I am not aware of?

Thanks,
Abhinav M Kulkarni





Re: Unable to find KMeans Cluster class

Posted by Abhinav M Kulkarni <ab...@gmail.com>.
Okay, I used Kluster class under org.apache.mahout.clustering.kmeans 
package. This implements interface Cluster.

On 08/01/2012 01:25 PM, Sean Owen wrote:
> That may be a typo in the book. I don't know if it was non-abstract in the
> past. But try against version 0.5 to be sure. I don't know what the
> replacement code is if so but someone else here likely does.
>
> On Wed, Aug 1, 2012 at 9:20 PM, Abhinav M Kulkarni <
> abhinavkulkarni@gmail.com> wrote:
>
>> Hi,
>>
>> I have following code snippet from the book 'Hadoop in Action':
>>
>> Vector vec = vectors.get(i);
>> Cluster cluster = new Cluster(vec, i, new EuclideanDistanceMeasure());
>>
>> I am unable to find Cluster class anywhere with constructor as above. In
>> fact under package
>> org.apache.mahout.clustering Cluster is defined as an interface and not as
>> a class.
>>
>> Is there any version mismatch or something? Or I need to import Cluster
>> class from some other package that I am not aware of?
>>
>> Thanks,
>> Abhinav M Kulkarni
>>
>>
>>
>>
>>


Re: Unable to find KMeans Cluster class

Posted by Sean Owen <sr...@gmail.com>.
That may be a typo in the book. I don't know if it was non-abstract in the
past. But try against version 0.5 to be sure. I don't know what the
replacement code is if so but someone else here likely does.

On Wed, Aug 1, 2012 at 9:20 PM, Abhinav M Kulkarni <
abhinavkulkarni@gmail.com> wrote:

> Hi,
>
> I have following code snippet from the book 'Hadoop in Action':
>
> Vector vec = vectors.get(i);
> Cluster cluster = new Cluster(vec, i, new EuclideanDistanceMeasure());
>
> I am unable to find Cluster class anywhere with constructor as above. In
> fact under package
> org.apache.mahout.clustering Cluster is defined as an interface and not as
> a class.
>
> Is there any version mismatch or something? Or I need to import Cluster
> class from some other package that I am not aware of?
>
> Thanks,
> Abhinav M Kulkarni
>
>
>
>
>