-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-14479] [ML] GLM supports output link prediction #12287
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
Conversation
|
Test build #55480 has finished for PR 12287 at commit
|
|
Test build #55607 has finished for PR 12287 at commit
|
|
Test build #55609 has finished for PR 12287 at commit
|
|
Jenkins, test this please. |
|
Test build #55613 has finished for PR 12287 at commit
|
…t in SparkR:::glm * SparkR glm supports families and link functions which match R's signature for family. * SparkR glm API refactor. The comparative standard of the new API is R glm, so I only expose the arguments that R glm supports: ```formula, family, data, epsilon and maxit```. * This PR is focus on glm() and predict(), summary statistics will be done in a separate PR after this get in. * This PR depends on #12287 which make GLMs support link prediction at Scala side. After that merged, I will add more tests for predict() to this PR. Unit tests. cc mengxr jkbradley hhbyyh Author: Yanbo Liang <[email protected]> Closes #12294 from yanboliang/spark-12566.
| familyAndLink.fitted(eta) | ||
| } | ||
|
|
||
| protected def predictLink(features: Vector): Double = { |
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 could be a private method.
- Missing doc.
|
Made one pass. |
|
Test build #56347 has finished for PR 12287 at commit
|
| } | ||
| super.validateAndTransformSchema(schema, fitting, featuresDataType) | ||
| val newSchema = super.validateAndTransformSchema(schema, fitting, featuresDataType) | ||
| if ($(linkPredictionCol).nonEmpty) { |
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.
The check $(linkPredictionCol).nonEmpty can be omitted, because we already have empty check inside the next line function SchemaUtils.appendColumn. But these kinds of code can help developers to understand the logic clearly and they exist at lots of place in the code base. If we would like to omit them, I can do the clean up in a separate PR.
|
LGTM. Merged into master. Thanks! |
What changes were proposed in this pull request?
GLM supports output link prediction.
How was this patch tested?
unit test.