aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorYanbo Liang <ybliang8@gmail.com>2015-11-18 13:30:29 -0800
committerXiangrui Meng <meng@databricks.com>2015-11-18 13:30:29 -0800
commite222d758499ad2609046cc1a2cc8afb45c5bccbb (patch)
treea378be289b9c80cf81975e419ed6ffb4b229e53e /R
parente391abdf2cb6098a35347bd123b815ee9ac5b689 (diff)
downloadspark-e222d758499ad2609046cc1a2cc8afb45c5bccbb.tar.gz
spark-e222d758499ad2609046cc1a2cc8afb45c5bccbb.tar.bz2
spark-e222d758499ad2609046cc1a2cc8afb45c5bccbb.zip
[SPARK-11684][R][ML][DOC] Update SparkR glm API doc, user guide and example codes
This PR includes: * Update SparkR:::glm, SparkR:::summary API docs. * Update SparkR machine learning user guide and example codes to show: * supporting feature interaction in R formula. * summary for gaussian GLM model. * coefficients for binomial GLM model. mengxr Author: Yanbo Liang <ybliang8@gmail.com> Closes #9727 from yanboliang/spark-11684.
Diffstat (limited to 'R')
-rw-r--r--R/pkg/R/mllib.R18
1 files changed, 15 insertions, 3 deletions
diff --git a/R/pkg/R/mllib.R b/R/pkg/R/mllib.R
index f23e1c7f1f..8d3b4388ae 100644
--- a/R/pkg/R/mllib.R
+++ b/R/pkg/R/mllib.R
@@ -32,6 +32,12 @@ setClass("PipelineModel", representation(model = "jobj"))
#' @param family Error distribution. "gaussian" -> linear regression, "binomial" -> logistic reg.
#' @param lambda Regularization parameter
#' @param alpha Elastic-net mixing parameter (see glmnet's documentation for details)
+#' @param standardize Whether to standardize features before training
+#' @param solver The solver algorithm used for optimization, this can be "l-bfgs", "normal" and
+#' "auto". "l-bfgs" denotes Limited-memory BFGS which is a limited-memory
+#' quasi-Newton optimization method. "normal" denotes using Normal Equation as an
+#' analytical solution to the linear regression problem. The default value is "auto"
+#' which means that the solver algorithm is selected automatically.
#' @return a fitted MLlib model
#' @rdname glm
#' @export
@@ -79,9 +85,15 @@ setMethod("predict", signature(object = "PipelineModel"),
#'
#' Returns the summary of a model produced by glm(), similarly to R's summary().
#'
-#' @param x A fitted MLlib model
-#' @return a list with a 'coefficient' component, which is the matrix of coefficients. See
-#' summary.glm for more information.
+#' @param object A fitted MLlib model
+#' @return a list with 'devianceResiduals' and 'coefficients' components for gaussian family
+#' or a list with 'coefficients' component for binomial family. \cr
+#' For gaussian family: the 'devianceResiduals' gives the min/max deviance residuals
+#' of the estimation, the 'coefficients' gives the estimated coefficients and their
+#' estimated standard errors, t values and p-values. (It only available when model
+#' fitted by normal solver.) \cr
+#' For binomial family: the 'coefficients' gives the estimated coefficients.
+#' See summary.glm for more information. \cr
#' @rdname summary
#' @export
#' @examples