C# Class MyMediaLite.AttrToFactor.BPRMF_ItemMapping

BPR-MF with item mapping learned by regularized least-squares regression
Inheritance: BPRMF_Mapping, IItemAttributeAwareRecommender
Datei anzeigen Open project: zenogantner/MML-KDD

Protected Properties

Property Type Description
_MapToLatentFactorSpace double[]>.Func
factor_bias double[]
item_attributes MyMediaLite.DataType.SparseBooleanMatrix

Public Methods

Method Description
IterateMapping ( ) : void

Perform one iteration of the mapping learning process

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

Protected Methods

Method Description
ComputeMappingFit ( ) : double[]

Compute the fit of the mapping

MapToLatentFactorSpace ( int item_id ) : double[]

map to latent factor space (method to be called)

SampleItem ( ) : int

Samples an item for the mapping training. Only items that are associated with at least one user are taken into account.

__MapToLatentFactorSpace ( int item_id ) : double[]

map to latent factor space (actual function)

Method Details

ComputeMappingFit() protected method

Compute the fit of the mapping
protected ComputeMappingFit ( ) : double[]
return double[]

IterateMapping() public method

Perform one iteration of the mapping learning process
public IterateMapping ( ) : void
return void

LearnAttributeToFactorMapping() public method

public LearnAttributeToFactorMapping ( ) : void
return void

MapToLatentFactorSpace() protected method

map to latent factor space (method to be called)
protected MapToLatentFactorSpace ( int item_id ) : double[]
item_id int
return double[]

Predict() public method

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

SampleItem() protected method

Samples an item for the mapping training. Only items that are associated with at least one user are taken into account.
protected SampleItem ( ) : int
return int

ToString() public method

public ToString ( ) : string
return string

__MapToLatentFactorSpace() protected method

map to latent factor space (actual function)
protected __MapToLatentFactorSpace ( int item_id ) : double[]
item_id int
return double[]

Property Details

_MapToLatentFactorSpace protected_oe property

map to latent factor space (field)
protected Func _MapToLatentFactorSpace
return double[]>.Func

factor_bias protected_oe property

array to store the bias for each mapping
protected double[] factor_bias
return double[]

item_attributes protected_oe property

The matrix storing the item attributes
protected SparseBooleanMatrix,MyMediaLite.DataType item_attributes
return MyMediaLite.DataType.SparseBooleanMatrix