Skip to content
Snippets Groups Projects
  • Xiangrui Meng's avatar
    cd4a1536
    [SPARK-5769] Set params in constructors and in setParams in Python ML pipelines · cd4a1536
    Xiangrui Meng authored
    This PR allow Python users to set params in constructors and in setParams, where we use decorator `keyword_only` to force keyword arguments. The trade-off is discussed in the design doc of SPARK-4586.
    
    Generated doc:
    ![screen shot 2015-02-12 at 3 06 58 am](https://cloud.githubusercontent.com/assets/829644/6166491/9cfcd06a-b265-11e4-99ea-473d866634fc.png)
    
    CC: davies rxin
    
    Author: Xiangrui Meng <meng@databricks.com>
    
    Closes #4564 from mengxr/py-pipeline-kw and squashes the following commits:
    
    fedf720 [Xiangrui Meng] use toDF
    d565f2c [Xiangrui Meng] Merge remote-tracking branch 'apache/master' into py-pipeline-kw
    cbc15d3 [Xiangrui Meng] fix style
    5032097 [Xiangrui Meng] update pipeline signature
    950774e [Xiangrui Meng] simplify keyword_only and update constructor/setParams signatures
    fdde5fc [Xiangrui Meng] fix style
    c9384b8 [Xiangrui Meng] fix sphinx doc
    8e59180 [Xiangrui Meng] add setParams and make constructors take params, where we force keyword args
    cd4a1536
    History
    [SPARK-5769] Set params in constructors and in setParams in Python ML pipelines
    Xiangrui Meng authored
    This PR allow Python users to set params in constructors and in setParams, where we use decorator `keyword_only` to force keyword arguments. The trade-off is discussed in the design doc of SPARK-4586.
    
    Generated doc:
    ![screen shot 2015-02-12 at 3 06 58 am](https://cloud.githubusercontent.com/assets/829644/6166491/9cfcd06a-b265-11e4-99ea-473d866634fc.png)
    
    CC: davies rxin
    
    Author: Xiangrui Meng <meng@databricks.com>
    
    Closes #4564 from mengxr/py-pipeline-kw and squashes the following commits:
    
    fedf720 [Xiangrui Meng] use toDF
    d565f2c [Xiangrui Meng] Merge remote-tracking branch 'apache/master' into py-pipeline-kw
    cbc15d3 [Xiangrui Meng] fix style
    5032097 [Xiangrui Meng] update pipeline signature
    950774e [Xiangrui Meng] simplify keyword_only and update constructor/setParams signatures
    fdde5fc [Xiangrui Meng] fix style
    c9384b8 [Xiangrui Meng] fix sphinx doc
    8e59180 [Xiangrui Meng] add setParams and make constructors take params, where we force keyword args