C# Class MyMediaLite.RatingPrediction.RatingPredictor

Abstract class for rating predictors that keep the rating data in memory for training (and possibly prediction)
Inheritance: IRatingPredictor, ICloneable
Show file Open project: zenogantner/MML-KDD Class Usage Examples

Protected Properties

Property Type Description
max_rating double
min_rating double
ratings IRatings

Public Methods

Method Description
AddRating ( int user_id, int item_id, double rating ) : void
CanPredict ( int user_id, int item_id ) : bool
Clone ( ) : Object

create a shallow copy of the object

LoadModel ( string filename ) : void
Predict ( int user_id, int item_id ) : double
RatingPredictor ( ) : System

Default constructor

RemoveItem ( int item_id ) : void
RemoveRating ( int user_id, int item_id ) : void
RemoveUser ( int user_id ) : void
SaveModel ( string filename ) : void
ToString ( ) : string
Train ( ) : void
UpdateRating ( int user_id, int item_id, double rating ) : void

Protected Methods

Method Description
AddItem ( int item_id ) : void
AddUser ( int user_id ) : void

Method Details

AddItem() protected method

protected AddItem ( int item_id ) : void
item_id int
return void

AddRating() public method

public AddRating ( int user_id, int item_id, double rating ) : void
user_id int
item_id int
rating double
return void

AddUser() protected method

protected AddUser ( int user_id ) : void
user_id int
return void

CanPredict() public method

public CanPredict ( int user_id, int item_id ) : bool
user_id int
item_id int
return bool

Clone() public method

create a shallow copy of the object
public Clone ( ) : Object
return Object

LoadModel() public abstract method

public abstract LoadModel ( string filename ) : void
filename string
return void

Predict() public abstract method

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

RatingPredictor() public method

Default constructor
public RatingPredictor ( ) : System
return System

RemoveItem() public method

public RemoveItem ( int item_id ) : void
item_id int
return void

RemoveRating() public method

public RemoveRating ( int user_id, int item_id ) : void
user_id int
item_id int
return void

RemoveUser() public method

public RemoveUser ( int user_id ) : void
user_id int
return void

SaveModel() public abstract method

public abstract SaveModel ( string filename ) : void
filename string
return void

ToString() public method

public ToString ( ) : string
return string

Train() public abstract method

public abstract Train ( ) : void
return void

UpdateRating() public method

public UpdateRating ( int user_id, int item_id, double rating ) : void
user_id int
item_id int
rating double
return void

Property Details

max_rating protected property

The max rating value
protected double max_rating
return double

min_rating protected property

The min rating value
protected double min_rating
return double

ratings protected property

rating data
protected IRatings ratings
return IRatings