Github user sethah commented on a diff in the pull request:
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala 
    @@ -320,6 +362,23 @@ class KMeans @Since("1.5.0") (
    +    if (isDefined(initialModel)) {
    +      // Check the equal of dimension
    +      val dimOfData = rdd.first().size
    +      val dimOfInitialModel = $(initialModel).clusterCenters.head.size
    +      require(dimOfData == dimOfInitialModel,
    +        s"mismatched dimension, $dimOfData in data while 
$dimOfInitialModel in the initial model.")
    +      // Check the equal of number of clusters
    --- End diff --
    very minor, but this doesn't make sense. Maybe `// Check that the number of 
clusters are equal`

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

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to