elliot.evaluation.metrics.bias.aplt package

Submodules

elliot.evaluation.metrics.bias.aplt.aplt module

This is the implementation of the Average percentage of long tail items metric. It proceeds from a user-wise computation, and average the values over the users.

class elliot.evaluation.metrics.bias.aplt.aplt.APLT(recommendations, config, params, eval_objects)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Average percentage of long tail items

This class represents the implementation of the Average percentage of long tail items recommendation metric.

For further details, please refer to the paper

\[\mathrm {ACLT}=\frac{1}{\left|U_{t}\right|} \sum_{u \in U_{t}} \frac{|\{i, i \in(L(u) \cap \sim \Phi)\}|}{|L(u)|}\]

\(U_{t}\) is the number of users in the test set.

\(L_{u}\) is the recommended list of items for user u.

\(\sim \Phi\) medium-tail items.

To compute the metric, add it to the config file adopting the following pattern:

simple_metrics: [APLT]
eval_user_metric()[source]

Evaluation function :return: the overall averaged value of APLT

static name()[source]

Metric Name Getter :return: returns the public name of the metric

Module contents