public class SlopeOneModelDataAccumulator extends Object
| Constructor and Description |
|---|
SlopeOneModelDataAccumulator(double damping,
org.lenskit.data.dao.ItemDAO dao)
Creates an accumulator to process rating data and generate the necessary data for a
SlopeOneItemScorer. |
| Modifier and Type | Method and Description |
|---|---|
Long2ObjectMap<org.grouplens.lenskit.vectors.ImmutableSparseVector> |
buildMatrix() |
void |
putItemPair(long id1,
org.grouplens.lenskit.vectors.SparseVector itemVec1,
long id2,
org.grouplens.lenskit.vectors.SparseVector itemVec2)
Puts the item pair into the accumulator.
|
public SlopeOneModelDataAccumulator(double damping,
org.lenskit.data.dao.ItemDAO dao)
Creates an accumulator to process rating data and generate the necessary data for a SlopeOneItemScorer.
damping - A damping term for deviation calculations.dao - The DataAccessObject interfacing with the data for the modelpublic void putItemPair(long id1,
org.grouplens.lenskit.vectors.SparseVector itemVec1,
long id2,
org.grouplens.lenskit.vectors.SparseVector itemVec2)
Puts the item pair into the accumulator.
id1 - The id of the first item.itemVec1 - The rating vector of the first item.id2 - The id of the second item.itemVec2 - The rating vector of the second item.public Long2ObjectMap<org.grouplens.lenskit.vectors.ImmutableSparseVector> buildMatrix()
SlopeOneItemScorer.