Skip to content
  • VinceShieh's avatar
    57dc326b
    [SPARK-17219][ML] Add NaN value handling in Bucketizer · 57dc326b
    VinceShieh authored
    ## What changes were proposed in this pull request?
    This PR fixes an issue when Bucketizer is called to handle a dataset containing NaN value.
    Sometimes, null value might also be useful to users, so in these cases, Bucketizer should
    reserve one extra bucket for NaN values, instead of throwing an illegal exception.
    Before:
    ```
    Bucketizer.transform on NaN value threw an illegal exception.
    ```
    After:
    ```
    NaN values will be grouped in an extra bucket.
    ```
    ## How was this patch tested?
    New test cases added in `BucketizerSuite`.
    Signed-off-by: VinceShieh <vincent.xieintel.com>
    
    Author: VinceShieh <vincent.xie@intel.com>
    
    Closes #14858 from VinceShieh/spark-17219.
    57dc326b
    [SPARK-17219][ML] Add NaN value handling in Bucketizer
    VinceShieh authored
    ## What changes were proposed in this pull request?
    This PR fixes an issue when Bucketizer is called to handle a dataset containing NaN value.
    Sometimes, null value might also be useful to users, so in these cases, Bucketizer should
    reserve one extra bucket for NaN values, instead of throwing an illegal exception.
    Before:
    ```
    Bucketizer.transform on NaN value threw an illegal exception.
    ```
    After:
    ```
    NaN values will be grouped in an extra bucket.
    ```
    ## How was this patch tested?
    New test cases added in `BucketizerSuite`.
    Signed-off-by: VinceShieh <vincent.xieintel.com>
    
    Author: VinceShieh <vincent.xie@intel.com>
    
    Closes #14858 from VinceShieh/spark-17219.
Loading