recbole.evaluator.register¶
- class recbole.evaluator.register.Register(config)[source]¶
Bases:
objectRegister module load the registry according to the metrics in config. It is a member of DataCollector. The DataCollector collect the resource that need for Evaluator under the guidance of Register
- recbole.evaluator.register.cluster_info(module_name)[source]¶
Collect information of all metrics, including:
metric_need: Information needed to calculate this metric, the combination ofrec.items, rec.topk, rec.meanrank, rec.score, data.num_items, data.num_users, data.count_items, data.count_users, data.label.metric_type: Whether the scores required by metric are grouped by user, range inEvaluatorType.RANKINGandEvaluatorType.VALUE.smaller: Whether the smaller metric value represents better performance, range inTrueandFalse, default toFalse.
Note
For
metric_type: in current RecBole, all the “grouped-score” metrics are ranking-based and all the “non-grouped-score” metrics are value-based. To keep with our paper, we adopted the more formal terms:RANKINGandVALUE.- Parameters:
module_name (str) – the name of module
recbole.evaluator.metrics.- Returns:
Three dictionaries containing the above information and a dictionary matching metric names to metric classes.
- Return type:
dict