diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2016-05-03 16:46:13 +0200 |
---|---|---|
committer | Nick Pentreath <nickp@za.ibm.com> | 2016-05-03 16:46:13 +0200 |
commit | d26f7cb0121767da678bbbbf3a0e31c63d5e3159 (patch) | |
tree | 76c2dafc74ec093ac832cf5045fbcf10f9e977e7 /python/pyspark/ml/pipeline.py | |
parent | 46965cd014fd4ba68bdec15156ec9bcc27d9b217 (diff) | |
download | spark-d26f7cb0121767da678bbbbf3a0e31c63d5e3159.tar.gz spark-d26f7cb0121767da678bbbbf3a0e31c63d5e3159.tar.bz2 spark-d26f7cb0121767da678bbbbf3a0e31c63d5e3159.zip |
[SPARK-14971][ML][PYSPARK] PySpark ML Params setter code clean up
## What changes were proposed in this pull request?
PySpark ML Params setter code clean up.
For examples,
```setInputCol``` can be simplified from
```
self._set(inputCol=value)
return self
```
to:
```
return self._set(inputCol=value)
```
This is a pretty big sweeps, and we cleaned wherever possible.
## How was this patch tested?
Exist unit tests.
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #12749 from yanboliang/spark-14971.
Diffstat (limited to 'python/pyspark/ml/pipeline.py')
-rw-r--r-- | python/pyspark/ml/pipeline.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/python/pyspark/ml/pipeline.py b/python/pyspark/ml/pipeline.py index 146e403a8f..eb6d3310d6 100644 --- a/python/pyspark/ml/pipeline.py +++ b/python/pyspark/ml/pipeline.py @@ -71,8 +71,7 @@ class Pipeline(Estimator, MLReadable, MLWritable): :param value: a list of transformers or estimators :return: the pipeline instance """ - self._set(stages=value) - return self + return self._set(stages=value) @since("1.3.0") def getStages(self): |