Interface IRecommenderEvaluatorMapping<TInstanceSource, TUser, TItem, TRating>
A mapping used by the RecommenderEvaluator<TInstanceSource, TUser, TItem, TGroundTruthRating, TPredictedRating, TPredictedRatingDist> class.
Namespace: Microsoft.ML.Probabilistic.Learners.Mappings
Assembly: Microsoft.ML.Probabilistic.Learners.Recommender.dll
Syntax
public interface IRecommenderEvaluatorMapping<in TInstanceSource, TUser, TItem, out TRating>
Type Parameters
Name | Description |
---|---|
TInstanceSource | The type of an instance source. |
TUser | The type of a user. |
TItem | The type of an item. |
TRating | The type of a rating. |
Methods
GetItems(TInstanceSource)
Gets the list of items from a given instance source.
Declaration
IEnumerable<TItem> GetItems(TInstanceSource instanceSource)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The instance source to get the list of items from. |
Returns
Type | Description |
---|---|
IEnumerable<TItem> | The list of items. |
GetItemsRatedByUser(TInstanceSource, TUser)
Gets the list of items rated by a particular user.
Declaration
IEnumerable<TItem> GetItemsRatedByUser(TInstanceSource instanceSource, TUser user)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The instance source to get the list of items from. |
TUser | user | The user who rated the items of interest. |
Returns
Type | Description |
---|---|
IEnumerable<TItem> | The list of items rated by the user. |
GetRating(TInstanceSource, TUser, TItem)
Gets the rating given by a user to an item.
Declaration
TRating GetRating(TInstanceSource instanceSource, TUser user, TItem item)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The instance source to get the rating from. |
TUser | user | The user. |
TItem | item | The item. |
Returns
Type | Description |
---|---|
TRating | The rating. |
GetUsers(TInstanceSource)
Gets the list of users from a given instance source.
Declaration
IEnumerable<TUser> GetUsers(TInstanceSource instanceSource)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The instance source to get the list of users from. |
Returns
Type | Description |
---|---|
IEnumerable<TUser> | The list of users. |
GetUsersWhoRatedItem(TInstanceSource, TItem)
Gets the list of users who rated a particular item.
Declaration
IEnumerable<TUser> GetUsersWhoRatedItem(TInstanceSource instanceSource, TItem item)
Parameters
Type | Name | Description |
---|---|---|
TInstanceSource | instanceSource | The instance source to get the list of users from. |
TItem | item | The item rated by the users of interest. |
Returns
Type | Description |
---|---|
IEnumerable<TUser> | The list of users who rated the item. |