public class SlopeOneModelDataAccumulator
extends java.lang.Object
| Constructor and Description |
|---|
SlopeOneModelDataAccumulator(double damping,
LongSet items)
Creates an accumulator to process rating data and generate the necessary data for a
SlopeOneItemScorer. |
| Modifier and Type | Method and Description |
|---|---|
KeyedObjectMap<org.lenskit.slopeone.SlopeOneModel.ModelRow> |
buildMatrix() |
void |
putItemPair(long id1,
Long2DoubleSortedMap itemVec1,
long id2,
Long2DoubleSortedMap itemVec2)
Puts the item pair into the accumulator.
|
public SlopeOneModelDataAccumulator(double damping,
LongSet items)
Creates an accumulator to process rating data and generate the necessary data for a SlopeOneItemScorer.
damping - A damping term for deviation calculations.items - The set of known item IDs.public void putItemPair(long id1,
Long2DoubleSortedMap itemVec1,
long id2,
Long2DoubleSortedMap 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 KeyedObjectMap<org.lenskit.slopeone.SlopeOneModel.ModelRow> buildMatrix()
SlopeOneItemScorer.