Skip to content
Prev Previous commit
Next Next commit
fix style error
  • Loading branch information
yinxusen committed May 8, 2015
commit ac778591ad55845912dc6608d8de5e2935c95f73
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ object Bucketizer {
feature: Double,
lowerInclusive: Boolean,
upperInclusive: Boolean): Double = {
if ((feature < splits.head && !lowerInclusive) || (feature > splits.last && !upperInclusive))
if ((feature < splits.head && !lowerInclusive) || (feature > splits.last && !upperInclusive)) {
throw new Exception(s"Feature $feature out of bound, check your features or loose the" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a RuntimeException

Also, typo: "loose" --> "loosen"

s" lower/upper bound constraint.")
}
var left = 0
var right = splits.length - 2
while (left <= right) {
Expand Down