Skip to content

Commit 528c928

Browse files
committed
[ML] Fix scala-2.10 build failure of GeneralizedLinearRegressionSuite.
## What changes were proposed in this pull request? Fix scala-2.10 build failure of ```GeneralizedLinearRegressionSuite```. ## How was this patch tested? Build with scala-2.10. Author: Yanbo Liang <[email protected]> Closes #18489 from yanboliang/glr.
1 parent 3c2fc19 commit 528c928

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mllib/src/test/scala/org/apache/spark/ml/regression/GeneralizedLinearRegressionSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ class GeneralizedLinearRegressionSuite
10751075
val seCoefR = Array(1.23439, 0.9669, 3.56866)
10761076
val tValsR = Array(0.80297, -0.65737, -0.06017)
10771077
val pValsR = Array(0.42199, 0.51094, 0.95202)
1078-
val dispersionR = 1
1078+
val dispersionR = 1.0
10791079
val nullDevianceR = 2.17561
10801080
val residualDevianceR = 0.00018
10811081
val residualDegreeOfFreedomNullR = 3
@@ -1114,7 +1114,7 @@ class GeneralizedLinearRegressionSuite
11141114
assert(x._1 ~== x._2 absTol 1E-3) }
11151115
summary.tValues.zip(tValsR).foreach{ x => assert(x._1 ~== x._2 absTol 1E-3) }
11161116
summary.pValues.zip(pValsR).foreach{ x => assert(x._1 ~== x._2 absTol 1E-3) }
1117-
assert(summary.dispersion ~== dispersionR absTol 1E-3)
1117+
assert(summary.dispersion === dispersionR)
11181118
assert(summary.nullDeviance ~== nullDevianceR absTol 1E-3)
11191119
assert(summary.deviance ~== residualDevianceR absTol 1E-3)
11201120
assert(summary.residualDegreeOfFreedom === residualDegreeOfFreedomR)
@@ -1190,7 +1190,7 @@ class GeneralizedLinearRegressionSuite
11901190
val seCoefR = Array(1.16826, 0.41703, 1.96249)
11911191
val tValsR = Array(-2.46387, 2.12428, -2.32757)
11921192
val pValsR = Array(0.01374, 0.03365, 0.01993)
1193-
val dispersionR = 1
1193+
val dispersionR = 1.0
11941194
val nullDevianceR = 22.55853
11951195
val residualDevianceR = 9.5622
11961196
val residualDegreeOfFreedomNullR = 3
@@ -1229,7 +1229,7 @@ class GeneralizedLinearRegressionSuite
12291229
assert(x._1 ~== x._2 absTol 1E-3) }
12301230
summary.tValues.zip(tValsR).foreach{ x => assert(x._1 ~== x._2 absTol 1E-3) }
12311231
summary.pValues.zip(pValsR).foreach{ x => assert(x._1 ~== x._2 absTol 1E-3) }
1232-
assert(summary.dispersion ~== dispersionR absTol 1E-3)
1232+
assert(summary.dispersion === dispersionR)
12331233
assert(summary.nullDeviance ~== nullDevianceR absTol 1E-3)
12341234
assert(summary.deviance ~== residualDevianceR absTol 1E-3)
12351235
assert(summary.residualDegreeOfFreedom === residualDegreeOfFreedomR)

0 commit comments

Comments
 (0)