zhengruifeng commented on a change in pull request #27097: 
[SPARK-9478][ML][PYSPARK] Add sample weights to Random Forest
URL: https://github.com/apache/spark/pull/27097#discussion_r364090059
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/ml/classification/RandomForestClassifier.scala
 ##########
 @@ -69,6 +67,10 @@ class RandomForestClassifier @Since("1.4.0") (
   @Since("1.4.0")
   def setMinInstancesPerNode(value: Int): this.type = set(minInstancesPerNode, 
value)
 
+  /** @group setParam */
+  @Since("3.0.0")
+  def setMinWeightFractionPerNode(value: Double): this.type = 
set(minWeightFractionPerNode, value)
 
 Review comment:
   the `minWeightFractionPerNode` is a fraction, so it is in range [0, 1],
   above `metadata.minWeightPerNode` = `minWeightFractionPerNode` * 
SumOfWeights.
   
   this param was first added in 
https://github.com/apache/spark/pull/21632/files, I am neutral on it.

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