@DefaultImplementation(value=SimilarityMatrixModel.class) public interface ItemItemModel
Item-item similarity model. It makes available the similarities between items in the form of allowing queries to neighborhoods.
These similarities are post-normalization, so code using them should typically use the same normalizations used by the builder to make use of the similarity scores.
Modifier and Type | Method and Description |
---|---|
LongSortedSet |
getItemUniverse()
Get the set of all items in the model.
|
Long2DoubleMap |
getNeighbors(long item)
Get the neighbors of an item scored by similarity.
|
LongSortedSet getItemUniverse()
Get the set of all items in the model.
@Nonnull Long2DoubleMap getNeighbors(long item)
Get the neighbors of an item scored by similarity. This is the corresponding row of the item-item similarity matrix (see org.lenskit.knn.item
).
item
- The item to get the neighborhood for.