spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkbradley <...@git.apache.org>
Subject [GitHub] spark pull request: [Spark-7879][MLlib] KMeans API for spark.ml Pi...
Date Tue, 07 Jul 2015 22:01:23 GMT
Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6756#discussion_r34096438
  
    --- Diff: mllib/src/main/scala/org/apache/spark/mllib/clustering/KMeans.scala ---
    @@ -521,6 +519,13 @@ object KMeans {
           v2: VectorWithNorm): Double = {
         MLUtils.fastSquaredDistance(v1.vector, v1.norm, v2.vector, v2.norm)
       }
    +
    +  private[spark] def validateInitializationMode(initializationMode: String): Boolean
= {
    --- End diff --
    
    This should return true or false, not throw an exception.  The caller can throw an exception
as needed.  (spark.ml Params handle throwing the exception if isValid fails.)


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message