You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Dan Filimon <da...@gmail.com> on 2012/11/05 17:37:16 UTC
StreamingKMeansTest for weights in corners
After having refactored the StreamingKMeans class, the last check in
StreamingKMeansTest fails.
I understand it's generating points so that they're centered around the 8
corners of a cube.
There's a total of 20000 points generated in total.
After clustering, by adding the weight of the points whose cluster is
closest to each corner, I would expect there to be 20000 / 8 points around
each corner.
So that's 2500 points per corner.
The assertion asks for 12500 points and it fails. Why are there supposed to
be 12500? Is that even possible? There can't be enough points.
Re: StreamingKMeansTest for weights in corners
Posted by Dan Filimon <da...@gmail.com>.
Of course. :)
On Mon, Nov 5, 2012 at 7:28 PM, Ted Dunning <te...@gmail.com> wrote:
> The assert should clearly be parameterized.
>
> On Mon, Nov 5, 2012 at 8:46 AM, Dan Filimon <dangeorge.filimon@gmail.com
> >wrote:
>
> > Oops, I'm sorry for that last e-mail.
> >
> > I realized I was playing around with the test and changed the number of
> > points being generated from 100000 to 20000 but didn't update the assert.
> >
> >
>
Re: StreamingKMeansTest for weights in corners
Posted by Ted Dunning <te...@gmail.com>.
The assert should clearly be parameterized.
On Mon, Nov 5, 2012 at 8:46 AM, Dan Filimon <da...@gmail.com>wrote:
> Oops, I'm sorry for that last e-mail.
>
> I realized I was playing around with the test and changed the number of
> points being generated from 100000 to 20000 but didn't update the assert.
>
>
Re: StreamingKMeansTest for weights in corners
Posted by Dan Filimon <da...@gmail.com>.
Oops, I'm sorry for that last e-mail.
I realized I was playing around with the test and changed the number of
points being generated from 100000 to 20000 but didn't update the assert.
On Mon, Nov 5, 2012 at 6:37 PM, Dan Filimon <da...@gmail.com>wrote:
> After having refactored the StreamingKMeans class, the last check in
> StreamingKMeansTest fails.
>
> I understand it's generating points so that they're centered around the 8
> corners of a cube.
> There's a total of 20000 points generated in total.
>
> After clustering, by adding the weight of the points whose cluster is
> closest to each corner, I would expect there to be 20000 / 8 points around
> each corner.
> So that's 2500 points per corner.
>
> The assertion asks for 12500 points and it fails. Why are there supposed
> to be 12500? Is that even possible? There can't be enough points.
>