irecsys / CARSKit

Java-Based Context-aware Recommendation Library
https://carskit.github.io/
GNU General Public License v3.0
124 stars 53 forks source link

Getting started with CARSKit on GNU/Linux #7

Closed pminervini closed 8 years ago

pminervini commented 8 years ago

Hello, we have been chatting a bit right after your great tutorial at ACM SAC this year! :)

I was getting started with CARSKit, by simply changing dataset.ratings.lins in settings.conf to ./data/Movie_DePaulMovie/ratings.txt - the current path of the dataset on my system.

This is the output of CARSKit-v0.3.0.jar:

$ java -jar CARSKit-v0.3.0.jar 
[INFO ] 2016-08-15 01:28:58,715 -- WorkingPath: ./data/Movie_DePaulMovie/CARSKit.Workspace/
[INFO ] 2016-08-15 01:28:58,726 -- Your original rating data path: ./data/Movie_DePaulMovie/ratings.txt
[INFO ] 2016-08-15 01:28:58,726 -- Current working path: ./data/Movie_DePaulMovie/CARSKit.Workspace/
[INFO ] 2016-08-15 01:28:58,762 -- Dataset: ...ARSKit.Workspace/ratings_binary.txt
[INFO ] 2016-08-15 01:28:58,765 -- DataPath: ./data/Movie_DePaulMovie/CARSKit.Workspace/ratings_binary.txt
[ERROR] 2016-08-15 01:28:58,765 -- 
java.lang.NullPointerException
    at java.io.File.<init>(File.java:277)
    at happy.coding.io.FileIO.getReader(FileIO.java:154)
    at carskit.data.processor.DataDAO.readData(DataDAO.java:198)
    at carskit.main.CARSKit.readData(CARSKit.java:250)
    at carskit.main.CARSKit.execute(CARSKit.java:117)
    at carskit.main.CARSKit.main(CARSKit.java:92)

What could be the problem?

Best, Pasquale

irecsys commented 8 years ago

Thanks for your report. It seems that it did not create the ratings_binary.txt file, can you double check that? to see whether there is a folder created and named as "CARSKit.Workspace", and the rating binary file in this folder.

irecsys commented 8 years ago

Hello, I tried the jar file on Linux, no problems at my side. But I have modified the IO a little bit and updated a new verion of jar file, please use the latest one.

The suggestion is that you must make sure there is a ratings_binary.txt file in the folder "CARSKit.Workspace". If it is your first time to run on your data set, you should set the "-transformation" as a positive value, such as 1.

Let me know if you have any questions.

pminervini commented 8 years ago

Thank you! ratings_binary.txt was not there, I just flipped the transformation flag and it's now working like a charm.