From 5fee9e70b0ca31c5a4e55b66f908fa56b205ead5 Mon Sep 17 00:00:00 2001 From: Felix Cheung Date: Mon, 3 Apr 2017 23:53:38 -0700 Subject: [PATCH 1/2] update doc --- R/pkg/R/mllib_clustering.R | 6 +----- R/pkg/R/mllib_fpm.R | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/R/pkg/R/mllib_clustering.R b/R/pkg/R/mllib_clustering.R index 0ebdb5a27308..97c9fa1b4584 100644 --- a/R/pkg/R/mllib_clustering.R +++ b/R/pkg/R/mllib_clustering.R @@ -498,11 +498,7 @@ setMethod("write.ml", signature(object = "KMeansModel", path = "character"), #' @export #' @examples #' \dontrun{ -#' # nolint start -#' # An example "path/to/file" can be -#' # paste0(Sys.getenv("SPARK_HOME"), "/data/mllib/sample_lda_libsvm_data.txt") -#' # nolint end -#' text <- read.df("path/to/file", source = "libsvm") +#' text <- read.df("data/mllib/sample_lda_libsvm_data.txt", source = "libsvm") #' model <- spark.lda(data = text, optimizer = "em") #' #' # get a summary of the model diff --git a/R/pkg/R/mllib_fpm.R b/R/pkg/R/mllib_fpm.R index 96251b2c7c19..fa2cf2b203cf 100644 --- a/R/pkg/R/mllib_fpm.R +++ b/R/pkg/R/mllib_fpm.R @@ -27,6 +27,11 @@ setClass("FPGrowthModel", slots = list(jobj = "jobj")) #' FP-growth #' #' A parallel FP-growth algorithm to mine frequent itemsets. + +#' \code{spark.fpGrowth} fits a FP-growth model on a SparkDataFrame. Users can +#' \code{spark.freqItemsets} to get frequent itemsets, \code{spark.associationRules} to get +#' association rules, \code{predict} to make predictions on new data based on generated association +#' rules, and \code{write.ml}/\code{read.ml} to save/load fitted models. #' For more details, see #' \href{https://spark.apache.org/docs/latest/mllib-frequent-pattern-mining.html#fp-growth}{ #' FP-growth}. From e4e03eaf98581da92cdf29d93c602384ad82ad36 Mon Sep 17 00:00:00 2001 From: Felix Cheung Date: Mon, 3 Apr 2017 23:55:08 -0700 Subject: [PATCH 2/2] dead space --- R/pkg/R/mllib_fpm.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/pkg/R/mllib_fpm.R b/R/pkg/R/mllib_fpm.R index fa2cf2b203cf..dfcb45a1b66c 100644 --- a/R/pkg/R/mllib_fpm.R +++ b/R/pkg/R/mllib_fpm.R @@ -27,7 +27,6 @@ setClass("FPGrowthModel", slots = list(jobj = "jobj")) #' FP-growth #' #' A parallel FP-growth algorithm to mine frequent itemsets. - #' \code{spark.fpGrowth} fits a FP-growth model on a SparkDataFrame. Users can #' \code{spark.freqItemsets} to get frequent itemsets, \code{spark.associationRules} to get #' association rules, \code{predict} to make predictions on new data based on generated association