NReco.CF.Taste.Impl.Recommender NamespaceNReco.Recommender Class Library
 
Classes

  ClassDescription
Public classAbstractCandidateItemsStrategy
Abstract base implementation for retrieving candidate items to recommend
Public classAbstractRecommender
Public classAllSimilarItemsCandidateItemsStrategy
Returns the result of AllSimilarItemIDs(Int64) as candidate items
Public classAllUnknownItemsCandidateItemsStrategy
Return all items the user has not yet seen
Public classByRescoreComparator
Defines ordering on IRecommendedItem by the rescored value of the recommendations' estimated preference value, from high to low.
Public classByValueRecommendedItemComparator
Defines a natural ordering from most-preferred item (highest value) to least-preferred.
Public classCachingRecommender
A IRecommender which caches the results from another IRecommender in memory.
Public classEstimatedPreferenceCapper
Simple class which encapsulates restricting a preference value to a predefined range. The simple logic is wrapped up here for performance reasons.
Public classGenericBooleanPrefItemBasedRecommender
A variant on GenericItemBasedRecommender which is appropriate for use when no notion of preference value exists in the data.
Public classGenericBooleanPrefUserBasedRecommender
A variant on GenericUserBasedRecommender which is appropriate for use when no notion of preference value exists in the data.
Public classGenericItemBasedRecommender

A simple IRecommender which uses a given IDataModel and IItemSimilarity to produce recommendations. This class represents Taste's support for item-based recommenders.

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.

Public classGenericItemBasedRecommender MostSimilarEstimator
Public classGenericRecommendedItem
A simple implementation of IRecommendedItem.
Public classGenericUserBasedRecommender
A simple IRecommender which uses a given IDataModel and IUserNeighborhood to produce recommendations.
Public classItemAverageRecommender
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.
Public classItemUserAverageRecommender
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.
Public classNullRescorer
Public classNullRescorer T 
A simple [!:IRescorer] which always returns the original score.
Public classPreferredItemsNeighborhoodCandidateItemsStrategy
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.
Public classRandomRecommender
Produces random recommendations and preference estimates. This is likely only useful as a novelty and for benchmarking.
Public classSamplingCandidateItemsStrategy

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:

  1. The items that the user has preferred
  2. The users who also prefer each of those items
  3. The items those users also prefer

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.

Public classSimilarUser
Simply encapsulates a user and a similarity value.
Public classTopItems
A simple class that refactors the "find top N things" logic that is used in several places.
Interfaces

  InterfaceDescription
Public interfaceTopItems IEstimator T