-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-16140][MLlib][SparkR][Docs] Group k-means method in generated R doc #13921
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
Conversation
Test build #61294 has finished for PR 13921 at commit
|
@junyangq Could you help review this PR? Thanks! |
It would be better to group write.ml (KM) into the doc as well. Also please include a full screenshot of the doc page. |
#' | ||
#' # save fitted model to input path | ||
#' path <- "path/to/model" | ||
#' write.ml(model, path) |
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.
hi @junyangq , isn't it write.ml (KM)
you are talking about?
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.
Yes, can you modify the doc of write.ml method for KM to bring it to the same page as other KM methods?
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.
oh sorry I see what you mean now, you mean bring it to the Usage
section of this page, right? I'll try to do it
I just updated the screenshot in PR description |
Test build #61328 has finished for PR 13921 at commit
|
That looks better now. Two more comments
|
could you please be more specific on I'm removing the duplicate arguments now |
@@ -266,9 +266,9 @@ setMethod("summary", signature(object = "NaiveBayesModel"), | |||
return(list(apriori = apriori, tables = tables)) | |||
}) | |||
|
|||
#' Fit a k-means model | |||
#' K-Means Model |
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.
K-Means Clustering Model
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.
sorry I actually meant the description could be more like plain sentences, rather than bullet points.
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.
This appears as the title, like in Generalized Linear Models
.
@keypointt For quicker tests, you can run |
Test build #61331 has finished for PR 13921 at commit
|
Test build #61332 has finished for PR 13921 at commit
|
I just merged #13927. So please fetch and merge the latest master if you want to push an update to avoid merge conflict (hopefully none). |
Test build #61347 has finished for PR 13921 at commit
|
OK doing it now |
Test build #61348 has finished for PR 13921 at commit
|
I think the error was because this PR left cc: @yinxusen |
hi @mengxr I tried to modifiy in generics.R
tried many different ways but still not working, since I'm not familiar with R docs, maybe here I need your help so that it's not blocking the other tickets. How to add |
@keypointt You need to add titles for #' This is a title for write.ml
#' @rdname write.ml
#' @export
setGeneric("write.ml", function(object, path, ...) { standardGeneric("write.ml") }) |
oh I see, thanks a lot |
Test build #61388 has finished for PR 13921 at commit
|
Actually don't do this?
it will create a dummy page with no content for write.ml. And generally we don't put more than @Rdname and @export in generics.R - it is harder to manage from there. I also was thinking about the discoverability of "write.ml", "predict" and so on in the doc. I think it is better to have full page for "write.ml" and then link to write.ml(KM), write.ml(GLM) etc from there. |
I vote for dis-coverability of "write.ml", "predict" |
And to elaborate, the reason why it is complaining is because the line in generics.R is the only reference to @Rdname write.ml. To fix, you could either change that to @Rdname spark.kmeans (which doesn't make sense because there are multiple implementation of write.ml for different model), or have an actual @Rdname write.ml block in mllib.R - this also helps to redirect to pages on other mllib models in the event someone is looking for write.ml and doesn't know to look in spark.kmeans for write.ml. |
if we are to have an actual @Rdname write.ml block in mllib.R, then it has to be enforced to all documentation stories under https://issues.apache.org/jira/browse/SPARK-16090, to remove individual I just notice that
|
@keypointt Could you add @felixcheung I think it is useful to have a page for the generic |
Test build #61410 has finished for PR 13921 at commit
|
The grouping of k-means methods LGTM. So I'm merging this into master and branch-2.0 and leave the remaining issues to SPARK-16144. Thanks! |
…R doc https://issues.apache.org/jira/browse/SPARK-16140 ## What changes were proposed in this pull request? Group the R doc of spark.kmeans, predict(KM), summary(KM), read/write.ml(KM) under Rd spark.kmeans. The example code was updated. ## How was this patch tested? Tested on my local machine And on my laptop `jekyll build` is failing to build API docs, so here I can only show you the html I manually generated from Rd files, with no CSS applied, but the doc content should be there.  Author: Xin Ren <iamshrek@126.com> Closes #13921 from keypointt/SPARK-16140. (cherry picked from commit 8c9cd0a) Signed-off-by: Xiangrui Meng <meng@databricks.com>
## What changes were proposed in this pull request? From SPARK-16140/PR #13921 - the issue is we left write.ml doc empty:  Here's what I meant as the fix:   I didn't realize there was already a JIRA on this. mengxr yanboliang ## How was this patch tested? check doc generated. Author: Felix Cheung <felixcheung_m@hotmail.com> Closes #13993 from felixcheung/rmllibdoc. (cherry picked from commit 7f38b9d) Signed-off-by: Shivaram Venkataraman <shivaram@cs.berkeley.edu>
## What changes were proposed in this pull request? From SPARK-16140/PR #13921 - the issue is we left write.ml doc empty:  Here's what I meant as the fix:   I didn't realize there was already a JIRA on this. mengxr yanboliang ## How was this patch tested? check doc generated. Author: Felix Cheung <felixcheung_m@hotmail.com> Closes #13993 from felixcheung/rmllibdoc.
https://issues.apache.org/jira/browse/SPARK-16140
What changes were proposed in this pull request?
Group the R doc of spark.kmeans, predict(KM), summary(KM), read/write.ml(KM) under Rd spark.kmeans. The example code was updated.
How was this patch tested?
Tested on my local machine
And on my laptop
jekyll build
is failing to build API docs, so here I can only show you the html I manually generated from Rd files, with no CSS applied, but the doc content should be there.