We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb30d79 commit ac77859Copy full SHA for ac77859
mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala
@@ -136,9 +136,10 @@ object Bucketizer {
136
feature: Double,
137
lowerInclusive: Boolean,
138
upperInclusive: Boolean): Double = {
139
- if ((feature < splits.head && !lowerInclusive) || (feature > splits.last && !upperInclusive))
+ if ((feature < splits.head && !lowerInclusive) || (feature > splits.last && !upperInclusive)) {
140
throw new Exception(s"Feature $feature out of bound, check your features or loose the" +
141
s" lower/upper bound constraint.")
142
+ }
143
var left = 0
144
var right = splits.length - 2
145
while (left <= right) {
0 commit comments