FMRecommender
- class rsdiv.recommenders.FMRecommender(interaction: DataFrame, items: Optional[DataFrame], test_size: Union[float, int] = 0.3, random_split: bool = True, no_components: int = 10, item_alpha: float = 0, user_alpha: float = 0, loss: str = 'bpr')[source]
Bases:
BaseRecommenderFM recommender based on LightFM.
- Parameters
- get_interaction(df_interaction: DataFrame) Tuple[DataFrame, ndarray, ndarray]
The converter for input dataframe
- Parameters
df_interaction (pd.DataFrame) – user/item interaction matrix. columns should be [“userId”, “itemId”]