April 2020
Intermediate to advanced
330 pages
7h 44m
English
We are now going to build, compile, and train our model using our user-item ratings data. Specifically, we will use Keras to construct a customized neural network with embedded layers (one for users and one for items) and a lambda function that computes the dot product to build a working prototype of a neural network-based recommender system:
# create custom model with user and item embeddingsdot <- function( embedding_dim, n_users, n_items, name = "dot") { keras_model_custom(name = name, function(self) { self$user_embedding <- layer_embedding( input_dim = n_users+1, output_dim = embedding_dim, name = "user_embedding") self$item_embedding <- layer_embedding( ...Read now
Unlock full access