gamboviol / bpr

Bayesian Personalized Ranking
212 stars 87 forks source link

What is the dataset format? I didn't try it successfully with csv file #9

Open yangxin42 opened 7 years ago

yangxin42 commented 7 years ago

Is there anyone who can give a .mtx dataset? Tks so much!

wangruicn commented 7 years ago

You can make a .mtx file with scipy.io.mmwrite and scipy.sparse.csr_matrix could transform a numpy.ndarray to a csr_matrix。 用scipy.sparse_csr将ndarray的数组转化为csr矩阵,然后用scipy.io.mmwrite写到文件