guoguibing / librec

LibRec: A Leading Java Library for Recommender Systems, see
https://www.librec.net/
Other
3.23k stars 1.03k forks source link

Help with Sparse Matrix #261

Closed sososa1213 closed 6 years ago

sososa1213 commented 6 years ago

Hello, Could anyone please help me how to use sparse matrix, I need to read Movielens 100k dataset, then run it with other algorithm. Also, I get confused about sparse matrix, I know sparse matrix used to reduce zero value for not take memory space, but Movielens 100k dataset did not have any zero. So could any one help me to explain this point too.

I really appreciate help and support,

allenjack commented 6 years ago

Hi, Since users can only interact with a few of items, which means users' ratings on most of the items are missing. Thus, for sparse matrix, we only store the observed ratings in the matrix and ignore the missing ratings.

sososa1213 commented 6 years ago

Thank a-lot for the clarification. I am using Movielens->ml-100k-> "ratings.txt in my code, so is that mean in Movielens dataset "ratings.txt" there some rating missing or there specific file have missing rating like filmtrust->rating-> "ratings_1.txt"? Thanks again.