Skip to content
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

Closed
wants to merge 12 commits into from

Conversation

rishabhbhardwaj
Copy link
Contributor

I have made the required changes in mllib-naive-bayes.md/mllib-isotonic-regression.md and also verified them.
Kindle Review it.

@mengxr
Copy link
Contributor

mengxr commented Oct 29, 2015

ok to test

@mengxr
Copy link
Contributor

mengxr commented Oct 29, 2015

@yinxusen Could you help review this PR?


public class JavaIsotonicRegressionExample {

public static void main(String[] args) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mengxr
Copy link
Contributor

mengxr commented Oct 29, 2015

@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.

@SparkQA
Copy link

SparkQA commented Oct 29, 2015

Test build #44607 has finished for PR 9353 at commit f40fcc1.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@rishabhbhardwaj
Copy link
Contributor Author

@mengxr Thanks for your comments.I have corrected the code style issues and locally ran the style checks and they passed.

@rishabhbhardwaj
Copy link
Contributor Author

Jenkins test this please

@SparkQA
Copy link

SparkQA commented Oct 29, 2015

Test build #44617 has finished for PR 9353 at commit d9c143e.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@yinxusen
Copy link
Contributor

@rishabhbhardwaj Please update the title with more specific infomation.

@rishabhbhardwaj rishabhbhardwaj changed the title [SPARK-11383][Docs] Replaced example code in mllib using include_example [SPARK-11383][Docs] Replaced example code in mllib-naive-bayes.md/mllib-isotonic-regression.md using include_example Oct 29, 2015

"""
Isotonic Regression Example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the empty line

@SparkQA
Copy link

SparkQA commented Oct 29, 2015

Test build #44620 has finished for PR 9353 at commit 11804bb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@SparkQA
Copy link

SparkQA commented Oct 29, 2015

Test build #44623 has finished for PR 9353 at commit 256fb3a.

  • This patch fails Python style tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@SparkQA
Copy link

SparkQA commented Oct 29, 2015

Test build #44628 has finished for PR 9353 at commit d1f5afd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@rishabhbhardwaj
Copy link
Contributor Author

@yinxusen Thanks for your comments.

{% highlight python %}
import math
from pyspark.mllib.regression import IsotonicRegression, IsotonicRegressionModel
{% include_example python/mllib/isotonic_regression_example.py %}

Copy link
Contributor

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.

@yinxusen
Copy link
Contributor

@mengxr This pr LGTM, except for some blank lines.

@SparkQA
Copy link

SparkQA commented Oct 30, 2015

Test build #44653 has finished for PR 9353 at commit b4a64a2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@rishabhbhardwaj
Copy link
Contributor Author

@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$
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented Oct 30, 2015

Test build #44668 has finished for PR 9353 at commit 331eab2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):\n * public class JavaIsotonicRegressionExample\n * public class JavaNaiveBayesExample\n

@rishabhbhardwaj
Copy link
Contributor Author

@mengxr Thanks for your comments and patience.I have made the required changes.

@asfgit asfgit closed this in 2804674 Nov 2, 2015
@rishabhbhardwaj rishabhbhardwaj deleted the SPARK-11383 branch November 28, 2015 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants