huaxingao commented on a change in pull request #27254: 
[SPARK-30543][ML][PYSPARK][R] RandomForest add Param bootstrap to control 
sampling method
URL: https://github.com/apache/spark/pull/27254#discussion_r368092514
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/GradientBoostedTrees.scala
 ##########
 @@ -311,6 +311,7 @@ private[spark] object GradientBoostedTrees extends Logging 
{
     val validationTol = boostingStrategy.validationTol
     treeStrategy.algo = OldAlgo.Regression
     treeStrategy.impurity = OldVariance
+    require(!treeStrategy.bootstrap, "GradientBoostedTrees does not need 
bootstrap sampling")
 
 Review comment:
   can we do this checking inside next line ```treeStrategy.assertValid()```?

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