Github user actuaryzhang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16729#discussion_r105576051
  
    --- Diff: R/pkg/R/mllib_regression.R ---
    @@ -100,6 +120,12 @@ setMethod("spark.glm", signature(data = 
"SparkDataFrame", formula = "formula"),
                   print(family)
                   stop("'family' not recognized")
                 }
    +            # Handle when family = statmod::tweedie()
    +            if (tolower(family$family) == "tweedie" && 
!is.null(family$variance)) {
    --- End diff --
    
    This part only handles the case when `statmod::tweedie` is specified: it 
retrieves the `var.power` and `link.power` and construct a list with family 
name and link name to be used. 
    The check for non-null `variance` is to skip handling the "fake" family. 
All we need when specifying `family = "tweedie"` is just a list with family 
name and link name. 


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to