from fastai.gen_doc.nbdoc import * from fastai.collab import * path = untar_data(URLs.ML_SAMPLE) ratings = pd.read_csv(path/'ratings.csv') ratings.head() data = CollabDataBunch.from_df(ratings) learn = collab_learner(data, n_factors=50, y_range=(0.,5.)) learn.fit_one_cycle(5, 5e-3, wd=0.1) show_doc(CollabDataBunch) show_doc(CollabDataBunch.from_df) show_doc(CollabLearner, title_level=3) show_doc(CollabLearner.bias) show_doc(CollabLearner.get_idx) show_doc(CollabLearner.weight) show_doc(EmbeddingDotBias, title_level=3) show_doc(EmbeddingNN, title_level=3) show_doc(collab_learner) show_doc(CollabLine, doc_string=False, title_level=3) show_doc(CollabList, title_level=3, doc_string=False) show_doc(EmbeddingDotBias.forward) show_doc(CollabList.reconstruct) show_doc(EmbeddingNN.forward)