[SPARK-30533][ML][PYSPARK] Add classes to represent Java Regressors and RegressionModels#27241
[SPARK-30533][ML][PYSPARK] Add classes to represent Java Regressors and RegressionModels#27241zero323 wants to merge 2 commits intoapache:masterfrom
Conversation
|
Test build #116868 has finished for PR 27241 at commit
|
|
Test build #116869 has finished for PR 27241 at commit
|
srowen
left a comment
There was a problem hiding this comment.
Is this more for symmetry than anything else? I don't have a strong opinion. I'd defer to @huaxingao and @zhengruifeng who have been watching this much more closely.
To some extent. In general it useful to be able to distinguish between |
|
Looks reasonable |
|
I think on scala side, it makes more sense to make all Regression classes extend Regressor, because the Regressor class is already there and some of the Regression classes already implement Regressor, so it's better to make all Regression classes follow the same standard. But I am not so sure about python side: the Regressor class is basically empty and I am not sure if we should add another layer of abstraction, so I chose not to add Regressor/Regressor class on python side when I did #27168. But I know you can argue that we need change python too to keep the parity between scala and python. I am OK either way. |
I am actually not that interested in parity (as it is right now it provides little or no value to the end user, inflates
I am afraid that's, for good or bad, argument you can make against significant chunk of the API. |
|
LGTM |
|
Merged to master |
|
Thanks @huaxingao @srowen @zhengruifeng |
What changes were proposed in this pull request?
This PR adds:
pyspark.ml.regression.JavaRegressorpyspark.ml.regression.JavaRegressionModelclasses and replaces
JavaPredictorandJavaPredictionModelinLinearRegression/LinearRegressionModelDecisionTreeRegressor/DecisionTreeRegressionModel(just addition asJavaPredictionModelhasn't been used)RandomForestRegressor/RandomForestRegressionModel(just addition asJavaPredictionModelhasn't been used)GBTRegressor/GBTRegressionModel(just addition asJavaPredictionModelhasn't been used)AFTSurvivalRegression/AFTSurvivalRegressionModelGeneralizedLinearRegression/GeneralizedLinearRegressionModelFMRegressor/FMRegressionModelWhy are the changes needed?
Does this PR introduce any user-facing change?
It adds new base classes, so it will affect
mro. Otherwise interfaces should stay intact.How was this patch tested?
Existing tests.