viirya commented on a change in pull request #26838: [SPARK-30144][ML][PySpark]
Make MultilayerPerceptronClassificationModel extend MultilayerPerceptronParams
URL: https://github.com/apache/spark/pull/26838#discussion_r358509123
##########
File path: python/pyspark/ml/classification.py
##########
@@ -2274,21 +2276,21 @@ def setSolver(self, value):
return self._set(solver=value)
-class
MultilayerPerceptronClassificationModel(JavaProbabilisticClassificationModel,
JavaMLWritable,
+class
MultilayerPerceptronClassificationModel(JavaProbabilisticClassificationModel,
+ _MultilayerPerceptronParams,
JavaMLWritable,
JavaMLReadable):
"""
Model fitted by MultilayerPerceptronClassifier.
.. versionadded:: 1.6.0
"""
- @property
- @since("1.6.0")
- def layers(self):
+ @since("3.0.0")
+ def setLayers(self, value):
Review comment:
hmm, the setter in Scala is also only used when loading old model. I think
the setter is useless in the trained model. We should have other way to load
the params into the model. Exposing such setter (in Scala or Python) just
because of loading old model internally looks weird to me.
----------------------------------------------------------------
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]