elliot.evaluation.metrics.fairness.BiasDisparity package

Submodules

elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBD module

This is the implementation of the Bias Disparity metric. It proceeds from a user-wise computation, and average the values over the users.

class elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBD.BiasDisparityBD(recommendations, config, params, eval_objects, additional_data)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Bias Disparity - Standard

This class represents the implementation of the Bias Disparity recommendation metric.

For further details, please refer to the paper

\[\mathrm {BD(G, C)}=\frac{B_{R}(G, C)-B_{S}(G, C)}{B_{S}(G, C)}\]

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

complex_metrics:
    - metric: BiasDisparityBD
      user_clustering_name: Happiness
      user_clustering_file: ../data/movielens_1m/u_happy.tsv
      item_clustering_name: ItemPopularity
      item_clustering_file: ../data/movielens_1m/i_pop.tsv
eval()[source]
get()[source]
name()[source]

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

process()[source]

Evaluation function :return: the overall value of Bias Disparity

elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBR module

This is the implementation of the Bias Disparity - Bias Recommendations metric. It proceeds from a user-wise computation, and average the values over the users.

class elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBR.BiasDisparityBR(recommendations, config, params, eval_objects, additional_data)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Bias Disparity - Bias Recommendations

This class represents the implementation of the Bias Disparity - Bias Recommendations recommendation metric.

For further details, please refer to the paper

\[\mathrm {BD(G, C)}=\frac{B_{R}(G, C)-B_{S}(G, C)}{B_{S}(G, C)}\]

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

complex_metrics:
    - metric: BiasDisparityBR
      user_clustering_name: Happiness
      user_clustering_file: ../data/movielens_1m/u_happy.tsv
      item_clustering_name: ItemPopularity
      item_clustering_file: ../data/movielens_1m/i_pop.tsv
eval()[source]
get()[source]
get_BR()[source]
name()[source]

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

process()[source]

Evaluation function :return: the overall value of Bias Disparity - Bias Recommendations

elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBS module

This is the implementation of the Bias Disparity - Bias Source metric. It proceeds from a user-wise computation, and average the values over the users.

class elliot.evaluation.metrics.fairness.BiasDisparity.BiasDisparityBS.BiasDisparityBS(recommendations, config, params, eval_objects, additional_data)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Bias Disparity - Bias Source

This class represents the implementation of the Bias Disparity - Bias Source recommendation metric.

For further details, please refer to the paper

\[\mathrm {B_{S}(G, C)}=\frac{P R_{S}(G, C)}{P(C)}\]

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

complex_metrics:
    - metric: BiasDisparityBS
      user_clustering_name: Happiness
      user_clustering_file: ../data/movielens_1m/u_happy.tsv
      item_clustering_name: ItemPopularity
      item_clustering_file: ../data/movielens_1m/i_pop.tsv
eval()[source]
get()[source]
get_BS()[source]
name()[source]

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

process()[source]

Evaluation function :return: the overall value of Bias Disparity - Bias Source

Module contents