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

    https://github.com/apache/spark/pull/10610#discussion_r51303389
  
    --- Diff: python/pyspark/mllib/clustering.py ---
    @@ -170,7 +173,43 @@ class KMeans(object):
         @since('0.9.0')
         def train(cls, rdd, k, maxIterations=100, runs=1, 
initializationMode="k-means||",
                   seed=None, initializationSteps=5, epsilon=1e-4, 
initialModel=None):
    -        """Train a k-means clustering model."""
    +        """
    +        Train a k-means clustering model.
    +
    +        :param rdd:
    +          Train with a RDD of data points.
    +        :param k:
    +          Number of clusters to create.
    +        :param maxIterations:
    +          Maximum number of iterations allowed.
    +          (default: 100)
    +        :param runs:
    +          Number of runs to execute in parallel. The best model according
    +          to the cost function will be returned (deprecated in 1.6.0).
    +          (default: 1)
    +        :param initializationMode:
    +          The initialization algorithm. This can be either "random" or
    +          "k-means||".
    +          (default: "k-means||")
    +        :param seed:
    +          Random seed value for cluster initialization. Set as None to
    +          generate seed based on system time.
    +          (default: None)
    +        :param initializationSteps:
    +          Set the number of steps for the k-means|| initialization mode.
    +          This is an advanced setting -- the default of 5 is almost
    +          always enough.
    +          (default: 5)
    +        :param epsilon:
    +          Set the distance threshold within which we've consider centers
    --- End diff --
    
    Oh, I agree that `Set` should not be here, I meant to leave that off...  We 
should only start with `Set` if the method is specifically to set that 
parameter.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to