elliot.evaluation.metrics.fairness.MAD package¶
Submodules¶
elliot.evaluation.metrics.fairness.MAD.ItemMADranking module¶
This is the implementation of the Item MAD ranking metric. It proceeds from a user-wise computation, and average the values over the users.
-
class
elliot.evaluation.metrics.fairness.MAD.ItemMADranking.
ItemMADranking
(recommendations, config, params, eval_objects, additional_data)[source]¶ Bases:
elliot.evaluation.metrics.base_metric.BaseMetric
Item MAD Ranking-based
This class represents the implementation of the Item MAD ranking recommendation metric.
For further details, please refer to the paper
\[\mathrm {MAD}={avg}_{i, j}({MAD}(R^{(i)}, R^{(j)}))\]To compute the metric, add it to the config file adopting the following pattern:
complex_metrics: - metric: ItemMADranking clustering_name: ItemPopularity clustering_file: ../data/movielens_1m/i_pop.tsv
elliot.evaluation.metrics.fairness.MAD.ItemMADrating module¶
This is the implementation of the Item MAD rating metric. It proceeds from a user-wise computation, and average the values over the users.
-
class
elliot.evaluation.metrics.fairness.MAD.ItemMADrating.
ItemMADrating
(recommendations, config, params, eval_objects, additional_data)[source]¶ Bases:
elliot.evaluation.metrics.base_metric.BaseMetric
Item MAD Rating-based
This class represents the implementation of the Item MAD rating recommendation metric.
For further details, please refer to the paper
\[\mathrm {MAD}={avg}_{i, j}({MAD}(R^{(i)}, R^{(j)}))\]To compute the metric, add it to the config file adopting the following pattern:
complex_metrics: - metric: ItemMADrating clustering_name: ItemPopularity clustering_file: ../data/movielens_1m/i_pop.tsv
elliot.evaluation.metrics.fairness.MAD.UserMADranking module¶
This is the implementation of the User MAD ranking metric. It proceeds from a user-wise computation, and average the values over the users.
-
class
elliot.evaluation.metrics.fairness.MAD.UserMADranking.
UserMADranking
(recommendations, config, params, eval_objects, additional_data)[source]¶ Bases:
elliot.evaluation.metrics.base_metric.BaseMetric
User MAD Ranking-based
This class represents the implementation of the User MAD ranking recommendation metric.
For further details, please refer to the paper
\[\mathrm {MAD}={avg}_{i, j}({MAD}(R^{(i)}, R^{(j)}))\]To compute the metric, add it to the config file adopting the following pattern:
complex_metrics: - metric: UserMADranking clustering_name: Happiness clustering_file: ../data/movielens_1m/u_happy.tsv
-
compute_idcg
(user: int, cutoff: int) → float[source]¶ Method to compute Ideal Discounted Cumulative Gain :param gain_map: :param cutoff: :return:
-
elliot.evaluation.metrics.fairness.MAD.UserMADrating module¶
This is the implementation of the User MAD rating metric. It proceeds from a user-wise computation, and average the values over the users.
-
class
elliot.evaluation.metrics.fairness.MAD.UserMADrating.
UserMADrating
(recommendations, config, params, eval_objects, additional_data)[source]¶ Bases:
elliot.evaluation.metrics.base_metric.BaseMetric
User MAD Rating-based
This class represents the implementation of the User MAD rating recommendation metric.
For further details, please refer to the paper
\[\mathrm {MAD}={avg}_{i, j}({MAD}(R^{(i)}, R^{(j)}))\]To compute the metric, add it to the config file adopting the following pattern:
complex_metrics: - metric: UserMADrating clustering_name: Happiness clustering_file: ../data/movielens_1m/u_happy.tsv
Module contents¶
This is the Precision metric module.
This module contains and expose the recommendation metric.