Class TrainTestSplittingStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues>
Represents TrainTestSplittingRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues> for star-rating based recommenders.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Learners.Mappings
Assembly: Microsoft.ML.Probabilistic.Learners.Recommender.dll
Syntax
public class TrainTestSplittingStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues> : TrainTestSplittingRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues>, IStarRatingRecommenderMapping<SplitInstanceSource<TInstanceSource>, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues>, IRatingRecommenderMapping<SplitInstanceSource<TInstanceSource>, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues>, IRecommenderMapping<SplitInstanceSource<TInstanceSource>, TInstance, TUser, TItem, TFeatureSource, TFeatureValues>
Type Parameters
Name | Description |
---|---|
TInstanceSource | The type of a source of instances. |
TInstance | The type of an instance. |
TUser | The type of a user. |
TItem | The type of an item. |
TRating | The type of a rating. |
TFeatureSource | The type of a feature source. |
TFeatureValues | The type of the feature values. |
Constructors
TrainTestSplittingStarRatingRecommenderMapping(IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues>, Double, Double, Double, Double, Double, Double, Boolean)
Initializes a new instance of the TrainTestSplittingStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues> class.
Declaration
public TrainTestSplittingStarRatingRecommenderMapping(IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues> mapping, double trainingOnlyUserFraction, double testUserRatingTrainingFraction, double coldUserFraction = 0, double coldItemFraction = 0, double ignoredUserFraction = 0, double ignoredItemFraction = 0, bool removeOccasionalColdItems = false)
Parameters
Type | Name | Description |
---|---|---|
IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, TFeatureValues> | mapping | The wrapped recommender mapping. |
Double | trainingOnlyUserFraction | The fraction of users included in the training set only. |
Double | testUserRatingTrainingFraction | The fraction of ratings in the training set for each user who is presented in both sets. |
Double | coldUserFraction | The fraction of users included in the test set only. |
Double | coldItemFraction | The fraction of items included in the test set only. |
Double | ignoredUserFraction | The fraction of users not included in either the training or the test set. |
Double | ignoredItemFraction | The fraction of items not included in either the training or the test set. |
Boolean | removeOccasionalColdItems | Whether the occasionally produced cold items should be removed from the test set. |
Methods
GetRatingInfo(SplitInstanceSource<TInstanceSource>)
Provides the object describing how ratings provided by the instance source map to stars by delegating the call to the wrapped mapping.
Declaration
public IStarRatingInfo<TRating> GetRatingInfo(SplitInstanceSource<TInstanceSource> instanceSource)
Parameters
Type | Name | Description |
---|---|---|
SplitInstanceSource<TInstanceSource> | instanceSource | The instance source. |
Returns
Type | Description |
---|---|
IStarRatingInfo<TRating> | The object describing how ratings provided by the instance source map to stars. |