GitHub user sethah opened a pull request:

    https://github.com/apache/spark/pull/11939

    [SPARK-14104][PYSPARK][ML] All Python param setters should use the `_set` 
method

    ## What changes were proposed in this pull request?
    
    Param setters in python previously accessed the _paramMap directly to 
update values. The `_set` method now implements type checking, so it should be 
used to update all parameters. This PR eliminates all direct accesses to 
`_paramMap` besides the one in the `_set` method to ensure type checking 
happens. 
    
    Additional changes:
    * [SPARK-13068](https://github.com/apache/spark/pull/11663) missed adding 
type converters in evaluation.py so those are done here
    * An incorrect `toBoolean` type converter was used for StringIndexer 
`handleInvalid` param in previous PR. This is fixed here.
    
    
    ## How was this patch tested?
    
    Existing unit tests verify that parameters are still set properly. No new 
functionality is actually added in this PR.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sethah/spark SPARK-14104

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11939.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11939
    
----
commit 197f7d921368ddff018ecf850f8758f159aedc83
Author: sethah <[email protected]>
Date:   2016-03-23T23:59:07Z

    using _set in all params

commit 1148cb8cba1f9bea364e642d96ab9264231d9de4
Author: sethah <[email protected]>
Date:   2016-03-24T17:31:58Z

    cleaning up

commit d8d97e8d7a00972b54d93ef4377d2947ef8855e9
Author: sethah <[email protected]>
Date:   2016-03-24T17:40:25Z

    style fix

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to