Documentation Home
MySQL AI
Download this Manual
PDF (US Ltr) - 1.4Mb
PDF (A4) - 1.4Mb


MySQL AI  /  ...  /  Generating Predictions for a Recommendation Model

4.6.5.4 Generating Predictions for a Recommendation Model

After training the model, you can generate predictions. To generate predictions, use the sample data from the testing_dataset dataset. NULL values for any row in the users or items columns generates an error.

Before You Begin

Complete the following tasks:

Options for Generating Predictions

The options for ML_PREDICT_ROW and ML_PREDICT_TABLE include the following:

  • topk: The number of recommendations to provide. The default is 3.

  • recommend: Specifies what to recommend. Permitted values are:

    • ratings: Predicts ratings that users will give. This is the default value.

    • items: Recommends items for users.

    • users: Recommends users for items.

    • users_to_items: This is the same as items.

    • items_to_users: This is the same as users.

    • items_to_items: Recommends similar items for items.

    • users_to_users: Recommends similar users for users.

  • remove_seen: If true, the model does not repeat existing interactions from the training table. It only applies to the recommendations items, users, users_to_items, and items_to_users.