Skip to content

Commit

Permalink
Fixed long lines
Browse files Browse the repository at this point in the history
  • Loading branch information
freeman-lab committed Aug 19, 2014
1 parent 50eb0bf commit e851ca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ class StreamingLinearRegressionSuite extends FunSuite with TestSuiteBase {
val output: Seq[Seq[(Double, Double)]] = runStreams(ssc, numBatches, numBatches)

// compute the mean absolute error and check that it's always less than 0.1
val errors = output.map(batch => batch.map(
p => math.abs(p._1 - p._2)).reduce(_+_) / nPoints.toDouble)
val errors = output.map(batch => batch.map(p => math.abs(p._1 - p._2)).sum / nPoints)
assert(errors.forall(x => x <= 0.1))

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ trait TestSuiteBase extends FunSuite with BeforeAndAfter with Logging {
logInfo("numBatches = " + numBatches + ", numExpectedOutput = " + numExpectedOutput)

// Get the output buffer
val outputStream = ssc.graph.getOutputStreams.filter(_.isInstanceOf[TestOutputStreamWithPartitions[_]]).head.asInstanceOf[TestOutputStreamWithPartitions[V]]
val outputStream = ssc.graph.getOutputStreams.
filter(_.isInstanceOf[TestOutputStreamWithPartitions[_]]).
head.asInstanceOf[TestOutputStreamWithPartitions[V]]
val output = outputStream.output

try {
Expand Down

0 comments on commit e851ca7

Please sign in to comment.