spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <>
Subject [GitHub] spark pull request: [SPARK-2199] [mllib] topic modeling
Date Tue, 30 Dec 2014 21:36:20 GMT
Github user jkbradley commented on the pull request:
    @akopich The right way to do pseudo-randomness is to do:
    val randomSeed = ... // if you want to pass in a seed
    indx.mapPartitionsWithIndex { case (partitionIndex, iterator) =>
      // Use the partition index to make a different but deterministic seed for each partition.
      val random = new java.util.Random(partitionIndex + randomSeed)
    You can find examples in, e.g., mllib/tree/impl/BaggedPoint.scala

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message