spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From felixcheung <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-13011] K-means wrapper in SparkR
Date Wed, 10 Feb 2016 20:37:01 GMT
Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11124#discussion_r52520956
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -126,3 +126,27 @@ setMethod("summary", signature(object = "PipelineModel"),
                   return(list(coefficients = coefficients))
                 }
               })
    +
    +#' Fit a k-means model
    +#'
    +#' Fit a k-means model, similarly to R's kmeans().
    +#'
    +#' @param x DataFrame for training
    +#' @param centers Number of centers
    +#' @param iter.max Maximum iteration number
    +#' @param algorithm Algorithm choosen to fit the model
    +#' @return A fitted k-means model
    +#' @rdname kmeans
    +#' @export
    +#' @examples
    +#'\dontrun{
    +#' model <- kmeans(x, centers = 2, algorithm="random")
    +#'}
    +setMethod("kmeans", signature(x = "DataFrame"),
    --- End diff --
    
    shall this match the signature of stats::kmeans in R?
    https://stat.ethz.ch/R-manual/R-devel/library/stats/html/kmeans.html


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