C# Class MyMediaLite.ItemRecommendation.Prediction

Class that contains static methods for item prediction
Exibir arquivo Open project: zenogantner/MML-KDD

Public Methods

Method Description
PredictItems ( IRecommender recommender, int user_id, ICollection relevant_items ) : int[]

Predict items for a given user

PredictItems ( IRecommender recommender, int user_id, int max_item_id ) : int[]

predict items for a specific users

WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void

Write item predictions (scores) for all users to a TextWriter object

WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, string filename ) : void

Write item predictions (scores) for all users to a file

WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, IList relevant_users, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void

Write item predictions (scores) to a TextWriter object

WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, IList relevant_users, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, string filename ) : void

Write item predictions (scores) to a file

WritePredictions ( IRecommender recommender, int user_id, ICollection relevant_items, ICollection ignore_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void

Write item predictions (scores) to a TextWriter object

Method Details

PredictItems() public static method

Predict items for a given user
public static PredictItems ( IRecommender recommender, int user_id, ICollection relevant_items ) : int[]
recommender IRecommender the recommender to use
user_id int the numerical ID of the user
relevant_items ICollection a collection of numerical IDs of relevant items
return int[]

PredictItems() public static method

predict items for a specific users
public static PredictItems ( IRecommender recommender, int user_id, int max_item_id ) : int[]
recommender IRecommender the object to use for the predictions
user_id int the user ID
max_item_id int the maximum item ID
return int[]

WritePredictions() public static method

Write item predictions (scores) for all users to a TextWriter object
public static WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void
recommender IRecommender the to use for making the predictions
train IPosOnlyFeedback a user-wise containing the items already observed
relevant_items ICollection the list of candidate items
num_predictions int the number of items to return per user, -1 if there should be no limit
user_mapping IEntityMapping an object for the user IDs
item_mapping IEntityMapping an object for the item IDs
writer System.IO.TextWriter the to write to
return void

WritePredictions() public static method

Write item predictions (scores) for all users to a file
public static WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, string filename ) : void
recommender IRecommender the to use for making the predictions
train IPosOnlyFeedback a user-wise containing the items already observed
relevant_items ICollection the list of candidate items
num_predictions int the number of items to return per user, -1 if there should be no limit
user_mapping IEntityMapping an object for the user IDs
item_mapping IEntityMapping an object for the item IDs
filename string the name of the file to write to
return void

WritePredictions() public static method

Write item predictions (scores) to a TextWriter object
public static WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, IList relevant_users, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void
recommender IRecommender the to use for making the predictions
train IPosOnlyFeedback a user-wise containing the items already observed
relevant_users IList a list of users to make recommendations for
relevant_items ICollection the list of candidate items
num_predictions int the number of items to return per user, -1 if there should be no limit
user_mapping IEntityMapping an object for the user IDs
item_mapping IEntityMapping an object for the item IDs
writer System.IO.TextWriter the to write to
return void

WritePredictions() public static method

Write item predictions (scores) to a file
public static WritePredictions ( IRecommender recommender, IPosOnlyFeedback train, IList relevant_users, ICollection relevant_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, string filename ) : void
recommender IRecommender the to use for making the predictions
train IPosOnlyFeedback a user-wise containing the items already observed
relevant_users IList a list of users to make recommendations for
relevant_items ICollection the list of candidate items
num_predictions int the number of items to return per user, -1 if there should be no limit
user_mapping IEntityMapping an object for the user IDs
item_mapping IEntityMapping an object for the item IDs
filename string the name of the file to write to
return void

WritePredictions() public static method

Write item predictions (scores) to a TextWriter object
public static WritePredictions ( IRecommender recommender, int user_id, ICollection relevant_items, ICollection ignore_items, int num_predictions, IEntityMapping user_mapping, IEntityMapping item_mapping, TextWriter writer ) : void
recommender IRecommender the to use for making the predictions
user_id int the ID of the user to make recommendations for
relevant_items ICollection the list of candidate items
ignore_items ICollection a list of items for which no predictions should be made
num_predictions int the number of items to return per user, -1 if there should be no limit
user_mapping IEntityMapping an object for the user IDs
item_mapping IEntityMapping an object for the item IDs
writer System.IO.TextWriter the to write to
return void