sarutak commented on a change in pull request #32673:
URL: https://github.com/apache/spark/pull/32673#discussion_r640426186



##########
File path: 
mllib/src/test/scala/org/apache/spark/ml/optim/aggregator/DifferentiableLossAggregatorSuite.scala
##########
@@ -149,10 +152,43 @@ object DifferentiableLossAggregatorSuite {
 
     override def add(instance: Instance): TestAggregator = {
       val error = instance.label - BLAS.dot(coefficients, instance.features)
-      weightSum += instance.weight
-      lossSum += instance.weight * error * error / 2.0
-      (0 until dim).foreach { j =>
-        gradientSumArray(j) += instance.weight * error * instance.features(j)
+      val mathCls = Utils.classForName("java.lang.Math")

Review comment:
       O.K. Changed to use `~==`.




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to