Skip to content

Commit 76e5b0f

Browse files
committed
removed unnecessary sort from test
1 parent 0313c0c commit 76e5b0f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ class NaiveBayesSuite extends FunSuite with MLlibTestSparkContext {
9595
assert(closeFit(math.exp(piData(i._2)), math.exp(model.pi(i._1)), 0.05))
9696
}
9797
for (i <- modelIndex) {
98-
val sortedData = thetaData(i._2).sorted
99-
val sortedModel = model.theta(i._1).sorted
100-
for (j <- 0 until sortedData.length) {
101-
assert(closeFit(math.exp(sortedData(j)), math.exp(sortedModel(j)), 0.05))
98+
for (j <- 0 until thetaData(i._2).length) {
99+
assert(closeFit(math.exp(thetaData(i._2)(j)), math.exp(model.theta(i._1)(j)), 0.05))
102100
}
103101
}
104102
}

0 commit comments

Comments
 (0)