Loading…
Glossary term
A system that suggests items, such as videos or products, based on a user's behavior and preferences.
A recommender predicts what you might like from your behavior and that of similar users: videos watched, products bought, songs skipped. Methods include collaborative filtering and learned embeddings of users and items.
It balances relevance with variety so you do not see the same thing repeatedly.
Find a similar item by cosine similarity
import numpy as np
def cosine(a, b):
return a @ b / (np.linalg.norm(a) * np.linalg.norm(b))
item_vectors = {"film_a": np.array([1, 0, 1]), "film_b": np.array([1, 0, 0.9])}
print(cosine(item_vectors["film_a"], item_vectors["film_b"]))Recommenders shape what people watch, buy and read, and so carry big social and commercial influence.