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

    https://github.com/apache/spark/pull/15930#discussion_r88887331
  
    --- Diff: R/pkg/R/mllib.R ---
    @@ -303,9 +303,18 @@ setMethod("summary", signature(object = 
"GeneralizedLinearRegressionModel"),
                 } else {
                   dataFrame(callJMethod(jobj, "rDevianceResiduals"))
                 }
    -            coefficients <- matrix(coefficients, ncol = 4)
    -            colnames(coefficients) <- c("Estimate", "Std. Error", "t 
value", "Pr(>|t|)")
    -            rownames(coefficients) <- unlist(features)
    +            # If the underlying WeightedLeastSquares using "normal" 
solver, we can provide
    +            # coefficients, standard error of coefficients, t value and p 
value. Otherwise,
    +            # it will be fitted by local "l-bfgs", we can only provide 
coefficients.
    +            if (length(features) == length(coefficients)) {
    +              coefficients <- matrix(coefficients, ncol = 1)
    +              colnames(coefficients) <- c("Estimate")
    +              rownames(coefficients) <- unlist(features)
    +            } else {
    +              coefficients <- matrix(coefficients, ncol = 4)
    +              colnames(coefficients) <- c("Estimate", "Std. Error", "t 
value", "Pr(>|t|)")
    +              rownames(coefficients) <- unlist(features)
    +            }
    --- End diff --
    
    Updated.


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