Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
actuaryzhang committed Mar 9, 2017
1 parent 5ce4c84 commit aeeb3f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/pkg/R/mllib_regression.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)))
Expand Down

0 comments on commit aeeb3f7

Please sign in to comment.