commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VanIngen, Erik (FIES)" <Erik.VanIn...@fao.org>
Subject math KMeansPlusPlusClusterer Failing unittest
Date Tue, 20 Oct 2009 09:54:30 GMT
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?

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());

    }


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