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

    https://github.com/apache/spark/pull/13148#discussion_r63799888
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/clustering/BisectingKMeans.scala ---
    @@ -39,23 +39,27 @@ private[clustering] trait BisectingKMeansParams extends 
Params
       with HasMaxIter with HasFeaturesCol with HasSeed with HasPredictionCol {
     
       /**
    -   * Set the number of clusters to create (k). Must be > 1. Default: 2.
    +   * The desired number of leaf clusters. Must be > 1. Default: 4.
    +   * The actual number could be smaller if there are no divisible leaf 
clusters.
        * @group param
        */
       @Since("2.0.0")
    -  final val k = new IntParam(this, "k", "number of clusters to create", 
(x: Int) => x > 1)
    +  final val k = new IntParam(this, "k", "The desired number of leaf 
clusters. " +
    +    "Must be > 1. Default: 4.", ParamValidators.gt(1))
    --- End diff --
    
    For what use cases?  I could imagine
    ```
    binarizer = Binarizer()
    binarizer.threshold  # prints Param fields, including built-in doc
    ```
    
    Maybe instead we should add a method explain taking a string:
    ```
    binarizer.explainParam("threshold")  # This currently requires a Param, not 
a String
    ```
    or
    ```
    binarizer.explain("threshold")  # This could be a shorter alias.
    ```
    
    I'd prefer not to specify defaults in extra places since it is easy to type 
the wrong value or get them out of sync if defaults change.


---
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