Skip to content

Conversation

@hhbyyh
Copy link
Contributor

@hhbyyh hhbyyh commented Dec 2, 2015

jira: https://issues.apache.org/jira/browse/SPARK-11605
Check Java compatibility for MLlib for this release.

fix:

  1. StreamingTest.registerStream needs java friendly interface.
  2. GradientBoostedTreesModel.computeInitialPredictionAndError and GradientBoostedTreesModel.updatePredictionError has java compatibility issue. Mark them as developerAPI.

TBD:
[updated] no fix for now per discussion.
org.apache.spark.mllib.classification.LogisticRegressionModel
public scala.Option<java.lang.Object> getThreshold(); has wrong return type for Java invocation.
SVMModel has the similar issue.

Yet adding a scala.Option<java.util.Double> getThreshold() would result in an overloading error due to the same function signature. And adding a new function with different name seems to be not necessary.

cc @jkbradley @feynmanliang

@SparkQA
Copy link

SparkQA commented Dec 2, 2015

Test build #47060 has finished for PR 10102 at commit 5550a97.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be Int to support multiClass sample data, right?

Copy link
Member

Choose a reason for hiding this comment

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

This was not part of the design, but I agree it would be nice someday. I'll ping @mengxr since he reviewed the original PRs, but I think we'll keep it as is for now.

@jkbradley
Copy link
Member

I'll take a look now

@jkbradley
Copy link
Member

I wouldn't worry about the getThreshold issue. I haven't seen users complain about it, and they will hopefully switch over to the spark.ml API anyways.

Can you please modify the old registerStream taking tuples to use BinarySample as well? We should be consistent across Scala and Java.

Copy link
Member

Choose a reason for hiding this comment

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

organize imports

@SparkQA
Copy link

SparkQA commented Dec 8, 2015

Test build #47316 has finished for PR 10102 at commit 5077aa7.

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

@hhbyyh
Copy link
Contributor Author

hhbyyh commented Dec 8, 2015

hudson.plugins.git.GitException: Failed to fetch from https://github.com/apache/spark.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)

need a retest

@hhbyyh
Copy link
Contributor Author

hhbyyh commented Dec 8, 2015

@jkbradley Thanks for the review. Updated.

@jkbradley
Copy link
Member

Thank you for updating! LGTM pending tests.

@SparkQA
Copy link

SparkQA commented Dec 8, 2015

Test build #2185 has finished for PR 10102 at commit 5ef6ff8.

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

@jkbradley
Copy link
Member

Merging with master and branch-1.6

asfgit pushed a commit that referenced this pull request Dec 8, 2015
jira: https://issues.apache.org/jira/browse/SPARK-11605
Check Java compatibility for MLlib for this release.

fix:

1. `StreamingTest.registerStream` needs java friendly interface.

2. `GradientBoostedTreesModel.computeInitialPredictionAndError` and `GradientBoostedTreesModel.updatePredictionError` has java compatibility issue. Mark them as `developerAPI`.

TBD:
[updated] no fix for now per discussion.
`org.apache.spark.mllib.classification.LogisticRegressionModel`
`public scala.Option<java.lang.Object> getThreshold();` has wrong return type for Java invocation.
`SVMModel` has the similar issue.

Yet adding a `scala.Option<java.util.Double> getThreshold()` would result in an overloading error due to the same function signature. And adding a new function with different name seems to be not necessary.

cc jkbradley feynmanliang

Author: Yuhao Yang <hhbyyh@gmail.com>

Closes #10102 from hhbyyh/javaAPI.

(cherry picked from commit 5cb4695)
Signed-off-by: Joseph K. Bradley <joseph@databricks.com>
@asfgit asfgit closed this in 5cb4695 Dec 8, 2015
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