Skip to content
  • Nick Pentreath's avatar
    98057583
    [SPARK-20679][ML] Support recommending for a subset of users/items in ALSModel · 98057583
    Nick Pentreath authored
    This PR adds methods `recommendForUserSubset` and `recommendForItemSubset` to `ALSModel`. These allow recommending for a specified set of user / item ids rather than for every user / item (as in the `recommendForAllX` methods).
    
    The subset methods take a `DataFrame` as input, containing ids in the column specified by the param `userCol` or `itemCol`. The model will generate recommendations for each _unique_ id in this input dataframe.
    
    ## How was this patch tested?
    New unit tests in `ALSSuite` and Python doctests in `ALS`. Ran updated examples locally.
    
    Author: Nick Pentreath <nickp@za.ibm.com>
    
    Closes #18748 from MLnick/als-recommend-df.
    98057583
    [SPARK-20679][ML] Support recommending for a subset of users/items in ALSModel
    Nick Pentreath authored
    This PR adds methods `recommendForUserSubset` and `recommendForItemSubset` to `ALSModel`. These allow recommending for a specified set of user / item ids rather than for every user / item (as in the `recommendForAllX` methods).
    
    The subset methods take a `DataFrame` as input, containing ids in the column specified by the param `userCol` or `itemCol`. The model will generate recommendations for each _unique_ id in this input dataframe.
    
    ## How was this patch tested?
    New unit tests in `ALSSuite` and Python doctests in `ALS`. Ran updated examples locally.
    
    Author: Nick Pentreath <nickp@za.ibm.com>
    
    Closes #18748 from MLnick/als-recommend-df.
Loading