Now several people share the app. movies is the catalogue, one row per movie (how much of each genre it has), and tastes holds everyone’s taste, one column per person (how much they like each genre, in the same order). Write all_scores(movies, tastes): a table with one row per movie and one column per person, each cell how much that person will enjoy that movie.
Three people now: each one’s taste is a column of the tastes table, each movie a row of the catalogue. Pairing the first movie with the first person and so on leaves most of them out. The goal is the whole table, one cell for every movie and every person, like the bars it ends on. Each cell is where a movie’s row and a person’s column cross.
all_scores(movies, tastes)| movies | the catalogue (a numpy array), one row per movie: how much of each genre it has | e.g. [[3, 0, 0, 1], [0, 3, 0, 1], [1, 0, 3, 0],… |
| tastes | everyone's tastes (a numpy array), one column per person: tastes[:, j] is how much person j likes each genre | e.g. [[2, −1, 1, 3], [−1, 2, 0, 1], [0, 0, 3, −… |
| returns | a table: one row per movie, one column per person, each cell how much that person will enjoy that movie | |