hopwise.evaluator.register¶
Attributes¶
Classes¶
Register module load the registry according to the metrics in config. |
|
Register module load the registry according to the metrics in config. |
Functions¶
|
Collect information of all metrics, including: |
Module Contents¶
- hopwise.evaluator.register.cluster_info(module_name)¶
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 hopwise, 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
hopwise.evaluator.metrics.- Returns:
Three dictionaries containing the above information and a dictionary matching metric names to metric classes.
- Return type:
dict
- hopwise.evaluator.register.metric_module_name = 'hopwise.evaluator.metrics'¶
- class hopwise.evaluator.register.Register(config)¶
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
- config¶
- metrics¶
- _build_register()¶
- has_metric(metric: str)¶
- need(key: str)¶