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

    https://github.com/apache/spark/pull/15413#discussion_r85188183
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/clustering/GaussianMixture.scala ---
    @@ -350,6 +458,145 @@ object GaussianMixture extends 
DefaultParamsReadable[GaussianMixture] {
     
       @Since("2.0.0")
       override def load(path: String): GaussianMixture = super.load(path)
    +
    +  /**
    +   * Heuristic to distribute the computation of the 
[[MultivariateGaussian]]s, approximately when
    +   * d > 25 except for when k is very small.
    +   *
    +   * @param k  Number of topics
    +   * @param d  Number of features
    +   */
    +  private[clustering] def shouldDistributeGaussians(k: Int, d: Int): 
Boolean = {
    +    ((k - 1.0) / k) * d > 25
    +  }
    +
    +  /**
    +   * Unpack upper triangular part of a symmetric matrix.
    --- End diff --
    
    "Convert an n * (n + 1) / 2 dimension array representing the upper 
triangular part of a matrix into an n * n array representing the full symmetric 
matrix". I think that's more explicit about what is happening. Also very minor 
nit, can we call the array `triangularValues` instead? `triangular` sounds like 
it should be a boolean to me.


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