-
- Downloads
[SPARK-10931][ML][PYSPARK] PySpark Models Copy Param Values from Estimator
## What changes were proposed in this pull request? Added call to copy values of Params from Estimator to Model after fit in PySpark ML. This will copy values for any params that are also defined in the Model. Since currently most Models do not define the same params from the Estimator, also added method to create new Params from looking at the Java object if they do not exist in the Python object. This is a temporary fix that can be removed once the PySpark models properly define the params themselves. ## How was this patch tested? Refactored the `check_params` test to optionally check if the model params for Python and Java match and added this check to an existing fitted model that shares params between Estimator and Model. Author: Bryan Cutler <cutlerb@gmail.com> Closes #17849 from BryanCutler/pyspark-models-own-params-SPARK-10931.
Showing
- python/pyspark/ml/classification.py 1 addition, 1 deletionpython/pyspark/ml/classification.py
- python/pyspark/ml/clustering.py 7 additions, 1 deletionpython/pyspark/ml/clustering.py
- python/pyspark/ml/tests.py 52 additions, 35 deletionspython/pyspark/ml/tests.py
- python/pyspark/ml/wrapper.py 31 additions, 1 deletionpython/pyspark/ml/wrapper.py
Loading
Please register or sign in to comment