-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-11551][DOC] Replace example code in ml-features.md using include_example #10219
Conversation
…ng include_example
…ng include_example
review result
…ng include_example
ok to test |
Test build #47413 has finished for PR 10219 at commit
|
Ping @mengxr, this is for SPARK-11551. Please sign it off if looks good to you. |
} | ||
} | ||
// scalastyle:on println | ||
|
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.
Trailing line
I notice some formatting quirks, especially for scala examples, otherwise it looks good. However, shouldn't we take advantage of this pr to standardize the output of the examples? |
@BenFradet It's reasonable. I'll modify them now. Thanks for the review. |
@BenFradet Does the code look good for you? |
Test build #47427 has finished for PR 10219 at commit
|
@yinxusen I'll have a look later today |
…de_example PR on behalf of somideshmukh, thanks! Author: Xusen Yin <yinxusen@gmail.com> Author: somideshmukh <somilde@us.ibm.com> Closes #10219 from yinxusen/SPARK-11551. (cherry picked from commit 051c6a0) Signed-off-by: Xiangrui Meng <meng@databricks.com>
Merged into master and branch-1.6. Thanks! |
DataFrame dctDf = dct.transform(df); | ||
dctDf.select("featuresDCT").show(3); | ||
{% endhighlight %} | ||
{% include_example java/org/apache/spark/examples/ml/JavaDCTExample.java %}} |
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.
Please remove the extra }
at the end.
DataFrame binarizedDataFrame = binarizer.transform(continuousDataFrame); | ||
DataFrame binarizedFeatures = binarizedDataFrame.select("binarized_feature"); | ||
for (Row r : binarizedFeatures.collect()) { | ||
Double binarized_value = r.getDouble(0); |
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.
indent
LGTM, except two minor comments. |
@BenFradet I'll change it in the follow-up PR #10193 |
PR on behalf of @somideshmukh, thanks!