com.github.chen0040.sparkml.recommender.RatingTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spark-ml-recommender Show documentation
Show all versions of spark-ml-recommender Show documentation
Recommender algorithms implemented in Java and for Spark
package com.github.chen0040.sparkml.recommender;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
/**
* Created by xschen on 5/6/2017.
*/
@Getter
public class RatingTable {
private List ratings = new ArrayList<>();
public RatingTable() {
}
public void addRating(String item, String user, double value) {
UserItemRating cell =new UserItemRating();
cell.setItem(item);
cell.setUser(user);
cell.setValue(value);
ratings.add(cell);
}
}