huaxingao commented on issue #25776: [SPARK-28985][PYTHON][ML] Add common classes (JavaPredictor/JavaClassificationModel/JavaProbabilisticClassifier) in PYTHON URL: https://github.com/apache/spark/pull/25776#issuecomment-532350886 @srowen Thanks for your comments. Yes, seems these ```models``` in python didn't have any getters/setters for the column names before. Also, the python ```models``` didn't have a ```predict``` method before (the scala models do). Seems to me that the python users was not able to call the ```predict``` method to predict label for the given features. If users needed to get the predictionCol, they would call ``` model.transform,``` and then get the predictionCol from the transform output. This PR adds both setters/getters to the python ```models```. After we remove setters generated by _shared_params_code_gen.py in next PR for jira https://issues.apache.org/jira/browse/SPARK-29093, we can control which setters to allow on the ```models```. I initially thought we will not allow setters for python ```models```, but I looked scala code again, seems most of the setters are allowed for scala ```models```. I guess we will match scala code exactly.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
