Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5647#discussion_r29361850
  
    --- Diff: python/pyspark/mllib/clustering.py ---
    @@ -40,11 +40,16 @@ class KMeansModel(Saveable, Loader):
     
         >>> data = array([0.0,0.0, 1.0,1.0, 9.0,8.0, 8.0,9.0]).reshape(4, 2)
         >>> model = KMeans.train(
    -    ...     sc.parallelize(data), 2, maxIterations=10, runs=30, 
initializationMode="random")
    +    ...     sc.parallelize(data), 2, maxIterations=10, runs=30, 
initializationMode="random",
    +    ...                    seed=None, initializationSteps=5, epsilon=1e-4)
    --- End diff --
    
    I'm sorry about this, but hoped to add 1 more update.  Could you please set 
the seed to some fixed number in this and the other call to train() in this doc 
test?  It should be deterministic for stability.  (It looks like this was a 
problem before your PR too.)  Thanks!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to