recbole.evaluator.evaluator

class recbole.evaluator.evaluator.Evaluator(config)[source]

Bases: object

Evaluator is used to check parameter correctness, and summarize the results of all metrics.

evaluate(dataobject: recbole.evaluator.collector.DataStruct)[source]

calculate all the metrics. It is called at the end of each epoch

Parameters

dataobject (DataStruct) – It contains all the information needed for metrics.

Returns

such as {'hit@20': 0.3824, 'recall@20': 0.0527, 'hit@10': 0.3153, 'recall@10': 0.0329, 'gauc': 0.9236}

Return type

collections.OrderedDict