elliot.evaluation.metrics.diversity.shannon_entropy package

Submodules

elliot.evaluation.metrics.diversity.shannon_entropy.shannon_entropy module

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

class elliot.evaluation.metrics.diversity.shannon_entropy.shannon_entropy.ShannonEntropy(recommendations, config, params, eval_objects)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Shannon Entropy

This class represents the implementation of the Shannon Entropy recommendation metric.

For further details, please refer to the book

\[\mathrm {ShannonEntropy}=-\sum_{i=1}^{n} p(i) \log p(i)\]

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

simple_metrics: [SEntropy]
eval()[source]

Evaluation function :return: the overall value of Shannon Entropy

static name()[source]

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

Module contents