elliot.evaluation.metrics.rating.mse package

Submodules

elliot.evaluation.metrics.rating.mse.mse module

This is the implementation of the Mean Squared Error metric. It proceeds from a system-wise computation.

class elliot.evaluation.metrics.rating.mse.mse.MSE(recommendations, config, params, eval_objects)[source]

Bases: elliot.evaluation.metrics.base_metric.BaseMetric

Mean Squared Error

This class represents the implementation of the Mean Squared Error recommendation metric.

For further details, please refer to the link

\[\mathrm{MSE} = \frac{1}{|{T}|} \sum_{(u, i) \in {T}}(\hat{r}_{u i}-r_{u i})^{2}\]

\(T\) is the test set, \(\hat{r}_{u i}\) is the score predicted by the model

\(r_{u i}\) the actual score of the test set.

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

simple_metrics: [MSE]
eval()[source]

Evaluation function :return: the overall averaged value of Mean Squared Error

eval_user_metric()[source]

Evaluation function :return: the overall averaged value of Mean Squared Error per user

static name()[source]

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

static needs_full_recommendations()[source]

Module contents