-
- Downloads
[SPARK-14615][ML][FOLLOWUP] Fix Python examples to use the new ML Vector and...
[SPARK-14615][ML][FOLLOWUP] Fix Python examples to use the new ML Vector and Matrix APIs in the ML pipeline based algorithms ## What changes were proposed in this pull request? This PR fixes Python examples to use the new ML Vector and Matrix APIs in the ML pipeline based algorithms. I firstly executed this shell command, `grep -r "from pyspark.mllib" .` and then executed them all. Some of tests in `ml` produced the error messages as below: ``` pyspark.sql.utils.IllegalArgumentException: u'requirement failed: Input type must be VectorUDT but got org.apache.spark.mllib.linalg.VectorUDTf71b0bce.' ``` So, I fixed them to use new ones just identically with some Python tests fixed in https://github.com/apache/spark/pull/12627 ## How was this patch tested? Manually tested for all the examples listed by `grep -r "from pyspark.mllib" .`. Author: hyukjinkwon <gurwls223@gmail.com> Closes #13393 from HyukjinKwon/SPARK-14615.
Showing
- examples/src/main/python/ml/aft_survival_regression.py 1 addition, 1 deletionexamples/src/main/python/ml/aft_survival_regression.py
- examples/src/main/python/ml/chisq_selector_example.py 1 addition, 1 deletionexamples/src/main/python/ml/chisq_selector_example.py
- examples/src/main/python/ml/dct_example.py 1 addition, 1 deletionexamples/src/main/python/ml/dct_example.py
- examples/src/main/python/ml/elementwise_product_example.py 1 addition, 1 deletionexamples/src/main/python/ml/elementwise_product_example.py
- examples/src/main/python/ml/estimator_transformer_param_example.py 1 addition, 1 deletion...src/main/python/ml/estimator_transformer_param_example.py
- examples/src/main/python/ml/pca_example.py 1 addition, 1 deletionexamples/src/main/python/ml/pca_example.py
- examples/src/main/python/ml/polynomial_expansion_example.py 1 addition, 1 deletionexamples/src/main/python/ml/polynomial_expansion_example.py
- examples/src/main/python/ml/simple_params_example.py 9 additions, 10 deletionsexamples/src/main/python/ml/simple_params_example.py
- examples/src/main/python/ml/vector_assembler_example.py 1 addition, 1 deletionexamples/src/main/python/ml/vector_assembler_example.py
- examples/src/main/python/ml/vector_slicer_example.py 1 addition, 1 deletionexamples/src/main/python/ml/vector_slicer_example.py
Please register or sign in to comment