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

Alexey Zinoviev updated IGNITE-9239:
------------------------------------
    Fix Version/s: 2.7

> [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: Alexey Zinoviev
>            Assignee: Alexey Zinoviev
>            Priority: Major
>             Fix For: 2.7
>
>
> 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
(v8.3.4#803005)

Reply via email to