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:
- The items that the user has preferred
- The users who also prefer each of those items
- 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.
NReco.CF.Taste.Impl.Recommender AbstractCandidateItemsStrategy
NReco.CF.Taste.Impl.Recommender SamplingCandidateItemsStrategy
Namespace: NReco.CF.Taste.Impl.Recommender
Assembly: NReco.Recommender (in NReco.Recommender.dll) Version: 1.0.0.0 (1.0.0.0)
The SamplingCandidateItemsStrategy type exposes the following members.
Name | Description | |
---|---|---|
SamplingCandidateItemsStrategy(Int32, Int32) | Initializes a new instance of the SamplingCandidateItemsStrategy class | |
SamplingCandidateItemsStrategy(Int32, Int32, Int32, Int32, Int32) | Initializes a new instance of the SamplingCandidateItemsStrategy class |
Name | Description | |
---|---|---|
doGetCandidateItems | (Overrides AbstractCandidateItemsStrategy doGetCandidateItems( Int64 , IDataModel).) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetCandidateItems( Int64 , IDataModel) | (Inherited from AbstractCandidateItemsStrategy.) | |
GetCandidateItems(Int64, IPreferenceArray, IDataModel) | (Inherited from AbstractCandidateItemsStrategy.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Refresh | (Inherited from AbstractCandidateItemsStrategy.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DEFAULT_FACTOR | ||
NO_LIMIT_FACTOR |