Taking historical data into account

class embedded_voting.RuleRatingsHistory(rule, embeddings_from_ratings=None, f=None)[source]

Rule that use the ratings history to improve the embeddings, in particular the quality of the mean and deviation of ratings for every voter. The original rule is then applied to the modified ratings.

Parameters:
  • rule (Rule) – The rule to apply to the modified ratings.
  • embeddings_from_ratings (EmbeddingsFromRatings) – The function to convert ratings to embeddings.
  • f (callable) – The function to apply to the ratings. It takes as input the ratings, the mean and the standard deviation of the ratings in the historic. It returns the modified ratings. By default, it is set to f(ratings_v, history_mean, history_std) = np.sqrt(np.maximum(0, (ratings_v - history_mean) / history_std)).
modified_ratings_

Modified ratings. For each voter, f is applied to her original ratings.

Type:Ratings