Identifying Quadrilaterals

The lesson is part of mathematics: students review how to recognize different types of quadrilaterals and their properties.

From the perspective of artificial intelligence, we focus on data collection and representing it in a table. Students are introduced to machine learning, including how to build and use a classification tree - either on paper and/or with a computer. Along the way, they discover that a model built from (partially) incorrect data is usually (partially) inaccurate.

Possible Scenarios

There are different ways to conduct this lesson.

  • Students can review the properties and names of quadrilaterals by identifying and recording them on cards. If we skip this step, we can give them cards where the properties are already filled out.
  • Students can manually construct a classification tree for identifying quadrilaterals. They do this by arranging cards on the table and drawing the tree using masking tape, adding decision criteria at its nodes.
  • They then use the tree to identify new quadrilaterals of these shapes.

If we choose to execute the lesson without a computer, we can stop here. Alternatively, we can skip the hands-on part and begin with the digital approach instead. Of course, the best approach is to include everything. :)

  • Students enter data about quadrilaterals using tablets or computers. The website collects all students’ responses.
  • We import the data into Orange and check the tree the computer has built.
  • We check if the tree is correct by manually verifying whether it aligns with the known properties of quadrilaterals and by testing whether it correctly classifies test quadrilaterals.
  • With the right widgets in the Orange environment, we analze the mistakes made by students. We can then correct them by transferring the data to a computer, editing it in Excel, and uploading it back into Orange from a local file. If preferred, we can skip the data entry setup and use pre-prepared, correct data instead.
  • Finally, we test how the computer uses the model to identify new quadrilaterals.

Before manually constructing a classification tree in the first part, we should first explain what classification trees look like. The easiest way to do this is by first conducting a lesson about classification of gnomes or the animal tree. The lesson Taxonomic keys for animal groups might be too similar to this activity, so doing both only makes sense if the main goal is to review animal species or quadrilateral types.

We have tested this lesson multiple times using a different approach, where students did not enter data on paper but instead submitted it via tablets to a website. We then imported the data into the Orange software. In this case, each group defined the characteristics and appearance of 6-7 characters, resulting in a final dataset of 42 characters.

This version of the activity takes less time; however, a downside is that students do not construct the tree manually. Additionally, the collected data was never accurate enough to produce a meaningful tree. In the end, we always showed a tree built from fully correct data.

Data preparation - on paper

The first part mainly involves reviewing geometric concepts and recognizing different types of quadrilaterals.

  1. In the introduction, we review the different types of quadrilaterals (drawing them on the board, having students draw them, etc.) and recall the properties that define them (parallel sides, right angles, etc.). The shapes remain on the board to help students avoid confusion.

  2. We divide the students into groups of appropriate sizes.

    The size depends on how we organize the labeling of the quadrilateral properties (see below). Each group will create its own tree, so they’ll need some space, such as two desks placed together.

  3. Each group receives:

    • a set of cards with quadrilaterals (numbers 10-45); to reduce the workload, we can give them fewer shapes, but each group should still have at least two of each type;
    • cards with test cases (number 50-57); these are folded and distributed so that the shape is hidden. Of course, students may peek - the goal is to act as if we don’t know the quadrilateral type and determine it based on its listed properties rather than the image;
    • slips with criteria, cut into thirds as indicated;
    • slips with the names of the shapes.
  4. Each group marks the properties of the quadrilaterals.

    • They color the first cirle red if all sides are of equal length or blue if there are two pairs of equal-length sides; if not, they leave it blank.
    • They color the second circle if all angles of the shape are right angles.
    • They color the third circle yellow if the shape has two pairs of equal-length sides and green if it has one pair of equal-length sides.
    • They color the fourth circle if the diagonals intersect at a right angle.

    Additionally, for each shape, students must determine whether it is a square, rectangle, rhombus, parallelogram, kite, trapezoid, or none of these. They should record the most specific classification—since all rhombuses are also parallelograms, trapezoids, and kites, they must be labeled as rhombuses.

    This task is challenging as it requires a high level of focus. To minimize errors, it might be helpful for each group member to specialize in one property. One student can take a red pencil and color the first circle for all shapes with equal side lengths. Another can use a blue pencil to mark those with two pairs of equal sides, and so on. One student can determine the final classification of the shapes, while another ensures overall accuracy. This approach adds an extra layer of engagement, as group members must coordinate and divide tasks effectively.

    A middle-ground version of this activity is to give each student their own set of shapes and have them pass around the colored pencils, so each person checks a specific property for a while.

    This is clearly an exercise in mathematics, but it also reinforces teamwork and organizational skills. Minor mistakes won’t be critical, as students will have the opportunity to correct them later.

