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

    https://github.com/apache/spark/pull/16464#discussion_r96035584
  
    --- Diff: R/pkg/R/mllib_clustering.R ---
    @@ -404,11 +411,14 @@ setMethod("summary", signature(object = "LDAModel"),
                 vocabSize <- callJMethod(jobj, "vocabSize")
                 topics <- dataFrame(callJMethod(jobj, "topics", 
maxTermsPerTopic))
                 vocabulary <- callJMethod(jobj, "vocabulary")
    +            trainingLogLikelihood <- callJMethod(jobj, 
"trainingLogLikelihood")
    +            logPrior <- callJMethod(jobj, "logPrior")
    --- End diff --
    
    My take is the convention in R for missing values in a structure (list, 
data.frame) is `NA`.
    And since we are returning a list we could also simply omit it if the value 
is not applicable or available. (ie. don't add `trainingLogLikelihood` to the 
list in L421)
    
    In any case, what does it look like when printing the `summary` returned 
here for these values (NULL, NA) we are proposing?



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

Reply via email to