Please note that at the moment this integrations does not support the
FINETUNE
feature.Example
Before creating a LightFM model, we need to create an ML engine.SHOW ML_ENGINES
.
Now letβs create a LightFM model specifying the necessary input parameters.
- The
item_id
parameter that stores items to be recommended; here, these are movies. - The
user_id
parameter that stores users to whom items are recommended. - The
threshold
parameter is used when score of interaction is provided in the input data. It defines the threshold for the recommendation. - The
n_recommendations
parameter stores the number of recommendations to be returned.
evaluation
parameter if you want to store the evaluation metrics. It is set to false
by default.
Here is how to connect the
mysql_demo_db
used for training the model:-
Get recommendations for all item_item pairs:
-
Get item-item recommendations for a specific item_id:
-
Get recommendations for all user-item pairs:
-
Get user-item recommendations for a specific user_id:
-
Get user-item recommendations for multiple user_ids: