recbole.evaluator.register¶
- class recbole.evaluator.register.Register(config)[source]¶
Bases:
object
Register 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.RANKING
andEvaluatorType.VALUE
.smaller
: Whether the smaller metric value represents better performance, range inTrue
andFalse
, 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:RANKING
andVALUE
.- 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