-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[MINOR]Correct validateAndTransformSchema in GaussianMixture and AFTSurvivalRegression #18980
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
|
Yeah I think you're right. There's a similar issue in |
|
+1 @srowen, this is a bug. |
|
I just fixed AFTSurvivalRegression also. |
| SchemaUtils.checkColumnType(schema, $(featuresCol), new VectorUDT) | ||
| SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) | ||
| SchemaUtils.appendColumn(schema, $(probabilityCol), new VectorUDT) | ||
| val schema_temp = SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) |
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.
Tiny nit: Java/Scala use camelCase var names. Maybe call this withPredictionCol or something, as it's more descriptive anyway.
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.
My bad! Just committed with more descriptive variables in camelCase. Thanks
|
I started tests. One last request, start the title with |
|
Test build #3892 has finished for PR 18980 at commit
|
|
Actually, on second thought, we should make a JIRA for this and link it. It's a non-trivial bug fix. I can do that if you're busy, but feel free to. I'll merge it soon anyway |
|
As I am fairly new to JIRA, feel free to do that if you can. Thanks! |
…SurvivalRegression ## What changes were proposed in this pull request? The line SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) did not modify the variable schema, hence only the last line had any effect. A temporary variable is used to correctly append the two columns predictionCol and probabilityCol. ## How was this patch tested? Manually. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Cédric Pelvet <[email protected]> Closes #18980 from sharp-pixel/master. (cherry picked from commit 73e04ec) Signed-off-by: Sean Owen <[email protected]>
…SurvivalRegression ## What changes were proposed in this pull request? The line SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) did not modify the variable schema, hence only the last line had any effect. A temporary variable is used to correctly append the two columns predictionCol and probabilityCol. ## How was this patch tested? Manually. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Cédric Pelvet <[email protected]> Closes #18980 from sharp-pixel/master. (cherry picked from commit 73e04ec) Signed-off-by: Sean Owen <[email protected]>
|
Merged to master/2.2/2.1 |
…SurvivalRegression ## What changes were proposed in this pull request? The line SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) did not modify the variable schema, hence only the last line had any effect. A temporary variable is used to correctly append the two columns predictionCol and probabilityCol. ## How was this patch tested? Manually. Please review http://spark.apache.org/contributing.html before opening a pull request. Author: Cédric Pelvet <[email protected]> Closes apache#18980 from sharp-pixel/master. (cherry picked from commit 73e04ec) Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
The line SchemaUtils.appendColumn(schema, $(predictionCol), IntegerType) did not modify the variable schema, hence only the last line had any effect. A temporary variable is used to correctly append the two columns predictionCol and probabilityCol.
How was this patch tested?
Manually.
Please review http://spark.apache.org/contributing.html before opening a pull request.