I’ve exported a trained collaborative filtering learner, and am loading it like so:
learn = load_learner('export.pkl')
I’m additionally loading up some data:
df = friend_ratings_df.merge(anime_df).merge(friend_username_to_user_id_df, how='left') dls = CollabDataLoaders.from_df(df, item_name='title', user_name='username', bs=8192, valid_pct=0.5)
And now I’m trying to use the loaded learner to predict ratings, given this data.
- Passing both the data frame and the data loaders to
learn.predict, but none of the combinations have worked
- Searching in this forum, but all the questions either never received an answer or were for old versions of the library
- Referencing the collaborative filtering tutorial, and Chapter 8 of the book which goes over collaborative filtering, but neither of these resources show how to predict
So, how can I do this? Why isn’t it documented anywhere?