From 76e5b0f90e370e2cda20e1348bf40ff890f51782 Mon Sep 17 00:00:00 2001 From: leahmcguire Date: Mon, 26 Jan 2015 10:29:47 -0800 Subject: [PATCH] removed unnecessary sort from test --- .../apache/spark/mllib/classification/NaiveBayesSuite.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala index d269377c7c9d7..853e4501d8685 100644 --- a/mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/mllib/classification/NaiveBayesSuite.scala @@ -95,10 +95,8 @@ class NaiveBayesSuite extends FunSuite with MLlibTestSparkContext { assert(closeFit(math.exp(piData(i._2)), math.exp(model.pi(i._1)), 0.05)) } for (i <- modelIndex) { - val sortedData = thetaData(i._2).sorted - val sortedModel = model.theta(i._1).sorted - for (j <- 0 until sortedData.length) { - assert(closeFit(math.exp(sortedData(j)), math.exp(sortedModel(j)), 0.05)) + for (j <- 0 until thetaData(i._2).length) { + assert(closeFit(math.exp(thetaData(i._2)(j)), math.exp(model.theta(i._1)(j)), 0.05)) } } }