Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Jan 30, 2015
1 parent 05422a8 commit 077606b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ class IsotonicRegression private (private var isotonic: Boolean) extends Seriali
input.map(x => (-x._1, x._2, x._3))
}

val isotonicRegression = parallelPoolAdjacentViolators(preprocessedInput)
val pooled = parallelPoolAdjacentViolators(preprocessedInput)

val predictions = if (isotonic) isotonicRegression.map(_._1) else isotonicRegression.map(-_._1)
val boundaries = isotonicRegression.map(_._2)
val predictions = if (isotonic) pooled.map(_._1) else pooled.map(-_._1)
val boundaries = pooled.map(_._2)

new IsotonicRegressionModel(boundaries, predictions, isotonic)
}
Expand Down

0 comments on commit 077606b

Please sign in to comment.