elliot.evaluation.metrics.diversity.gini_index package¶
Submodules¶
elliot.evaluation.metrics.diversity.gini_index.gini_index module¶
This is the implementation of the Gini Index metric. It proceeds from a user-wise computation, and average the values over the users.
-
class
elliot.evaluation.metrics.diversity.gini_index.gini_index.
GiniIndex
(recommendations, config, params, eval_objects)[source]¶ Bases:
elliot.evaluation.metrics.base_metric.BaseMetric
Gini Index
This class represents the implementation of the Gini Index recommendation metric.
For further details, please refer to the book
\[\mathrm {GiniIndex}=\frac{1}{n-1} \sum_{j=1}^{n}(2 j-n-1) p\left(i_{j}\right)\]\(i_{j}\) is the list of items ordered according to increasing p(i)
To compute the metric, add it to the config file adopting the following pattern:
simple_metrics: [Gini]