math KMeansPlusPlusClusterer Failing unittest

5 messages Options
Embed this post
Permalink
VanIngen, Erik (ESTG)

math KMeansPlusPlusClusterer Failing unittest

Reply Threaded More More options
Print post
Permalink
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());

    }

Ted Dunning

Re: math KMeansPlusPlusClusterer Failing unittest

Reply Threaded More More options
Print post
Permalink
Can you say more about exactly what problem you are having?

On Tue, Oct 20, 2009 at 2:54 AM, VanIngen, Erik (FIES) <
[hidden email]> 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?
>
> 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());
>
>    }
>
>


--
Ted Dunning, CTO
DeepDyve
mgainty

RE: math KMeansPlusPlusClusterer Failing unittest

Reply Threaded More More options
Print post
Permalink

can we see the import statement for Test?
thanks,
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> From: [hidden email]
> Date: Tue, 20 Oct 2009 09:50:21 -0700
> Subject: Re: math KMeansPlusPlusClusterer Failing unittest
> To: [hidden email]
>
> Can you say more about exactly what problem you are having?
>
> On Tue, Oct 20, 2009 at 2:54 AM, VanIngen, Erik (FIES) <
> [hidden email]> 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?
> >
> > 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());
> >
> >    }
> >
> >
>
>
> --
> Ted Dunning, CTO
> DeepDyve
     
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/171222985/direct/01/
Phil Steitz

[math] Re: math KMeansPlusPlusClusterer Failing unittest

Reply Threaded More More options
Print post
Permalink
In reply to this post by VanIngen, Erik (ESTG)
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: [hidden email]
For additional commands, e-mail: [hidden email]

VanIngen, Erik (ESTG)

RE: [math] Re: math KMeansPlusPlusClusterer Failing unittest

Reply Threaded More More options
Print post
Permalink
In reply to this post by VanIngen, Erik (ESTG)
Good point, I just have created a JIRA ticket for this:
https://issues.apache.org/jira/browse/MATH-305



-----Original Message-----
From: Phil Steitz [mailto:[hidden email]]
Sent: 21 October 2009 12:44
To: Commons Users List
Subject: [math] Re: math KMeansPlusPlusClusterer Failing unittest


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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]