I have a Fast ai collaborative filtering model. I would like to predict on this model for a new tuple. I am having trouble with the predict function
From their documentation,
Signature: learn.predict(item, rm_type_tfms=None, with_input=False)
Docstring: Prediction on `item`, fully decoded, loss function decoded and probabilities
File: ~/playground/virtualenv/lib/python3.8/site-packages/fastai/learner.py
Type: method
How do I define the Item that I need to pass. Lets say for a movielens dataset, for a user already with in the dataset, we would like to recommend a set of movies, how do we pass the userID?
I have tried to follow somewhat of an answer here - Making predictions with collaborative filtering
and Collaborative filtering predictions
learn.predict( [np.array([3])] )
I seem to get an error: TypeError: list indices must be integers or slices, not list
Appreciate any pointers.
Thanks, Shekar