Similar to MIA ch09 RandomPointUtil.java, random selection is not uniform
random.

org.apache.mahout.clustering.kmeans.RandonSeedGenerator.java problem

line 96-109

if (currentSize < k) {

            //select

          } else if (random.nextInt(currentSize + 1) != 0) { // with chance
1/(currentSize+1) pick new element

            int indexToRemove = random.nextInt(currentSize); // evict one
chosen randomly

            // replace with new

          }

Reply via email to