Write item predictions (scores) for all users to a file
Declaring type: ItemPrediction
Namespace: MyMediaLite.Eval
Assembly: MyMediaLite
Collapse/Expand Syntax
C#
public static void WritePredictions (
        IRecommenderEngine engine,
        SparseBooleanMatrix train,
        ICollection<int> relevant_items,
        int num_predictions,
        EntityMapping user_mapping,
        EntityMapping item_mapping,
        string filename
) 
Parameters
engine
the IRecommenderEngine to use for making the predictions
train
a user-wise SparseBooleanMatrix containing the items already observed
relevant_items
the list of candidate items
num_predictions
the number of items to return per user, -1 if there should be no limit
user_mapping
an EntityMapping object for the user IDs
item_mapping
an EntityMapping object for the item IDs
filename
the name of the file to write to