C# Class MyMediaLite.AttrToFactor.BPRMF_UserMapping

User attribute to latent factor mapping for BPR-MF, optimized for RMSE on the latent factors
Inheritance: BPRMF_Mapping, IUserAttributeAwareRecommender
Show file Open project: zenogantner/MML-KDD

Protected Properties

Property Type Description
user_attributes MyMediaLite.DataType.SparseBooleanMatrix

Public Methods

Method Description
IterateMapping ( ) : void
LearnAttributeToFactorMapping ( ) : void
Predict ( int user_id, int item_id ) : double
ToString ( ) : string

Protected Methods

Method Description
ComputeMappingFit ( ) : double[]
MapUserToLatentFactorSpace ( ICollection user_attributes ) : double[]

map from user attributes to latent factor space

SampleUserWithAttributes ( ) : int

Samples an user for the mapping training. Only users that are associated with at least one item, and that actually have attributes, are taken into account.

Method Details

ComputeMappingFit() protected method

protected ComputeMappingFit ( ) : double[]
return double[]

IterateMapping() public method

public IterateMapping ( ) : void
return void

LearnAttributeToFactorMapping() public method

public LearnAttributeToFactorMapping ( ) : void
return void

MapUserToLatentFactorSpace() protected method

map from user attributes to latent factor space
protected MapUserToLatentFactorSpace ( ICollection user_attributes ) : double[]
user_attributes ICollection
return double[]

Predict() public method

public Predict ( int user_id, int item_id ) : double
user_id int
item_id int
return double

SampleUserWithAttributes() protected method

Samples an user for the mapping training. Only users that are associated with at least one item, and that actually have attributes, are taken into account.
protected SampleUserWithAttributes ( ) : int
return int

ToString() public method

public ToString ( ) : string
return string

Property Details

user_attributes protected property

The matrix storing the user attributes
protected SparseBooleanMatrix,MyMediaLite.DataType user_attributes
return MyMediaLite.DataType.SparseBooleanMatrix