GitHub user mgaido91 opened a pull request:

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

    [SPARK-25289][ML] Avoid exception in ChiSqSelector with FDR when no feature 
is selected

    ## What changes were proposed in this pull request?
    
    Currently, when FDR is used for `ChiSqSelector` and no feature is selected 
an exception is thrown because the max operation fails.
    
    The PR fixes the problem by handling this case and returning an empty array 
in that case, as sklearn (which was the reference for the initial 
implementation of FDR) does.
    
    ## How was this patch tested?
    
    added UT


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

    $ git pull https://github.com/mgaido91/spark SPARK-25289

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

    https://github.com/apache/spark/pull/22303.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 #22303
    
----
commit f5b0c4e05bc495e2cc0fc22a944d431e262342ca
Author: Marco Gaido <marcogaido91@...>
Date:   2018-08-31T10:42:34Z

    [SPARK-25289][ML] Avoid exception in ChiSqSelector with FDR when no feature 
is selected

----


---

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

Reply via email to