In recommendation scenarios, you can use the FM-Embedding scheme that is provided by Machine Learning Studio to obtain the feature vectors of each user and item. Then, you can use the recall module to obtain the product of the feature vectors. This way, you can predict the rating to be assigned by each user to each item. This topic describes how to use the Factorization Machine (FM) and Embedding algorithms to generate feature vectors of users and items.
Background information
AI-based recommendation is divided into two modules: sorting and recall. The recall module uses feature vectors to represent users and to-be-recommended items. The product of the feature vector of a user and the feature vector of an item indicates the interest of the user in the item. The experiment that is described in this topic is based on real recommendation data. The entire workflow of the experiment is preset in the REC-FM Embedding Matching template of Machine Learning Studio. You can generate the feature vectors of users and items in a fast manner by dragging the components that are provided by Machine Learning Studio.
Dataset
Field | Data type | Description |
---|---|---|
userid | STRING | The ID of the user. |
age | DOUBLE | The age of the user. |
gender | STRING | The gender of the user. |
itemid | STRING | The ID of the item. |
price | DOUBLE | The price of the item. |
size | DOUBLE | The size of the item. |
label | DOUBLE | Indicates whether the user has purchased the item. Valid values:
|

Procedure
- Go to the Machine Learning Studio console.
- Log on to the PAI console.
- In the left-side navigation pane, choose .
- On the PAI Visualization Modeling page, find the project in which you want to create an experiment and click Machine Learning in the Operation column.
- Create an experiment.
- Run the experiment and view the result.
- In the top toolbar of the canvas, click Run.
- After the experiment is run, right-click Embedding extract-1 on the canvas and select View Data. In the dialog box that appears, view the feature vectors of users.
- Right-click Embedding extract-2 on the canvas and select View Data. In the dialog box that appears, view the feature vectors of items.