Github user MLnick commented on a diff in the pull request:
https://github.com/apache/spark/pull/20257#discussion_r161740927
--- Diff:
examples/src/main/scala/org/apache/spark/examples/ml/OneHotEncoderEstimatorExample.scala
---
@@ -19,38 +19,34 @@
package org.apache.spark.examples.ml
// $example on$
-import org.apache.spark.ml.feature.{OneHotEncoder, StringIndexer}
+import org.apache.spark.ml.feature.OneHotEncoderEstimator
// $example off$
import org.apache.spark.sql.SparkSession
-object OneHotEncoderExample {
+object OneHotEncoderEstimatorExample {
def main(args: Array[String]): Unit = {
val spark = SparkSession
.builder
- .appName("OneHotEncoderExample")
+ .appName("OneHotEncoderEstimatorExample")
.getOrCreate()
// $example on$
+ // Notice: this categorical features are usually encoded with
`StringIndexer`.
--- End diff --
Same applies here.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]