userId確實不該加1,應(yīng)該在后面的int(row['userId'])-1進行減一。
2024-12-19
7 for i in range(m):
8 idx = record[i:] != 0
----> 9 rating_mean[i] = np.mean(rating[i,idx])
10 rating_norm[i,idx] -= rating_mean[i]
11 return rating_norm,rating_mean
IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed
8 idx = record[i:] != 0
----> 9 rating_mean[i] = np.mean(rating[i,idx])
10 rating_norm[i,idx] -= rating_mean[i]
11 return rating_norm,rating_mean
IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed
2021-05-13
雖然是免費課,但是老師這樣講也不太好吧, 前面說的各種矩陣就是提了下,沒說怎么求,代價函數(shù)的字母表示 也有歧義
2020-02-12
tensorflowV2 對api有一些改進
adamOptimizer -> https://github.com/tensorflow/tensorflow/issues/31502
random_noraml -> uniform
adamOptimizer -> https://github.com/tensorflow/tensorflow/issues/31502
random_noraml -> uniform
2020-01-13
內(nèi)容推薦部分,j用戶喜好乘以i電影內(nèi)容減去j用戶對i電影的真實評分才是損失吧 怎么說的是i用戶對j電影的評分
2019-10-25