Class MatchboxRecommender
Matchbox recommender factory.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Learners
Assembly: Microsoft.ML.Probabilistic.Learners.Recommender.dll
Syntax
public static class MatchboxRecommender
Methods
Create<TInstanceSource, TFeatureSource>(IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource>)
Creates a Matchbox recommender from a native data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, int, int, Discrete, TFeatureSource> Create<TInstanceSource, TFeatureSource>(IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> | mapping | The mapping used for accessing data in the native format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, Int32, Int32, Discrete, TFeatureSource> | The recommender instance. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TFeatureSource | The type of a feature source. |
Create<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector>)
Creates a recommender from a standard data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<int, double>, TFeatureSource> Create<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> | mapping | The mapping used for accessing data in the standard format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<Int32, Double>, TFeatureSource> | The recommender instance. |
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. |
Load<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource>(Stream, IFormatter)
Deserializes a recommender from a given stream and formatter.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource> Load<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource>(Stream stream, IFormatter formatter)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The stream. |
| IFormatter | formatter | The formatter. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource> | The deserialized recommender object. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TUser | The type of a user. |
| TItem | The type of an item. |
| TRatingDistribution | The type of a distribution over ratings. |
| TFeatureSource | The type of a feature source. |
Load<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource>(String)
Deserializes a Matchbox recommender from a file.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource> Load<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource>(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fileName | The file name. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, TRatingDistribution, TFeatureSource> | The deserialized recommender object. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TUser | The type of a user. |
| TItem | The type of an item. |
| TRatingDistribution | The type of a distribution over ratings. |
| TFeatureSource | The type of a feature source. |
LoadBackwardCompatible<TInstanceSource, TFeatureSource>(IReader, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource>)
Deserializes a Matchbox recommender from a reader to a binary stream and a native data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, int, int, Discrete, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TFeatureSource>(IReader reader, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IReader | reader | The reader of a binary stream to a serialized Matchbox recommender. |
| IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> | mapping | The mapping used for accessing data in the native format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, Int32, Int32, Discrete, TFeatureSource> | The deserialized recommender object. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TFeatureSource | The type of a feature source. |
LoadBackwardCompatible<TInstanceSource, TFeatureSource>(Stream, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource>)
Deserializes a Matchbox recommender from a binary stream and a native data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, int, int, Discrete, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TFeatureSource>(Stream stream, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The binary stream to a serialized Matchbox recommender. |
| IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> | mapping | The mapping used for accessing data in the native format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, Int32, Int32, Discrete, TFeatureSource> | The deserialized recommender object. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TFeatureSource | The type of a feature source. |
LoadBackwardCompatible<TInstanceSource, TFeatureSource>(String, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource>)
Deserializes a Matchbox recommender from a file with the specified name and a native data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, int, int, Discrete, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TFeatureSource>(string fileName, IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fileName | The name of the file of a serialized Matchbox recommender. |
| IMatchboxRecommenderMapping<TInstanceSource, TFeatureSource> | mapping | The mapping used for accessing data in the native format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, Int32, Int32, Discrete, TFeatureSource> | The deserialized recommender object. |
Type Parameters
| Name | Description |
|---|---|
| TInstanceSource | The type of a source of instances. |
| TFeatureSource | The type of a feature source. |
LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(IReader, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector>)
Deserializes a Matchbox recommender from a reader to a binary stream and a standard data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<int, double>, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(IReader reader, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| IReader | reader | The reader of a binary stream to a serialized Matchbox recommender. |
| IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> | mapping | The mapping used for accessing data in the standard format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<Int32, Double>, TFeatureSource> | The deserialized recommender object. |
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. |
LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(Stream, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector>)
Deserializes a Matchbox recommender from a binary stream and a standard data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<int, double>, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(Stream stream, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | The binary stream to a serialized Matchbox recommender. |
| IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> | mapping | The mapping used for accessing data in the standard format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<Int32, Double>, TFeatureSource> | The deserialized recommender object. |
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. |
LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(String, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector>)
Deserializes a Matchbox recommender from a file with the specified name and a standard data format mapping.
Declaration
public static IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<int, double>, TFeatureSource> LoadBackwardCompatible<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource>(string fileName, IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> mapping)
Parameters
| Type | Name | Description |
|---|---|---|
| String | fileName | The name of the file of a serialized Matchbox recommender. |
| IStarRatingRecommenderMapping<TInstanceSource, TInstance, TUser, TItem, TRating, TFeatureSource, Vector> | mapping | The mapping used for accessing data in the standard format. |
Returns
| Type | Description |
|---|---|
| IMatchboxRecommender<TInstanceSource, TUser, TItem, IDictionary<Int32, Double>, TFeatureSource> | The deserialized recommender object. |
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. |