New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-16446] [SparkR] [ML] Gaussian Mixture Model wrapper in SparkR #14392
Conversation
Test build #62968 has finished for PR 14392 at commit
|
Test build #63004 has finished for PR 14392 at commit
|
#' @rdname spark.mvnormalmixEM | ||
#' @name spark.mvnormalmixEM | ||
#' @export | ||
#' @examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps a @Seealso to R mvnormalmixEM?
ah - I see it below, nit: could you more that up?
Test build #63082 has finished for PR 14392 at commit
|
Test build #63124 has finished for PR 14392 at commit
|
@felixcheung @junyangq Any thoughts? |
btw, I think it'll be great to get some feedback on the naming of this. |
Yeah I am not sure |
@felixcheung @shivaram @junyangq I changed the name to |
Test build #63771 has finished for PR 14392 at commit
|
|
#' @export | ||
setGeneric("spark.gaussianMixture", | ||
function(data, formula, ...) { | ||
standardGeneric("spark.gaussianMixture") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it fit one line, like the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can not fit one line, since lint-r
requires lines should not be more than 100 characters.
Test build #63825 has finished for PR 14392 at commit
|
Test build #63827 has finished for PR 14392 at commit
|
#' @param object A fitted gaussian mixture model | ||
#' @return \code{summary} returns the model's lambda, mu, sigma and posterior | ||
#' @param object a fitted gaussian mixture model. | ||
#' @param ... additional argument(s) passed to the method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say "Currently not used" instead for this case.
only one last comment, LGTM. |
Test build #63836 has finished for PR 14392 at commit
|
Sorry for being late. I would vote for |
#' @examples | ||
#' \dontrun{ | ||
#' sparkR.session() | ||
#' library(mvtnorm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be concerned about the fact that the package is not in the package dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like it's only needed to build sample data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I think it's OK since users can load other library in SparkR session, and this is not necessary if users have their own dataset.
0.1641373, -0.1673806, -0.1673806, 0.7508951) | ||
expect_equal(stats$lambda, rLambda) | ||
expect_equal(as.vector(unlist(stats$mu)), rMu, tolerance = 1e-3) | ||
expect_equal(as.vector(unlist(stats$sigma)), rSigma, tolerance = 1e-3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Test build #63923 has finished for PR 14392 at commit
|
2f8930e
to
da464f9
Compare
Test build #63925 has finished for PR 14392 at commit
|
Test build #63927 has finished for PR 14392 at commit
|
@felixcheung @shivaram I resolved the merge conflicts. Please let me know whether it's ok to go. Since this involves changes of many files and it's hard to solve conflicts, it's better we can have a high priority to get this in. Thanks! |
LGTM. Merged into master. Thanks! |
What changes were proposed in this pull request?
Gaussian Mixture Model wrapper in SparkR, similarly to R's
mvnormalmixEM
.How was this patch tested?
Unit test.