Evaluation class for item recommendation. More...
Static Public Member Functions | |
| static Dictionary< string, double > | Evaluate (IRecommender recommender, IPosOnlyFeedback test, IPosOnlyFeedback training, IList< int > test_users, IList< int > candidate_items, CandidateItems candidate_item_mode=CandidateItems.OVERLAP, bool repeated_events=false) |
| Evaluation for rankings of items. | |
| static string | FormatResults (Dictionary< string, double > result) |
| Format item prediction results. | |
Properties | |
| static ICollection< string > | Measures [get] |
| the evaluation measures for item prediction offered by the class | |
Evaluation class for item recommendation.
| static Dictionary<string, double> Evaluate | ( | IRecommender | recommender, | |
| IPosOnlyFeedback | test, | |||
| IPosOnlyFeedback | training, | |||
| IList< int > | test_users, | |||
| IList< int > | candidate_items, | |||
| CandidateItems | candidate_item_mode = CandidateItems.OVERLAP, |
|||
| bool | repeated_events = false | |||
| ) | [inline, static] |
Evaluation for rankings of items.
User-item combinations that appear in both sets are ignored for the test set, and thus in the evaluation, except the boolean argument repeated_events is set.
The evaluation measures are listed in the Measures property. Additionally, 'num_users' and 'num_items' report the number of users that were used to compute the results and the number of items that were taken into account.
Literature:
On multi-core/multi-processor systems, the routine tries to use as many cores as possible, which should to an almost linear speed-up.
| recommender | item recommender | |
| test | test cases | |
| training | training data | |
| test_users | a list of integers with all test users | |
| candidate_items | a list of integers with all candidate items | |
| candidate_item_mode | the mode used to determine the candidate items | |
| repeated_events | allow repeated events in the evaluation (i.e. items accessed by a user before may be in the recommended list) |
| static string FormatResults | ( | Dictionary< string, double > | result | ) | [inline, static] |
Format item prediction results.
| result | the result dictionary |
ICollection<string> Measures [static, get] |
the evaluation measures for item prediction offered by the class
The evaluation measures currently are:
An item recommender is better than another according to one of those measures its score is higher.
1.6.3