aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorFrank Dai <soulmachine@gmail.com>2014-01-14 14:59:01 +0800
committerFrank Dai <soulmachine@gmail.com>2014-01-14 14:59:01 +0800
commitc2852cf42e0fa851b6708b6886b0d78ac5b697a6 (patch)
treea59e6032d1724fc7b42db89bc4a1bda7740bfe44 /mllib
parent12386b3eea5db7be002b4ba620f3e242bb8ef332 (diff)
downloadspark-c2852cf42e0fa851b6708b6886b0d78ac5b697a6.tar.gz
spark-c2852cf42e0fa851b6708b6886b0d78ac5b697a6.tar.bz2
spark-c2852cf42e0fa851b6708b6886b0d78ac5b697a6.zip
Indent two spaces
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala2
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/classification/SVMSuite.scala2
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/regression/LassoSuite.scala4
-rw-r--r--mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala4
4 files changed, 6 insertions, 6 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
index f97eaf39c7..02ede71137 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/classification/LogisticRegressionSuite.scala
@@ -81,7 +81,7 @@ class LogisticRegressionSuite extends FunSuite with BeforeAndAfterAll with Shoul
def validatePrediction(predictions: Seq[Double], input: Seq[LabeledPoint]) {
val numOffPredictions = predictions.zip(input).count { case (prediction, expected) =>
- prediction != expected.label
+ prediction != expected.label
}
// At least 83% of the predictions should be on.
((input.length - numOffPredictions).toDouble / input.length) should be > 0.83
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/classification/SVMSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/classification/SVMSuite.scala
index 0f24fbb39f..3357b86f9b 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/classification/SVMSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/classification/SVMSuite.scala
@@ -72,7 +72,7 @@ class SVMSuite extends FunSuite with BeforeAndAfterAll {
def validatePrediction(predictions: Seq[Double], input: Seq[LabeledPoint]) {
val numOffPredictions = predictions.zip(input).count { case (prediction, expected) =>
- prediction != expected.label
+ prediction != expected.label
}
// At least 80% of the predictions should be on.
assert(numOffPredictions < input.length / 5)
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/regression/LassoSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/regression/LassoSuite.scala
index 0a6a9f7a62..b2c8df97a8 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/regression/LassoSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/regression/LassoSuite.scala
@@ -40,8 +40,8 @@ class LassoSuite extends FunSuite with BeforeAndAfterAll {
def validatePrediction(predictions: Seq[Double], input: Seq[LabeledPoint]) {
val numOffPredictions = predictions.zip(input).count { case (prediction, expected) =>
- // A prediction is off if the prediction is more than 0.5 away from expected value.
- math.abs(prediction - expected.label) > 0.5
+ // A prediction is off if the prediction is more than 0.5 away from expected value.
+ math.abs(prediction - expected.label) > 0.5
}
// At least 80% of the predictions should be on.
assert(numOffPredictions < input.length / 5)
diff --git a/mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala b/mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala
index dd5aa8516f..406afbaa3e 100644
--- a/mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala
+++ b/mllib/src/test/scala/org/apache/spark/mllib/regression/LinearRegressionSuite.scala
@@ -37,8 +37,8 @@ class LinearRegressionSuite extends FunSuite with BeforeAndAfterAll {
def validatePrediction(predictions: Seq[Double], input: Seq[LabeledPoint]) {
val numOffPredictions = predictions.zip(input).count { case (prediction, expected) =>
- // A prediction is off if the prediction is more than 0.5 away from expected value.
- math.abs(prediction - expected.label) > 0.5
+ // A prediction is off if the prediction is more than 0.5 away from expected value.
+ math.abs(prediction - expected.label) > 0.5
}
// At least 80% of the predictions should be on.
assert(numOffPredictions < input.length / 5)