fuhailin / Probabilistic-Matrix-Factorization

Python Implementation of Probabilistic Matrix Factorization(PMF) Algorithm for building a recommendation system using MovieLens ml-100k | GroupLens dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PMF代码不理解的地方

liheyong opened this issue · comments

作者您好!,在读您的代码的时候,这段代码不理解。
batch_idx = np.mod(test, shuffled_order.shape[0])
其中test代表每次训练数据块的索引。
shuffled_order.shape[0]代表整个训练集的乱序索引。它们取模表示什么?
谢谢!

test = np.arange(100000, 110000)
np.mod(test, 80000)

array([20000, 20001, 20002, ..., 29997, 29998, 29999])
当 test 超过shuffled_order.shape[0],这样能知道到shuffled_order什么地方拿data