recbole.evaluator.abstract_evaluator¶
-
class
recbole.evaluator.abstract_evaluator.
BaseEvaluator
(config, metrics)[source]¶ Bases:
object
BaseEvaluator
is an object which supports the evaluation of the model. It is called byTrainer
.Note
If you want to inherit this class and implement your own evaluator class, you must implement the following functions.
- Parameters
config (Config) – The config of evaluator.
-
class
recbole.evaluator.abstract_evaluator.
GroupedEvaluator
(config, metrics)[source]¶ Bases:
recbole.evaluator.abstract_evaluator.BaseEvaluator
GroupedEvaluator
is an object which supports the evaluation of the model.Note
If you want to implement a new group-based metric, you may need to inherit this class
-
full_sort_collect
(scores_tensor, user_len_list)[source]¶ it is called when evaluation sample distribution is full.
-
-
class
recbole.evaluator.abstract_evaluator.
IndividualEvaluator
(config, metrics)[source]¶ Bases:
recbole.evaluator.abstract_evaluator.BaseEvaluator
IndividualEvaluator
is an object which supports the evaluation of the model.Note
If you want to implement a new non-group-based metric, you may need to inherit this class
-
full_sort_collect
(true_scores, pred_scores)[source]¶ it is called when evaluation sample distribution is full.
-