Cartoon Recommendations

We encounter recommendation systems everywhere. Adults see them in online stores, for example, while students might first come across them on video platforms like YouTube and TikTok. In this lesson, we learn how such systems work. The topic makes the lesson engaging, as students have to choose their favorite cartoons or musicians. The lesson can also be steered towards discussing how these systems—not just for recommending videos but also news and social media posts—trap us in filter bubbles, showing us only what we already know and like.

The lesson has a mathematical background. If conducted with older students, we can include set operations (intersections, unions); with younger students, we calculate the sizes of intersections, even if we don’t necessarily use those terms. Students also draw a similarity graph, a kind of sociogram or “taste-gram.”

The first part of the lesson takes place in groups: each group creates recommendations based on the choices of its members. We can then continue by having students enter their choices into a website, generating a recommendation system based on the entire class’s data. In this format, the activity takes two class periods. To shorten it, we can skip the first part and have students enter data into computers right away, but this version is less fun and less educational, as they don’t build the system themselves but only observe it.

Students enjoy the activity: they like selecting cartoons or series, find the similarity calculations and graph drawing interesting, and, in their feedback at the end of the lesson, they mentioned that they appreciated understanding (roughly) how such websites work.

Introduction

To introduce the lesson, we start by discussing with the students whether they watch video websites and how they think these sites recommend videos. They will likely say that the site “just recommends videos similar to the ones they usually watch.” At this point, we ask them how the site determines whether videos are similar.

If they answer that it’s based on descriptions, we can point out that descriptions are often short. More importantly—how does the system compare descriptions? Are two descriptions similar if they contain similar words?

We then promise to show them how a recommendation system could work without relying on analyzing the content of the videos.

Recommendation System in the Classroom

  1. We first divide the students into groups of approximately eight. Each group needs an A3-sized sheet of paper and cards with images of cartoons;print out two sets of cards for each group, so that each cartoon appears twice. Each student also needs another piece of paper (A5 should do).

  2. Each student selects 7 cartoons that they like the most. On the left side of their A5 sheet, they write down the names and reference numbers of their selected cartoons. (The same cartoon can be chosen by more than one student. We mention this because there was once an instance, where in one group, »the girls took all the coolest cartoons« so there were none left for the boys. :))

    If we decide to do the activity with older students, we can allow them to pick a different number of cartoons, for example 6-9. In that case, the activity also includes calculating intersections and unions, as well as practicing division and decimal numbers. Details for this second version are provided below (section Levelling Up).

  3. On the right side of their A5 sheet, each student writes down the names of all the other students in their group, and next to each of those names, how many cartoons do they have in common.

  4. Each student circles the three group members who have chosen the most of the same cartoons as they did. If multiple students share third place, they can choose any among them. In the end, only three students should be circled.

The group takes an A3 sheet and writes down the names of all its members. Each student draws arrows to the three group members who are most similar to them. We can encourage groups to create a visually appealing diagram—one where similar students are placed closer together and where connections cross as little as possible.

It is important not to connect only the most similar students overall: each student should draw connections to three others. This ensures that no student is left isolated without any connections.

  1. Each group member writes the numbers of the cartoons they selected next to their name using a blue color.

  2. Each group member writes, in red, the numbers of the cartoons chosen by the three members most similar to them. If a cartoon was selected by two of the connected members, they circle the number once; if all three chose it, they circle it twice.

    These cartoons represent their recommendations. Students can then check which cartoons were suggested to them—do they already know them? Do they like them? Does the recommendation system work?

Recommendation System in Computer

A computer is not necessary for this lesson. Based on experience, students usually find this part interesting as well, but you can decide whether to include it or not.

Preparation

Before the lesson, we prepare the selection entry form. We choose a theme (cartoons, music, or a custom topic), set the number of items students must select (the default is 7, which should be suitable), and receive a unique link, such as https://data.pumice.si/princess-dragon. This link is then entered into the tablets or computers that students will use to input their selections.

You can also test the page yourself by submitting some fictional selections or try an example with sample data. For classroom use, create a new form with a fresh link.

Data Collection

Once students have made sufficient progress (for example, while drawing on the A3 paper), we distribute the tablets with the pre-entered form link. Students then find and select their cartoons.

Analysis

  1. Open the prepared workflow using the Orange software. It will look like this:

    The meaning of individual components is not important. It is enough to replace the data source (see below) and observe the results in the final components; everything else should work automatically. Those who want to understand what each part of the workflow does can find more details in the teacher’s materials.

  2. Double-click on the File widget and replace the URL with the download URL for the data collected in class. If the data collection URL entered in the tablets was https://data.pumice.si/princess-dragon, then the data will be available at https://data.pumice.si/princess-dragon/data. Enter this URL in the URL field and press Enter. The names of your students will appear in the lower section. The image shows an example of class with Alexander, Ben, Chakotay, Deanna, Ezri and Finnegan siting in the front rows.

    To try it out at home, you can use test data from this site. The link to it, https://pumice.si/en/activities/cartoons/resources/princess-dragon.xlsx, is already set in the workflow.

  3. Next, double-click on the Network Explorer.

    Each student has exactly three arrows pointing to the three classmates they are most similar to. The image will be different from the ones drawn by individual groups, as it contains data for the entire class.

    (Tip: If the points are not well arranged, press Improve; if that doesn’t help, try Reset. If the layout looks really bad, decrease the Gravity value and then increase it again.)

    Sometimes, distinct groups appear in the network, or boys and girls may separate. We can also see students who have multiple arrows pointing toward them—these students likely have more “central” tastes. On the other hand, those with no arrows pointing to them might feel left out. You can reassure them that their taste is unique, or rather, “refined.”

  4. Recommendations appear in the Recommendations widget.

    For each student, we can see which cartoons they selected and who in the class has chosen similar cartoons. Most importantly, each student receives personalized recommendations, with a note below each recommendation indicating which of their similar classmates “contributed” to it.

Extensions

Different Selection Sizes

If students are allowed to select a different number of cartoons, similarity cannot simply be calculated as the number of shared selections. Otherwise, students who pick more cartoons would naturally appear more similar to each other. To account for this, the number of shared cartoons should be divided by the total number of cartoons selected by either student or both. In more mathematical terms, the size of the intersection of the selected cartoon sets should be divided by the size of their union.

This requires knowledge of decimal numbers, so this activity is not entirely suitable for fourth graders. One workaround is to have students multiply the number of shared cartoons by 10 or even 100 and then calculate an integer quotient. It’s up to you to decide.

Alternative Topics

Since older students—especially high schoolers—are generally not interested in cartoons (or perhaps just won’t admit it), a better topic for them would be musicians or TV series. We recommend TV series, as they tend to spark more engaging conversations (“Have you watched this or that?” is a better conversation starter than “Have you listened to this or that?”).

You can also prepare your own dataset, for example, by selecting books. The details are described in the additional teacher’s materials.

  • Subject: mathematics
  • Age: any
  • AI topic: recommendation systems
  • Author of idea: Ana Farič