-
- Downloads
[SPARK-16750][FOLLOW-UP][ML] Add transformSchema for...
[SPARK-16750][FOLLOW-UP][ML] Add transformSchema for StringIndexer/VectorAssembler and fix failed tests. ## What changes were proposed in this pull request? This is follow-up for #14378. When we add ```transformSchema``` for all estimators and transformers, I found there are tests failed for ```StringIndexer``` and ```VectorAssembler```. So I moved these parts of work separately in this PR, to make it more clear to review. The corresponding tests should throw ```IllegalArgumentException``` at schema validation period after we add ```transformSchema```. It's efficient that to throw exception at the start of ```fit``` or ```transform``` rather than during the process. ## How was this patch tested? Modified unit tests. Author: Yanbo Liang <ybliang8@gmail.com> Closes #14455 from yanboliang/transformSchema.
Showing
- mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala 3 additions, 1 deletion...ain/scala/org/apache/spark/ml/feature/StringIndexer.scala
- mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala 1 addition, 0 deletions...n/scala/org/apache/spark/ml/feature/VectorAssembler.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/StringIndexerSuite.scala 10 additions, 2 deletions...cala/org/apache/spark/ml/feature/StringIndexerSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/feature/VectorAssemblerSuite.scala 2 additions, 2 deletions...la/org/apache/spark/ml/feature/VectorAssemblerSuite.scala
Please register or sign in to comment