commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject [math] Re: math KMeansPlusPlusClusterer Failing unittest
Date Wed, 21 Oct 2009 10:44:03 GMT
VanIngen, Erik (FIES) wrote:
> Hi all,
> 
> I have a problem with KMeansPlusPlusClusterer in the trunk. See below for the
> unittest. Am I doing something wrong here or is there a bug?

This looks like a bug.  I get an NPE running the test, which should
succeed.  If you don't mind opening a JIRA ticket for this, that
would be appreciated.  Thanks for reporting this.

Phil
> 
> Kind Regards,
> Erik 
> 
> 
> 
> 
> @Test
>     public void testPerformClusterAnalysis2() {
>         KMeansPlusPlusClusterer<EuclideanIntegerPoint> transformer =
>             new KMeansPlusPlusClusterer<EuclideanIntegerPoint>(new
> Random(1746432956321l));
>         EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] {
>         		new EuclideanIntegerPoint(new int[] { 1959,325100 }),
>         		new EuclideanIntegerPoint(new int[] { 1960,373200 }),
>         };
>         List<Cluster<EuclideanIntegerPoint>> clusters =
>             transformer.cluster(Arrays.asList(points), 1, 1);
>         assertEquals(1, clusters.size());
> 
>     }
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message