Uploaded image for project: 'Mahout'
  1. Mahout
  2. MAHOUT-1440

Add option to set the RNG seed for inital cluster generation in Kmeans/fKmeans

    XMLWordPrintableJSON

    Details

      Description

      It was noted recently that there should be a way to set a static seed for the the initial clusters of Kmeans. In the interests of reproducibility and benchmarking, this patch adds an option to set the seed in the RNG used in the RandomSeedGenerator.buildRandom() method called from the KmeansDriver and FuzzyKMeansDriver.

      I've added in a CLI option -setRandomSeed that when set to the same value (with the -k option set) will produce reproducible results from kmeans and fkmeans.

      This patch allows the user to set a value. It may make more sense to just have an option to set a flag to use the STANDARD_SEED from RandomWrapper.

      I am still feeling my way around the codebase so if this will be useful and there need to be any changes let me know.

        Attachments

        1. MAHOUT-1440.patch
          14 kB
          Andrew Palumbo

          Activity

            People

            • Assignee:
              ssc Sebastian Schelter
              Reporter:
              Andrew_Palumbo Andrew Palumbo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: