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-11383][Docs] Replaced example code in mllib-naive-bayes.md/mllib-isotonic-regression.md using include_example #9353
Conversation
…b-isotonic-regression.md using include_example
ok to test |
@yinxusen Could you help review this PR? |
|
||
public class JavaIsotonicRegressionExample { | ||
|
||
public static void main(String[] args) { |
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 use 2-space indentation. Check https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide.
@rishabhbhardwaj Thanks for working on this! I saw some code style issues in your code. You might want to check the Spark Code Style guide first at https://cwiki.apache.org/confluence/display/SPARK/Spark+Code+Style+Guide. |
Test build #44607 has finished for PR 9353 at commit
|
@mengxr Thanks for your comments.I have corrected the code style issues and locally ran the style checks and they passed. |
Jenkins test this please |
Test build #44617 has finished for PR 9353 at commit
|
@rishabhbhardwaj Please update the title with more specific infomation. |
|
||
""" | ||
Isotonic Regression Example. | ||
|
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.
remove the empty line
Test build #44620 has finished for PR 9353 at commit
|
Test build #44623 has finished for PR 9353 at commit
|
Test build #44628 has finished for PR 9353 at commit
|
@yinxusen Thanks for your comments. |
{% highlight python %} | ||
import math | ||
from pyspark.mllib.regression import IsotonicRegression, IsotonicRegressionModel | ||
{% include_example python/mllib/isotonic_regression_example.py %} | ||
|
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.
empty line is no need, pls remove it.
@mengxr This pr LGTM, except for some blank lines. |
Test build #44653 has finished for PR 9353 at commit
|
@yinxusen I have removed the empty lines.Thanks for the comments. |
import org.apache.spark.api.java.function.PairFunction; | ||
import org.apache.spark.api.java.JavaDoubleRDD; | ||
import org.apache.spark.api.java.JavaPairRDD; | ||
// $example off$ |
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 is not necessary. See discussion at https://issues.apache.org/jira/browse/SPARK-11337. You can include all imports in a single block or move unused imports to a separate group. We only need to keep imports ordered in each group. Use empty lines to separate import groups.
Test build #44668 has finished for PR 9353 at commit
|
@mengxr Thanks for your comments and patience.I have made the required changes. |
I have made the required changes in mllib-naive-bayes.md/mllib-isotonic-regression.md and also verified them.
Kindle Review it.