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

    https://github.com/apache/spark/pull/20146#discussion_r160066219
  
    --- Diff: R/pkg/tests/fulltests/test_mllib_regression.R ---
    @@ -126,15 +134,15 @@ test_that("spark.glm summary", {
     
       out <- capture.output(print(stats))
       expect_match(out[2], "Deviance Residuals:")
    -  expect_true(any(grepl("AIC: 59.22", out)))
    +  expect_true(any(grepl("AIC: 35.84", out)))
    --- End diff --
    
    R glm's AIC: 35.839:
    ```R
    > out <- capture.output(print(rStats))
    > out
     [1] ""                                                                     
   
     [2] "Call:"                                                                
   
     [3] "glm(formula = Sepal.Width ~ Sepal.Length + Species, data = dataset)"  
   
     [4] ""                                                                     
   
     [5] "Deviance Residuals: "                                                 
   
     [6] "      1        2        3        4        5        6        7        
8  "
     [7] " 0.0000  -1.4932   1.5491   0.5411  -0.8581  -1.2228  -0.5969   
2.0809  "
     [8] ""                                                                     
   
     [9] "Coefficients:"                                                        
   
    [10] "                  Estimate Std. Error t value Pr(>|t|)"               
   
    [11] "(Intercept)         1.7150     2.0492   0.837    0.450"               
   
    [12] "Sepal.Length        0.1925     0.5566   0.346    0.747"               
   
    [13] "Speciesversicolor   1.7894     1.9240   0.930    0.405"               
   
    [14] "Speciesvirginica    1.2613     2.0735   0.608    0.576"               
   
    [15] ""                                                                     
   
    [16] "(Dispersion parameter for gaussian family taken to be 2.960032)"      
   
    [17] ""                                                                     
   
    [18] "    Null deviance: 14.719  on 7  degrees of freedom"                  
   
    [19] "Residual deviance: 11.840  on 4  degrees of freedom"                  
   
    [20] "AIC: 35.839"                                                          
   
    [21] ""                                                                     
   
    [22] "Number of Fisher Scoring iterations: 2"                               
   
    [23] ""                                                                     
   
    ```
    
      


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to