huaxingao commented on a change in pull request #27593:
[SPARK-30818][SPARKR][ML] Add SparkR LinearRegression wrapper
URL: https://github.com/apache/spark/pull/27593#discussion_r396690424
##########
File path: R/pkg/R/mllib_regression.R
##########
@@ -540,3 +546,145 @@ setMethod("write.ml", signature(object =
"AFTSurvivalRegressionModel", path = "c
function(object, path, overwrite = FALSE) {
write_internal(object, path, overwrite)
})
+
+#' Linear Regression Model
+#'
+#' \code{spark.lm} fits a linear regression model against a SparkDataFrame.
+#' Users can call \code{predict} to make
+#' predictions on new data, and \code{write.ml}/\code{read.ml} to save/load
fitted models.
+#'
+#' @param data a \code{SparkDataFrame} of observations and labels for model
fitting.
+#' @param formula a symbolic description of the model to be fitted. Currently
only a few formula
+#' operators are supported, including '~', '.', ':', '+', and
'-'.
+#' @param maxIter maximum iteration number.
+#' @param regParam the regularization parameter.
+#' @param elasticNetParam the ElasticNet mixing parameter, in range [0, 1].
+#' For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an
L1 penalty.
+#' @param tol convergence tolerance of iterations.
+#' @param standardization whether to standardize the training features before
fitting the model.
+#' @param weightCol weight column name.
+#' @param aggregationDepth suggested depth for treeAggregate (>= 2).
+#' @param loss the loss function to be optimized. Supported options:
"squaredError" and "huber"
+#' @param epsilon the shape parameter to control the amount of robustnes
Review comment:
super nit: ```robustnes``` -> ```robustness```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]