Github user imatiach-msft commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16355#discussion_r93475036
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/mllib/clustering/BisectingKMeans.scala ---
    @@ -339,10 +339,14 @@ private object BisectingKMeans extends Serializable {
         assignments.map { case (index, v) =>
           if (divisibleIndices.contains(index)) {
             val children = Seq(leftChildIndex(index), rightChildIndex(index))
    -        val selected = children.minBy { child =>
    -          KMeans.fastSquaredDistance(newClusterCenters(child), v)
    +        if (children.length > 0) {
    --- End diff --
    
    I added a filter on whether new cluster centers contains the children.  
Would you be able to send me a sample dataset so I can validate the fix? Thank 
you!


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