@@ -143,7 +143,7 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
143143# ' the result of a call to a family function. Refer R family at
144144# ' \url{https://stat.ethz.ch/R-manual/R-devel/library/stats/html/family.html}.
145145# ' Currently these families are supported: \code{binomial}, \code{gaussian},
146- # ' \code{poisson}, \code{Gamma}, and \code{tweedie} (\code{statmod} package) .
146+ # ' \code{poisson}, \code{Gamma}, and \code{" tweedie"} .
147147# ' @param weightCol the weight column name. If this is not set or \code{NULL}, we treat all instance
148148# ' weights as 1.0.
149149# ' @param epsilon positive convergence tolerance of iterations.
@@ -162,8 +162,10 @@ setMethod("spark.glm", signature(data = "SparkDataFrame", formula = "formula"),
162162# ' @note glm since 1.5.0
163163# ' @seealso \link{spark.glm}
164164setMethod ("glm ", signature(formula = "formula", family = "ANY", data = "SparkDataFrame"),
165- function (formula , family = gaussian , data , epsilon = 1e-6 , maxit = 25 , weightCol = NULL ) {
166- spark.glm(data , formula , family , tol = epsilon , maxIter = maxit , weightCol = weightCol )
165+ function (formula , family = gaussian , data , epsilon = 1e-6 , maxit = 25 , weightCol = NULL ,
166+ variancePower = 0.0 , linkPower = 1.0 - variancePower ) {
167+ spark.glm(data , formula , family , tol = epsilon , maxIter = maxit , weightCol = weightCol ,
168+ variancePower = 0.0 , linkPower = linkPower )
167169 })
168170
169171# Returns the summary of a model produced by glm() or spark.glm(), similarly to R's summary().
0 commit comments