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

    https://github.com/apache/spark/pull/16344#discussion_r97227237
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala
 ---
    @@ -1052,6 +1217,120 @@ class GeneralizedLinearRegressionSuite
         assert(summary.solver === "irls")
       }
     
    +  test("glm summary: tweedie family with weight") {
    +    /*
    +      R code:
    +
    +      library(statmod)
    +      df <- as.data.frame(matrix(c(
    +        1.0, 1.0, 0.0, 5.0,
    +        0.5, 2.0, 1.0, 2.0,
    +        1.0, 3.0, 2.0, 1.0,
    +        0.0, 4.0, 3.0, 3.0), 4, 4, byrow = TRUE))
    +
    +      f <- glm(V1 ~ -1 + V3 + V4, data = df, weights = V2,
    +          family = tweedie(var.power = 1.6, link.power = 0))
    +
    +      Deviance Residuals:
    +            1        2        3        4
    +       0.6210  -0.0515   1.6935  -3.2539
    +
    +      Coefficients:
    +         Estimate Std. Error t value Pr(>|t|)
    +      V3  -0.4087     0.5205  -0.785    0.515
    +      V4  -0.1212     0.4082  -0.297    0.794
    +
    +      (Dispersion parameter for Tweedie family taken to be 3.830036)
    +
    +          Null deviance: 20.702  on 4  degrees of freedom
    +      Residual deviance: 13.844  on 2  degrees of freedom
    +      AIC: NA
    +
    +      Number of Fisher Scoring iterations: 11
    +
    +      residuals(model, type="pearson")
    --- End diff --
    
    Typos here? I guess you paste irrelevant results for the following 
```residuals```, they should be consistent with L1279-L1281.


---
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