-
- Downloads
[SPARK-16260][ML][EXAMPLE] PySpark ML Example Improvements and Cleanup
## What changes were proposed in this pull request? 1). Remove unused import in Scala example; 2). Move spark session import outside example off; 3). Change parameter setting the same as Scala; 4). Change comment to be consistent; 5). Make sure that Scala and python using the same data set; I did one pass and fixed the above issues. There are missing examples in python, which might be added later. TODO: For some examples, there are comments on how to run examples; But there are many missing. We can add them later. ## How was this patch tested? (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests) Manually test them Author: wm624@hotmail.com <wm624@hotmail.com> Closes #14021 from wangmiao1981/ann.
Showing
- examples/src/main/python/ml/elementwise_product_example.py 2 additions, 0 deletionsexamples/src/main/python/ml/elementwise_product_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/quantile_discretizer_example.py 1 addition, 1 deletionexamples/src/main/python/ml/quantile_discretizer_example.py
- examples/src/main/python/ml/random_forest_classifier_example.py 1 addition, 1 deletion...es/src/main/python/ml/random_forest_classifier_example.py
- examples/src/main/python/ml/simple_text_classification_pipeline.py 1 addition, 1 deletion...src/main/python/ml/simple_text_classification_pipeline.py
- examples/src/main/scala/org/apache/spark/examples/ml/DataFrameExample.scala 0 additions, 1 deletion...scala/org/apache/spark/examples/ml/DataFrameExample.scala
- examples/src/main/scala/org/apache/spark/examples/ml/GaussianMixtureExample.scala 1 addition, 1 deletion...org/apache/spark/examples/ml/GaussianMixtureExample.scala
- examples/src/main/scala/org/apache/spark/examples/ml/NaiveBayesExample.scala 1 addition, 1 deletion...cala/org/apache/spark/examples/ml/NaiveBayesExample.scala
Please register or sign in to comment