From aeeb3f780be846641a3f38eb127fcba3e3387cb8 Mon Sep 17 00:00:00 2001 From: actuaryzhang Date: Wed, 8 Mar 2017 22:45:06 -0800 Subject: [PATCH] fix style --- R/pkg/R/mllib_regression.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/pkg/R/mllib_regression.R b/R/pkg/R/mllib_regression.R index 3f509f08ffd1b..885ae4ee82253 100644 --- a/R/pkg/R/mllib_regression.R +++ b/R/pkg/R/mllib_regression.R @@ -106,7 +106,7 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"), regParam = 0.0, variancePower = 0.0, linkPower = 1.0 - variancePower) { if (is.character(family)) { - # family = "tweedie" + # Handle when family = "tweedie" if (tolower(family) == "tweedie") { family <- list(family = "tweedie", link = "linkNotUsed") } else { @@ -120,7 +120,7 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"), print(family) stop("'family' not recognized") } - # family = statmod::tweedie() + # Handle when family = statmod::tweedie() if (tolower(family$family) == "tweedie" && !is.null(family$variance)) { variancePower <- log(family$variance(exp(1))) linkPower <- log(family$linkfun(exp(1)))