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-8043][MLlib][Doc] update NaiveBayes and SVM examples in doc #6584

Closed
wants to merge 2 commits into from

Conversation

hhbyyh
Copy link
Contributor

@hhbyyh hhbyyh commented Jun 2, 2015

jira: https://issues.apache.org/jira/browse/SPARK-8043

I found some issues during testing the save/load examples in markdown Documents, as a part of 1.4 QA plan

@SparkQA
Copy link

SparkQA commented Jun 2, 2015

Test build #33982 has finished for PR 6584 at commit 2fb8b96.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -282,8 +277,8 @@ public class SVMClassifier {
System.out.println("Area under ROC = " + auROC);

// Save and load model
model.save(sc.sc(), "myModelPath");
SVMModel sameModel = SVMModel.load(sc.sc(), "myModelPath");
model.save(sc, "myModelPath");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think sc.sc() is required because save expects a SparkContext instead of JavaSparkContext. Though we should really overload it with JavaSparkContext.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi Xiangrui, the sc here seems to be an instance of SparkContext (refer to line 251). And the original code has compile error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see. We only use it in loadLibSVMFile. Thanks for catching this!

@SparkQA
Copy link

SparkQA commented Jun 3, 2015

Test build #34051 has finished for PR 6584 at commit a01a206.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

asfgit pushed a commit that referenced this pull request Jun 3, 2015
jira: https://issues.apache.org/jira/browse/SPARK-8043

I found some issues during testing the save/load examples in markdown Documents, as a part of 1.4 QA plan

Author: Yuhao Yang <[email protected]>

Closes #6584 from hhbyyh/naiveDocExample and squashes the following commits:

a01a206 [Yuhao Yang] fix for Gaussian mixture
2fb8b96 [Yuhao Yang] update NaiveBayes and SVM examples in doc

(cherry picked from commit 43adbd5)
Signed-off-by: Xiangrui Meng <[email protected]>
@asfgit asfgit closed this in 43adbd5 Jun 3, 2015
@mengxr
Copy link
Contributor

mengxr commented Jun 3, 2015

LGTM. Merged into master and branch-1.4. Thanks!

jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
jira: https://issues.apache.org/jira/browse/SPARK-8043

I found some issues during testing the save/load examples in markdown Documents, as a part of 1.4 QA plan

Author: Yuhao Yang <[email protected]>

Closes apache#6584 from hhbyyh/naiveDocExample and squashes the following commits:

a01a206 [Yuhao Yang] fix for Gaussian mixture
2fb8b96 [Yuhao Yang] update NaiveBayes and SVM examples in doc
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
jira: https://issues.apache.org/jira/browse/SPARK-8043

I found some issues during testing the save/load examples in markdown Documents, as a part of 1.4 QA plan

Author: Yuhao Yang <[email protected]>

Closes apache#6584 from hhbyyh/naiveDocExample and squashes the following commits:

a01a206 [Yuhao Yang] fix for Gaussian mixture
2fb8b96 [Yuhao Yang] update NaiveBayes and SVM examples in doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants