Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/14229#discussion_r74676054
--- Diff: R/pkg/R/mllib.R ---
@@ -299,6 +307,92 @@ setMethod("summary", signature(object =
"NaiveBayesModel"),
return(list(apriori = apriori, tables = tables))
})
+# Returns posterior probabilities from a Latent Dirichlet Allocation model
produced by spark.lda()
+
+#' @param newData A SparkDataFrame for testing
+#' @return \code{spark.posterior} returns a SparkDataFrame containing
posterior probabilities
+#' vectors named "topicDistribution"
+#' @rdname spark.lda
+#' @aliases spark.lda,spark.posterior,LDAModel-method,SparkDataFrame
+#' @export
+#' @note spark.posterior(LDAModel) since 2.1.0
+setMethod("spark.posterior", signature(object = "LDAModel", newData =
"SparkDataFrame"),
+ function(object, newData) {
+ return(dataFrame(callJMethod(object@jobj, "transform",
newData@sdf)))
+ })
+
+# Returns the summary of a Latent Dirichlet Allocation model produced by
\code{spark.lda}
+
+#' @param object A Latent Dirichlet Allocation model fitted by
\code{spark.lda}
+#' @return \code{summary} returns a list containing
+#' \code{docConcentration}, concentration parameter commonly named
\code{alpha} for the
--- End diff --
roxygen trims whitespaces - a list like this will be hard to read in
generated doc. try \item or \cr to format them
---
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]