Code

Code for Collaborative Filtering Model using fastai.collab

learn = collab_learner(dls, n_factors=50, y_range=(0, 5.5)) learn.fit_one_cycle(5, 5e-3, wd=0.1) #we can retrieve model summary using this line of code learn.model #we can use bias term to see which movies are most popular/high -rating movie_bias = learn.model.i_bias.weight.squeeze() idxs = movie_bias.argsort(descending=True)[:5] [dls.classes['title'][i] for i in idxs]

0

1

Updated 2021-04-17

Tags

Data Science