public class SlopeOneModelDataAccumulator extends Object
Constructor and Description |
---|
SlopeOneModelDataAccumulator(double damping,
ItemDAO dao)
Creates an accumulator to process rating data and generate the necessary data for a
SlopeOneItemScorer . |
Modifier and Type | Method and Description |
---|---|
Long2ObjectMap<ImmutableSparseVector> |
buildMatrix() |
void |
putItemPair(long id1,
SparseVector itemVec1,
long id2,
SparseVector itemVec2)
Puts the item pair into the accumulator.
|
public SlopeOneModelDataAccumulator(double damping, 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, SparseVector itemVec1, long id2, 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<ImmutableSparseVector> buildMatrix()
SlopeOneItemScorer
.