guoguibing / librec

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

I can't load the movielens_1m dataset. #4

Closed runner72 closed 9 years ago

runner72 commented 9 years ago

Hi, why the movielens 1M is failed to train? Hope for your answer. The error is:

E:\rec_alg\librec-v1.1> java -jar librec.jar [INFO ] Training: ratings.dat, kFold: 5 [Parallel] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 at librec.data.DataDAO.readData(DataDAO.java:161) at librec.data.DataDAO.readData(DataDAO.java:134) at librec.data.DataDAO.readData(DataDAO.java:126) at librec.main.LibRec.main(LibRec.java:102)

guoguibing commented 9 years ago

What's the format of your movielens 1M data set?

runner72 commented 9 years ago

the format is like this: 1 1193 5 1 661 3 1 914 3 1 3408 4 1 2355 5 1 1197 3 1 1287 5 1 2804 5 1 594 4 1 919 4 1 595 5 1 938 4 1 2398 4 1 2918 4 1 1035 5 1 2791 4

guoguibing commented 9 years ago

The format seems fine. I guess there are some invalid (and invisible) symbols in your data file. Try to debug it step by step!

runner72 commented 9 years ago

Thank you, although I don't know the exactly reason. But I copy the blank separator to replace the blank separator of my file, it runs successfully.