You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Zinoviev (JIRA)" <ji...@apache.org> on 2018/08/16 12:57:00 UTC

[jira] [Resolved] (IGNITE-9239) [ML] KMeansTrainer crashed if amount of possible clusters more than amount of partitions in dataset

     [ https://issues.apache.org/jira/browse/IGNITE-9239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Zinoviev resolved IGNITE-9239.
--------------------------------------
    Resolution: Fixed

> [ML] KMeansTrainer crashed if amount of possible clusters more than amount of partitions in dataset
> ---------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-9239
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9239
>             Project: Ignite
>          Issue Type: Bug
>          Components: ml
>            Reporter: Aleksey Zinoviev
>            Assignee: Aleksey Zinoviev
>            Priority: Major
>
> How to reproduce?
> Set the K parameter in KMeans Trainer to 100, and run KMeansClusterization Example
> \
> StackTrace is
> Exception in thread "KMeansClusterizationExample-#44" java.lang.RuntimeException: java.lang.IllegalArgumentException: bound must be positive
>  at org.apache.ignite.ml.clustering.kmeans.KMeansTrainer.fit(KMeansTrainer.java:112)
>  at org.apache.ignite.ml.clustering.kmeans.KMeansTrainer.fit(KMeansTrainer.java:46)
>  at org.apache.ignite.ml.trainers.DatasetTrainer.fit(DatasetTrainer.java:68)
>  at org.apache.ignite.examples.ml.clustering.KMeansClusterizationExample.lambda$main$0(KMeansClusterizationExample.java:60)
>  at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.IllegalArgumentException: bound must be positive
>  at java.util.Random.nextInt(Random.java:388)
>  at org.apache.ignite.ml.clustering.kmeans.KMeansTrainer.initClusterCentersRandomly(KMeansTrainer.java:193)
>  at org.apache.ignite.ml.clustering.kmeans.KMeansTrainer.fit(KMeansTrainer.java:86)
>  ... 4 more
>  
>  
> The possible solution :
> correct the mechanism of rndPnts computation in the row 180-190 in KMeansTrainer



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)