Recommender Class Reference

Helper class with utility methods for handling recommenders. More...

List of all members.

Public Member Functions

delegate void takes_string (string s)
 Delegate definition necessary to define Configure.

Static Public Member Functions

static T Configure< T > (T recommender, Dictionary< string, string > parameters, takes_string report_error)
 Configure a recommender.
static T Configure< T > (T recommender, string parameters)
 Configure a recommender.
static T Configure< T > (T recommender, string parameters, takes_string report_error)
 Configure a recommender.
static
ItemRecommendation.ItemRecommender 
CreateItemRecommender (Type type)
 Create an item recommender from a type object.
static
ItemRecommendation.ItemRecommender 
CreateItemRecommender (string typename)
 Create an item recommender from the type name.
static
RatingPrediction.RatingPredictor 
CreateRatingPredictor (Type type)
 Create a rating predictor from a type object.
static
RatingPrediction.RatingPredictor 
CreateRatingPredictor (string typename)
 Create a rating predictor from the type name.
static StreamReader GetReader (string filename, Type recommender_type)
 Get a reader object to read in model parameters of a recommender.
static StreamWriter GetWriter (string filename, Type recommender_type)
 Get a writer object to save the model parameters of a recommender.
static string[] List (string prefix)
 List all recommenders in a given namespace.
static void LoadModel (IRecommender recommender, string filename)
 Load the model parameters of a recommender (in a given iteration of the training) from a file.
static string Needs (IRecommender recommender)
 Describes the kind of data needed by this recommender.
static void SaveModel (IRecommender recommender, string filename, int iteration)
 Save the model parameters of a recommender (in a given iteration of the training) to a file.
static void SaveModel (IRecommender recommender, string filename)
 Save the model parameters of a recommender to a file.
static void SetProperty (IRecommender recommender, string key, string val)
 Sets a property of a MyMediaLite recommender.

Detailed Description

Helper class with utility methods for handling recommenders.

Contains methods for storing and loading recommender models, and for configuring recommenders.


Member Function Documentation

static T Configure< T > ( recommender,
Dictionary< string, string >  parameters,
takes_string  report_error 
) [static]

Configure a recommender.

Parameters:
recommender the recommender to configure
parameters a dictionary containing the parameters as key-value pairs
report_error void function that takes a string for error reporting
Returns:
the configured recommender
static T Configure< T > ( recommender,
string  parameters 
) [static]

Configure a recommender.

Parameters:
recommender the recommender to configure
parameters a string containing the parameters as key-value pairs
static T Configure< T > ( recommender,
string  parameters,
takes_string  report_error 
) [static]

Configure a recommender.

Parameters:
recommender the recommender to configure
parameters a string containing the parameters as key-value pairs
report_error void function that takes a string for error reporting
Returns:
the configured recommender
static ItemRecommendation.ItemRecommender CreateItemRecommender ( Type  type  )  [static]

Create an item recommender from a type object.

Parameters:
type the type object
Returns:
an item recommender object of type type
static ItemRecommendation.ItemRecommender CreateItemRecommender ( string  typename  )  [static]

Create an item recommender from the type name.

Parameters:
typename a string containing the type name
Returns:
an item recommender object of type typename if the recommender type is found, null otherwise
static RatingPrediction.RatingPredictor CreateRatingPredictor ( Type  type  )  [static]

Create a rating predictor from a type object.

Parameters:
type the type object
Returns:
a rating recommender object of type type
static RatingPrediction.RatingPredictor CreateRatingPredictor ( string  typename  )  [static]

Create a rating predictor from the type name.

Parameters:
typename a string containing the type name
Returns:
a rating recommender object of type typename if the recommender type is found, null otherwise
static StreamReader GetReader ( string  filename,
Type  recommender_type 
) [static]

Get a reader object to read in model parameters of a recommender.

Parameters:
filename the filename of the model file
recommender_type the expected recommender type
Returns:
a StreamReader
static StreamWriter GetWriter ( string  filename,
Type  recommender_type 
) [static]

Get a writer object to save the model parameters of a recommender.

Parameters:
filename the filename of the model file
recommender_type the recommender type
Returns:
a StreamWriter
static string [] List ( string  prefix  )  [static]

List all recommenders in a given namespace.

Parameters:
prefix a string representing the namespace
Returns:
an array of strings containing the recommender descriptions
static void LoadModel ( IRecommender  recommender,
string  filename 
) [static]

Load the model parameters of a recommender (in a given iteration of the training) from a file.

Does not load model if filename is an empty string.

Parameters:
recommender the IRecommender to save
filename the filename template
static string Needs ( IRecommender  recommender  )  [static]

Describes the kind of data needed by this recommender.

Parameters:
recommender a recommender
Returns:
a string containing the additional datafiles needed for training this recommender
static void SaveModel ( IRecommender  recommender,
string  filename,
int  iteration 
) [static]

Save the model parameters of a recommender (in a given iteration of the training) to a file.

Does not save if filename is an empty string.

Parameters:
recommender the IRecommender to save
filename the filename template
iteration the iteration (will be appended to the filename)
static void SaveModel ( IRecommender  recommender,
string  filename 
) [static]

Save the model parameters of a recommender to a file.

Does not save if filename is an empty string.

Parameters:
recommender the recommender to store
filename the filename (may include relative paths)
static void SetProperty ( IRecommender  recommender,
string  key,
string  val 
) [static]

Sets a property of a MyMediaLite recommender.

Parameters:
recommender An IRecommender
key the name of the property (case insensitive)
val the string representation of the value
delegate void takes_string ( string  s  ) 

Delegate definition necessary to define Configure.


The documentation for this class was generated from the following file:
Generated on Wed Jun 22 20:55:54 2011 for MyMediaLite by  doxygen 1.6.3