Building the decision tree

In the second part, we build a classification tree and test it.

  1. If the students have previously done activities like What Are the Gnomes Doing? or Animal Tree, they are already familiar with the concept. Otherwise, we explain it and possibly go through the first step together: determining the property that best differentiates the quadrilaterals. Different groups may have different opinions on which property is most important, and that’s perfectly fine—there is no single correct answer. :)

  2. Each group selects a specific property. They place a piece of paper with this criterion on the table, use painter’s tape to draw lines to the left and right (and straight ahead if there are three possible categories), and sort the quadrilaterals accordingly by placing them at the end of the “drawn” lines. Then, for each subgroup, they determine a new distinguishing property and continue the sorting process. They repeat this until they reach fully classified groups.

  3. The sorting continues until each subset consists of only one type of quadrilateral. For example, if they initially divide quadrilaterals based on whether they have only right angles or not, they will end up with rectangles and squares on one side and everything else on the other. When they later need to separate rectangles from squares, they must find a property that differentiates them. This property obviously won’t be “has two pairs of parallel sides,” as that applies to both rectangles and squares. So while the first criterion can be chosen freely, later ones require more careful consideration.

    While constructing the tree, students may notice errors—perhaps all parallelograms were placed on the left except for one, which went right. This indicates a mistake: either the property was incorrectly labeled, or the shape was misclassified. Maybe the one on the right isn’t actually a parallelogram but a rhombus, in which case it belongs there. Or perhaps someone mistakenly marked it as having all sides equal when it actually has only two pairs of equal sides, which led to incorrect placement.

    Students should correct any mistakes as they go.

  4. Next, we check whether the trees created by the groups make sense. For each final group of shapes, students should verify that all shapes belong to the same category (all rhombuses, all rectangles, etc.) and that the properties assigned by the tree at each step align with what we know from mathematics.

  5. Finally, students can remove the cards with shape and replace them with labels naming each type of quadrilateral.

  6. Now, it’s time for the folded cards. Each card has properties written and already marked on one side, while the other side hides the shape and its name.

    Using these cards, we follow the path in the tree. We start at the root. If the first criterion directs all shapes with only right angles to the right and the rest to the left, we check whether the card states that the shape has only right angles and move it accordingly. If the next decision point checks the number of pairs of parallel sides and our shape has one pair, it follows the middle path. When we reach the end, we read what type of shape the tree predicts. At that point, we flip the card over to check if it matches.

    One example can be demonstrated to the whole class or with one group, while the students complete the rest of the test cases on their own.

Entering data into the computer

If we want, we can explore whether a computer could also construct such a tree - and how it would do so. Students can collect the data themselves, or we can use pre-prepared datasets.

  1. On the page https://data.pumice.si/quadrilaterals, we set up a form for data entry. After clicking “Create activity page”, we receive a link that we enter into the devices (tablets, computers) students will use to input data.

    All groups can use the same link so that the results from all groups are collected in a single table. If we want to collect data separately for each group, we refresh the page and generate a new link for each group. This allows us to observe errors in the trees based on each group’s data. More details can be found in the additional teacher materials.

  2. Students enter the numbers of the individual shapes on the page. By clicking on the circles, they input the properties of each shape and select its type at the bottom of the form. The form is designed similarly to the cards to make the transcription easier. When they click “Save answer,” they proceed to the next shape.

Building and Testing the Tree

We will likely work with the Orange program in a frontal way. First, the computer will create a tree using correct data and test it with new data: it will work with the same data as the students and perform exactly the same steps as they did.

If we prefer, instead of using the pre-prepared correct data, we can try working with the data collected by the students. How to do this is explained in the first point of the next section. If there are too many errors in the students’ data, we will return to the correct data available at https://pumice.si//en/activities/quadrilaterals/resources/quadrilaterals.xlsx .

