Skip to content

Commit 0688aa4

Browse files
committed
fix Gamma
1 parent 3403567 commit 0688aa4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/pkg/R/mllib_regression.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
106106
weightCol <- ""
107107
}
108108

109+
# For known families, Gamma is upper-cased
109110
jobj <- callJStatic("org.apache.spark.ml.r.GeneralizedLinearRegressionWrapper",
110-
"fit", formula, data@sdf, family$family, family$link,
111+
"fit", formula, data@sdf, tolower(family$family), family$link,
111112
tol, as.integer(maxIter), as.character(weightCol), regParam)
112113
new("GeneralizedLinearRegressionModel", jobj = jobj)
113114
})

0 commit comments

Comments
 (0)