Training the Object2Vec algorithm

Now that we have an understanding of how the algorithm works, let's dive into the training process:

  1. Data processing: Feed data in the form of JSON lines; random shuffle the data for optimal performance. As you will see later, we send data in the format of user index, book index, label=rating.
  2. Model training: We pass both training and validation data to the algorithm. There are multiple hyperparameters that we can configure to fine-tune the model's performance. We will review them in the upcomings sections. The objective function, in our case, is to minimize the Mean Squared Error (MSE). The error is the difference between the label (actual value) and the predicted rating.

Once the model has been trained, ...

Get Hands-On Artificial Intelligence on Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.