langfair.metrics.classification.metrics.baseclass.metrics.Metric#

class langfair.metrics.classification.metrics.baseclass.metrics.Metric#

Bases: ABC

Abstract base class of all recommendation metrics. Serves as a template for creating new metric functions.

__init__()#

Methods

__init__()

binary_confusion_matrix(y_true, y_pred)

evaluate(groups, y_pred[, y_true, ratio])

Abstract method that needs to be implemented by the user when creating a new metric function.

abstract evaluate(groups, y_pred, y_true=None, ratio=False)#

Abstract method that needs to be implemented by the user when creating a new metric function.

Return type:

float