Hi everyone!
I’d like to put the neural net
for collaborative filtering
from lesson 4 into “production” to produce predictions for a user:
I know that I can do:
nn.predict([np.array([u_id]), np.array([m_id])])
…to get a prediction of what u_id
’ would rate m_id
.
2 Questions:
-
The NN currently has 2 inputs (a movie_id and a user_id) and produces a single output (rating). How can we change the architecture to receive a user_id and produce a vector of ratings for every movie_id as output?
-
It is useful to input a user_id and a movie_id since you can iterate over each movie in a genre and just produce predictions for that genre but calling nn.predict() on each user/movie pair is slow - how can we speed this up?
Thanks!