Abstract base implementation for retrieving candidate items to recommend
Returns the result of AllSimilarItemIDs(Int64) as candidate items
Return all items the user has not yet seen
Defines ordering on IRecommendedItem by the rescored value of the recommendations' estimated preference value, from high to low.
Defines a natural ordering from most-preferred item (highest value) to least-preferred.
Simple class which encapsulates restricting a preference value to a predefined range. The simple logic is wrapped up here for performance reasons.
A variant on GenericItemBasedRecommender which is appropriate for use when no notion of preference value exists in the data.
A variant on GenericUserBasedRecommender which is appropriate for use when no notion of preference value exists in the data.
The IItemSimilarity is the most important point to discuss here. Item-based recommenders are useful because they can take advantage of something to be very fast: they base their computations on item similarity, not user similarity, and item similarity is relatively static. It can be precomputed, instead of re-computed in real time.
Thus it's strongly recommended that you use GenericItemSimilarity with pre-computed similarities if you're going to use this class. You can use PearsonCorrelationSimilarity too, which computes similarities in real-time, but will probably find this painfully slow for large amounts of data.
A simple implementation of IRecommendedItem.
A simple recommender that always estimates preference for an item to be the average of all known preference values for that item. No information about users is taken into account. This implementation is provided for experimentation; while simple and fast, it may not produce very good recommendations.
Like ItemAverageRecommender, except that estimated preferences are adjusted for the users' average preference value. For example, say user X has not rated item Y. Item Y's average preference value is 3.5. User X's average preference value is 4.2, and the average over all preference values is 4.0. User X prefers items 0.2 higher on average, so, the estimated preference for user X, item Y is 3.5 + 0.2 = 3.7.
A simplewhich always returns the original score.
Returns all items that have not been rated by the user and that were preferred by another user that has preferred at least one item that the current user has preferred too.
Produces random recommendations and preference estimates. This is likely only useful as a novelty and for benchmarking.
Returns all items that have not been rated by the user (3) and that were preferred by another user (2) that has preferred at least one item (1) that the current user has preferred too.
This strategy uses sampling to limit the number of items that are considered, by sampling three different things, noted above:
There is a maximum associated with each of these three things; if the number of items or users exceeds that max, it is sampled so that the expected number of items or users actually used in that part of the computation is equal to the max.
Three arguments control these three maxima. Each is a "factor" f, which establishes the max at f * log2(n), where n is the number of users or items in the data. For example if factor #2 is 5, which controls the number of users sampled per item, then 5 * log2(# users) is the maximum for this part of the computation.
Each can be set to not do any limiting with value NO_LIMIT_FACTOR.
Simply encapsulates a user and a similarity value.
A simple class that refactors the "find top N things" logic that is used in several places.
|TopItems IEstimator T