Here are the step-by-step instructions – click here, open that. Anyone who is curious for more can satisfy their curiosity in the additional teacher materials.

  1. We download the pre-prepared workflow and open it in Orange. If the Image Analytics add-on is not installed, Orange will alert us, install it after our confirmation, and restart.

  2. We double-click the Table widget to open it and show the students the data we’ve loaded. These are correct data read from the webpage. Each row corresponds to one of the shapes and includes its type (rhombus, square, etc.), along with individual columns for its properties. (There’s also a column with a link to the image, which will come in handy later.)

  3. Open the Tree Viewer. In it, we see the tree made from the correct data. It’s probably different from the tree the students created. Is it still correct?

  4. Now open the Image Viewer. Arrange the Tree Viewer and Image Viewer so that we can see both at the same time.

    We can now click through different parts of the tree and see the shapes that are placed in each. Even when students built the tree, they had stacks of cards with shapes in different parts of the tree during each step. The computer, therefore, built the tree exactly as they did.

  5. The second File widget reads the test data. These data are the same shapes as the ones on the folded cards.

    The Table widget is attached to it, where we can show the students that the data only contains descriptions of the properties of the shapes.

  6. The Prediction widget receives the data from the second File widget and the model from the Tree widget. In the widget, we can see how the computer classifies the new shapes.

  7. Is it correct? We can check this in the Image Viewer, which is attached to the Predictions. It will show the images of the shapes, and if we choose “Column with Title” as Tree, we’ll see how the tree recognizes them.

Student Data

If the students have entered their data about shapes, we will create a tree from their data. This will be interesting because the tree will almost certainly be (at least) slightly incorrect. The mistakes will be due to errors in the data: we will find them and thus see which shapes we have described or classified incorrectly.

  1. Open the File widget and enter the link in the URL field through which the data was entered, adding /data at the end: if the form link was https://data.pumice.si/grandparent-train, the collected data can be found at https://data.pumice.si/grandparent-train/data.

  2. Then open the Tree widget again, where a new tree is waiting for us. Is it correct?

    We will recognize mistakes by the fact that the tree is too large: instead of all shapes of the same type, like rhombi, being in one “leaf” of the tree, we will find them at multiple ends. We will look at which properties guide us to each leaf and notice that some of them are incorrect. For example, we might find that a property like “has two pairs of equal-length sides” leads us to a rhombus.

    It is even more likely that we will have a mix of shapes in one leaf; we can see this by the fact that the pie chart drawn in the corner is not all the same color. If we have a mix of rhombi and kites that are equal in all properties – is this really correct?

Finding and Fixing Mistakes

Mistakes occur because students have incorrectly described the properties of some shapes or misnamed them. To discover these mistakes, we use two widgets: the Image Viewer and the Table widget connected to the tree.

If we want to fix mistakes and observe how the tree becomes more accurate, we proceed as follows.

  1. Transfer the data to Excel: enter the link to the data, such as https://data.pumice.si/grandparent-train/data, in the browser and download the file, which we then be open in Excel.

  2. Open the File widget, click the button with the folder icon and three dots, and select the file you just downloaded.

  3. If we click on the “suspicious” leaves of the tree in the Tree widget, we will, as we already know, see the shapes placed in it in the Image Viewer. If we see only rhombuses but one is labeled “kite”, we know it’s a mislabeling. (The Tree widget has a field called Column with Title. If we select “Shape”, it will show the names assigned by the students, and if we select “Correct Shape”, it will show the correct names of the shapes.)

    If a kite has found its way into a group of rhombuses (and is in fact a kite, judging by the image!), one of its properties is incorrect. In the Table widget, we can view the descriptions of all the shapes in the selected leaf of the tree.

  4. In Excel, fix the identified mistake and save the file.

  5. In the File widget, press Reload to read the corrected data.

  6. Check if the tree is correct. If not, go back to step 3 and repeat the process until the tree is correct.

Final discussion

When can we say that a machine or device is smart or intelligent? Is a smartphone really smart? Why? Because it reminds us of our friends’ birthdays – if we tell it about them first? Is this really »intelligence«? It is simply programmed to do that.

Can we say that a computer is intelligent if it learns something it didn’t know before? In this case, it learned to distinguish between quadrilaterals — on its own, based on examples. The computer doesn’t know anything about rhombuses and kite; those names mean nothing to it. All it had were the data about the shapes, and from them, it was able to learn the rules. Accurate if the data was accurate, and incorrect if there were mistakes in the data.

Does that mean the computer did something that it wasn’t programmed to do? Yes and no. It wasn’t programmed to distinguish between shapes. But it was programmed to learn – to »self-programme«. So then, is it intelligent or not? That depends on our perspective.

To wrap up the activity, we tell the students that nowadays prediction models are used practically everywhere. In medicine, for instance, the computer is shown many people with different symptoms and told which diseases these people have; in this way, it learns to identify diseases based on symptoms, just like it learned to identify different types of quadrilaterals based on their properties.

  • Subject: mathematics
  • Duration: 1 hour
  • Age: 6th or 7th Grade
  • AI topic: Classification
  • Author of idea: Anže Rozman