[ML][docs][minor] Define LabeledDocument/Document classes in CV example#5135
[ML][docs][minor] Define LabeledDocument/Document classes in CV example#5135petro-rudenko wants to merge 2 commits into
Conversation
To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example.
|
Can one of the admins verify this patch? |
|
It seems reasonable, but adds a fair bit of code to the Java example. I'm not sure if the intent was that it be runnable, or simply illustrate a snippet of the core API usage. @mengxr |
|
I'm okay with this change, which makes the example self-contained and hence users can try it out easily. |
|
add to whitelist |
|
ok to test |
|
Test build #29051 has started for PR 5135 at commit
|
|
Test build #29051 has finished for PR 5135 at commit
|
|
Test PASSed. |
|
Test build #29088 has started for PR 5135 at commit
|
|
Test build #29088 has finished for PR 5135 at commit
|
|
Test PASSed. |
There was a problem hiding this comment.
OK so this is intentionally duplicated from the example above? I guess that's reasonable since the point is to be self-contained, and I don't imagine there's a lot of maintenance overhead in trying to evolve both copies together.
There was a problem hiding this comment.
Yes it's annoying when copy/pasting a bunch of code into spark shell and it fails because these classes are not declared.
To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example. Author: Peter Rudenko <petro.rudenko@gmail.com> Closes #5135 from petro-rudenko/patch-3 and squashes the following commits: 5190c75 [Peter Rudenko] Fix primitive types for java examples. 1d35383 [Peter Rudenko] [SQL][docs][minor] Define LabeledDocument/Document classes in CV example (cherry picked from commit 08d4528) Signed-off-by: Sean Owen <sowen@cloudera.com>
To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example.