@ThreadSafe public class SnapshotNeighborFinder extends Object implements NeighborFinder
LiveNeighborFinder
with a BinaryRatingDAO
.Constructor and Description |
---|
SnapshotNeighborFinder(UserSnapshot snap,
UserSimilarity sim,
UserHistorySummarizer sum,
UserVectorNormalizer norm,
Threshold thresh) |
Modifier and Type | Method and Description |
---|---|
Iterable<Neighbor> |
getCandidateNeighbors(UserHistory<? extends Event> user,
LongSet items)
Get potential neighbors for a particular user.
|
@Inject public SnapshotNeighborFinder(UserSnapshot snap, UserSimilarity sim, UserHistorySummarizer sum, UserVectorNormalizer norm, @UserSimilarityThreshold Threshold thresh)
public Iterable<Neighbor> getCandidateNeighbors(UserHistory<? extends Event> user, LongSet items)
NeighborFinder
getCandidateNeighbors
in interface NeighborFinder
user
- The user whose neighbors are wanted.items
- The items that the client needs to be able to score or recommend.user
. This collection may include
neighbors that are not useful for scoring any item in items
; the item set
is just to help the neighbor finder guide its search if relevant.