diff options
author | Xiangrui Meng <meng@databricks.com> | 2016-06-21 15:52:31 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2016-06-21 15:52:31 -0700 |
commit | 9493b079a0050f0a6f4936c17622b96fb185b67f (patch) | |
tree | ab1904e8054a6a19f8e0e2542561d61a12f78049 /mllib/src/test | |
parent | f4e8c31adf45af05751e0d77aefb5cacc58375ee (diff) | |
download | spark-9493b079a0050f0a6f4936c17622b96fb185b67f.tar.gz spark-9493b079a0050f0a6f4936c17622b96fb185b67f.tar.bz2 spark-9493b079a0050f0a6f4936c17622b96fb185b67f.zip |
[SPARK-16118][MLLIB] add getDropLast to OneHotEncoder
## What changes were proposed in this pull request?
We forgot the getter of `dropLast` in `OneHotEncoder`
## How was this patch tested?
unit test
Author: Xiangrui Meng <meng@databricks.com>
Closes #13821 from mengxr/SPARK-16118.
Diffstat (limited to 'mllib/src/test')
-rw-r--r-- | mllib/src/test/scala/org/apache/spark/ml/feature/OneHotEncoderSuite.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mllib/src/test/scala/org/apache/spark/ml/feature/OneHotEncoderSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/feature/OneHotEncoderSuite.scala index 7841b4fbc7..d41eeec132 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/feature/OneHotEncoderSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/feature/OneHotEncoderSuite.scala @@ -49,7 +49,9 @@ class OneHotEncoderSuite val encoder = new OneHotEncoder() .setInputCol("labelIndex") .setOutputCol("labelVec") - .setDropLast(false) + assert(encoder.getDropLast === true) + encoder.setDropLast(false) + assert(encoder.getDropLast === false) val encoded = encoder.transform(transformed) val output = encoded.select("id", "labelVec").rdd.map { r => |