Skip to content

Commit fb66ce0

Browse files
committed
add comments
1 parent 083849c commit fb66ce0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/pkg/R/mllib_regression.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ setClass("IsotonicRegressionModel", representation(jobj = "jobj"))
101101
#' @seealso \link{glm}, \link{read.ml}
102102
setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
103103
function(data, formula, family = gaussian, tol = 1e-6, maxIter = 25, weightCol = NULL,
104-
regParam = 0.0, variancePower = 0.0, linkPower = 1.0) {
104+
regParam = 0.0, variancePower = 0.0, linkPower = 1.0 - variancePower) {
105105
if (is.character(family)) {
106-
# recover variancePower and linkPower from the specified tweedie family
106+
# create a pseudo family for tweedie to avoid family validation
107+
# only family name, variancePower and linkPower are used for the tweedie family
107108
if (tolower(family) == "tweedie") {
108109
family <- list(family = "tweedie", link = "identity")
109110
} else {

0 commit comments

Comments
 (0)