Github user yanboliang commented on a diff in the pull request: https://github.com/apache/spark/pull/16344#discussion_r93449402 --- Diff: mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala --- @@ -64,6 +64,27 @@ private[regression] trait GeneralizedLinearRegressionBase extends PredictorParam def getFamily: String = $(family) /** + * Param for the power in the variance function of the Tweedie distribution which provides + * the relationship between the variance and mean of the distribution. + * Used only for the tweedie family. + * (see <a href="https://en.wikipedia.org/wiki/Tweedie_distribution"> + * Tweedie Distribution (Wikipedia)</a>) + * Supported value: (1, 2) and (2, Inf). --- End diff -- Question: Why we don't allow ```0, 1 and 2```? They correspond respectively to ```Gaussian, Poisson and Gamma``` families, I think we should support fitting a poisson GLM via the ```tweedie``` family entrance and R can do it: ``` y <- rgamma(20,shape=5) x <- 1:20 glm(y~x,family=tweedie(var.power=1,link.power=1)) glm(y~x,family=poisson(link=identity)) ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org