zhengruifeng commented on a change in pull request #25776: 
[SPARK-28985][PYTHON][ML] Add common classes 
(JavaPredictor/JavaClassificationModel/JavaProbabilisticClassifier) in PYTHON
URL: https://github.com/apache/spark/pull/25776#discussion_r324538000
 
 

 ##########
 File path: python/pyspark/ml/wrapper.py
 ##########
 @@ -361,3 +363,75 @@ def __init__(self, java_model=None):
             self._create_params_from_java()
 
             self._resetUid(java_model.uid())
+
+
+@inherit_doc
+class JavaPredictorParams(HasLabelCol, HasFeaturesCol, HasPredictionCol):
+    """
+    (Private) Trait for parameters for prediction (regression and 
classification)
+    """
+    pass
+
+
+@inherit_doc
+class JavaPredictor(JavaEstimator, JavaPredictorParams):
+    """
+    (Private) Java Estimator for prediction tasks (regression and 
classification).
+    """
+
+    @since("3.0.0")
+    def setLabelCol(self, value):
 
 Review comment:
   ditto, these methods are provided by `JavaPredictorParams`
   In the future, if we remove the automatically generated setter in code_gen, 
we can add them back.

----------------------------------------------------------------
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]

Reply via email to