imatiach-msft commented on a change in pull request #23682: 
[SPARK-19591][ML][MLlib][FOLLOWUP] Add sample weights to decision trees - fix 
tolerance
URL: https://github.com/apache/spark/pull/23682#discussion_r251899651
 
 

 ##########
 File path: 
mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala
 ##########
 @@ -1050,8 +1050,12 @@ private[spark] object RandomForest extends Logging with 
Serializable {
       // Calculate the expected number of samples for finding splits
       val weightedNumSamples = samplesFractionForFindSplits(metadata) *
         metadata.weightedNumExamples
+      // scale tolerance by number of samples with constant factor
+      // Note: constant factor was tuned by running some tests where there 
were no zero
+      // feature values and validating we are never within tolerance
+      val factor = 100
 
 Review comment:
   done!  removed variable

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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