Skip to content

Commit 11fb00a

Browse files
committed
change it into an Estimator
1 parent 998bc87 commit 11fb00a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mllib/src/main/scala/org/apache/spark/ml/feature/Bucketizer.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
package org.apache.spark.ml.feature
1919

2020
import org.apache.spark.annotation.AlphaComponent
21-
import org.apache.spark.ml.Transformer
2221
import org.apache.spark.ml.attribute.NominalAttribute
2322
import org.apache.spark.ml.param._
2423
import org.apache.spark.ml.param.shared.{HasInputCol, HasOutputCol}
2524
import org.apache.spark.ml.util.SchemaUtils
25+
import org.apache.spark.ml.{Estimator, Model}
2626
import org.apache.spark.sql._
2727
import org.apache.spark.sql.functions._
2828
import org.apache.spark.sql.types.{DoubleType, StructType}
@@ -32,7 +32,8 @@ import org.apache.spark.sql.types.{DoubleType, StructType}
3232
* `Bucketizer` maps a column of continuous features to a column of feature buckets.
3333
*/
3434
@AlphaComponent
35-
final class Bucketizer extends Transformer with HasInputCol with HasOutputCol {
35+
final class Bucketizer(override val parent: Estimator[Bucketizer] = null)
36+
extends Model[Bucketizer] with HasInputCol with HasOutputCol {
3637

3738
/**
3839
* The given buckets should match 1) its size is larger than zero; 2) it is ordered in a non-DESC

0 commit comments

Comments
 (0)