Description
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
Attachments
Issue Links
- Is contained by
-
IGNITE-9261 [ML] Add ANN algorithm based on ACD concept
- Resolved