huaxingao commented on a change in pull request #25046:
[SPARK-28243][PYSPARK][ML] Remove setFeatureSubsetStrategy and
setSubsamplingRate from Python TreeEnsembleParams
URL: https://github.com/apache/spark/pull/25046#discussion_r305188816
##########
File path: python/pyspark/ml/classification.py
##########
@@ -1003,6 +996,49 @@ def setParams(self, featuresCol="features",
labelCol="label", predictionCol="pre
def _create_model(self, java_model):
return DecisionTreeClassificationModel(java_model)
+ def setMaxDepth(self, value):
+ """
+ Sets the value of :py:attr:`maxDepth`.
+ """
+ return self._set(maxDepth=value)
+
+ def setMaxBins(self, value):
+ """
+ Sets the value of :py:attr:`maxBins`.
+ """
+ return self._set(maxBins=value)
+
+ def setMinInstancesPerNode(self, value):
+ """
+ Sets the value of :py:attr:`minInstancesPerNode`.
+ """
+ return self._set(minInstancesPerNode=value)
+
+ def setMinInfoGain(self, value):
+ """
+ Sets the value of :py:attr:`minInfoGain`.
+ """
+ return self._set(minInfoGain=value)
+
+ def setMaxMemoryInMB(self, value):
+ """
+ Sets the value of :py:attr:`maxMemoryInMB`.
+ """
+ return self._set(maxMemoryInMB=value)
+
+ def setCacheNodeIds(self, value):
+ """
+ Sets the value of :py:attr:`cacheNodeIds`.
+ """
+ return self._set(cacheNodeIds=value)
+
+ @since("1.4.0")
Review comment:
I checked scala side, it has ```@since("1.4.0")``` for ```setImpurity```in
all the three Classifiers ```DecisionTreeClassifier.scala```,
```GBTClassifier.scala ``` and ```RandomForestClassifier.scala```. I think the
reason there is a ```@since("1.6.0")``` in ```TreeClassifierParams``` is
because ```Impurity``` was put in ```TreeClassifierParams``` in 1.6.0 (this is
the jira https://issues.apache.org/jira/browse/SPARK-10024), I guess we will
keep this ```@since("1.4.0")```?
----------------------------------------------------------------
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]