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-29363][MLLIB] Make o.a.s.regression.Regressor public #26033
Conversation
Test build #111805 has finished for PR 26033 at commit
|
Test build #111806 has finished for PR 26033 at commit
|
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.
For me, it looks reasonable because this makes Regressor
and RegressionModel
consistent in the same file.
cc @srowen , @viirya , @jiangxb1987
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.
Beside consistency, is there any benefit?
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.
Agree, I think this was an oversight.
Since SPARK-29363 is marked as an |
Ok. Sounds good. This is not a bug fix. I think we only need merging to master. |
Makes perfect sense @dongjoon-hyun, thank you! |
@viirya I believe there is (I tried to make this point in the linked JIRA, as well as somewhat related SPARK-29212), though I guess I am not that good in pointing that out.
Let's imagine for a moment I want to build ensemble learners. Clearly one for regression problem will expect different type of partial learners than one for classification problems: class EnsembleRegressor extends Estimator[EnsembleRegressor] with ... {
def setModels(learners: Array[Regressor]: this.type
...
}
class EnsembleClassifier extends Estimator[EnsembleClassifier] with ... {
def setModels(learners: Array[Classifier]): this.type
...
} So having these traits public, allows users to write more precise code, without hacks, like putting 3rd party code in Obviously benefits rather limited, as dynamic nature of |
Thank you @dongjoon-hyun, @srowen, @viirya. |
What changes were proposed in this pull request?
private[ml]
modifier fromRegressor
.Regressor
as@DeveloperApi
.Why are the changes needed?
Consistency with the rest of ML API as described in the corresponding JIRA ticket.
Does this PR introduce any user-facing change?
Yes, as described above.
How was this patch tested?
Existing tests.