Update 08_collab.ipynb (#293)

we don't need the following line
idxs = np.random.choice(len(top_movies), 50, replace=False)

because, immediately below it, we redefine idxs as 
idxs = list(range(50))
This commit is contained in:
Faisal Sharji 2020-10-12 04:58:29 -04:00 committed by GitHub
parent 45d5cd1c47
commit 69548f0e11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1702,7 +1702,6 @@
"movie_w = learn.model.movie_factors[top_idxs].cpu().detach()\n", "movie_w = learn.model.movie_factors[top_idxs].cpu().detach()\n",
"movie_pca = movie_w.pca(3)\n", "movie_pca = movie_w.pca(3)\n",
"fac0,fac1,fac2 = movie_pca.t()\n", "fac0,fac1,fac2 = movie_pca.t()\n",
"idxs = np.random.choice(len(top_movies), 50, replace=False)\n",
"idxs = list(range(50))\n", "idxs = list(range(50))\n",
"X = fac0[idxs]\n", "X = fac0[idxs]\n",
"Y = fac2[idxs]\n", "Y = fac2[idxs]\n",