Closed sososa1213 closed 6 years ago
I need to retrieve values of userCode, itemCode and rating from "/movielens/ml-100k/ratings.txt". I use this way
Resource resource = new Resource("librec.properties"); Configuration conf = new Configuration(); conf.addResource(resource); Randoms.seed(1); TextDataModel dataModel = new TextDataModel(conf); dataModel.buildDataModel(); SparseMatrix trainMatrix = dataModel.getDataSplitter().getTrainData(); int count = trainMatrix.numRows(); for (int i : trainMatrix.rows()) { int userCode = (int) trainMatrix.get(i,0); int itemCode = (int) trainMatrix.get(i, 1); double rating = trainMatrix.get(i, 2); }
when I print values is zero. Any help to fix this error
I need to retrieve values of userCode, itemCode and rating from "/movielens/ml-100k/ratings.txt". I use this way
when I print values is zero. Any help to fix this error