 Machine learning is an increasingly important part of our everyday lives. It's the way that our phone recognizes our faces, probably even embedded in your car or your home heating system. Now, the difference between machine learning and a more traditional computer program is that for a traditional program, the programmer writes the algorithm, decides on the questions that are going to be used to sort and interrogate the data. Whereas in the machine learning process, the machine learning program itself writes the algorithm. In today's lesson, the students are going to be the machine learning program. They're going to develop an algorithm to sort suites, but also they're going to learn about the effects of changing the size of the data set. Now we're going to demonstrate how machine learning depends on the size of the data set. And when you put it like that, I suspect it's quite daunting for many teachers, particularly to have a professional IT background. It's machine learning size of data set. But we can start off quite simply because the exercise really is a pen and paper exercise. Printed sheets, your experimental data, your horrible liquid resource sorts, pen, pencil, ruler, you're ready to go. So we've got two sets of data, thingies and watsits, and the students have to identify whether the three labelled pieces of data belong to either a thingie or a watsit. Well, it's interesting. It's kind of ambiguous at the moment, isn't it? Deliberately so, yeah. That illustrates one of the points of machine learning is it can be very vague. Let them classify them, see what rules they are applying, and then we can have the discussion about that there isn't a right or wrong in this necessarily, but it's, are you choosing a category that will fit? And then where do we go from there? Well, from there we then start to increase the data set. Yeah, so then we can move to still thingies and watsits, but we have a range of colours, a range of different shapes. It's a better data set. There's more data. So at this point, I expect, as you said, the students tend to get this. And I suppose they mainly think, well, there's not much to this. It's quite a simple message. We've chosen the right characteristic and we can separate these two things. How do you make, how do you go deeper? I'm assuming it involves... It involves the Harry Bowl. If we look at the thingies and watsits, that there are only two types of shape. They either are or are not four-sided. With Harry Bowl, there are six, seven, eight different shapes in there. Some are very similar, so you'll have bears, which could be one of three colours typically. There are, yep, there are normally at least two coloured rings in there. And so the questions that you start to ask then may start with colour. And students will often say something like, is it a heart? And that's two abstracted question. The better question would be what characteristics define a heart in terms of the shape of a Harry Bowl? So what activity do the students now follow to explore this, which is a complicated idea? The students place the distinct shapes in a box, A, B, C, D, E or F, and then they create a decision tree. They start off with what question do I want to answer, so what shape am I trying to get to, and then ask really simple yes-no questions. Is it red? Is it round? Is it rectangular? Does it have a hole in the middle? Each of these should be answerable with a yes or a no. One of the key things that you can say to your students is if you can't answer it with a yes or a no, then it's probably a bad question. In terms of health and safety, just don't eat this. Don't eat this. That's what she can't answer. It's a serious point. Check, do your students have any allergies? Yeah. Yeah, check. If you're going to be working with sweets, are they hello? Yeah, it's a valid point to make. Some students will have allergies to gelatin, sugar. And the other point is if they're going to be touching them in the classroom, you don't really want to be picking up someone else's germs. So don't eat them? Don't eat them at all. No. OK, so what you're going to do is you're going to sort the three shapes on the bottom, A, B and C, into either a thingy or a watsit. You're going to have to make some decisions. Do I think it's a thingy? Do I think it's a watsit? Why do I think that? That's the important stuff, OK? I'm interested in your decision making, how you arrive at it. We've got it? Cool. So what choices have you made here? So you've decided... So for A, I pick the thingy because I have one eye. But for B and C, I pick watsits because they have two eyes. So this table all agreed in the end that A is a thingy, B is a watsit and C is a watsit. Every decision you make is valid. Do you arrive at the end point? Are you able to, with some degree of certainty, some predictability to say this is definitely A thingy, this is definitely A watsit? And with, again, we're back to quality of data. We've only got six data points here and we've got three grey shapes, we've got three green shapes. So our ability to say with certainty that something is definitely the case is really reduced. So I'm going to present you with a much wider data set. Yeah, nothing on the face of it has the same colour, nothing on the face of it has the same number of eyes, nothing on the face of it has the same number of sides. What I want you to do is I want you to think, OK, so what rule or set of rules could I apply to something being a thingy or watsit, given the data set or the data points that I know being given? Nothing to do with eyes or the shape, it's just the number of sides, mainly. So for watsits, I recognise that every single watsit has four sides. Maybe colours as well, eyes. I can tell a difference because the thingy says two and one. Have we got an agreement what defines a thingy, what defines a watsit? Well, the watsits have a similar pattern, which do all four sides. OK, so what you're doing, you're pulling out a very simple question now. Is sides equal to four? If yes, it is a... A watsit. Watsit. If no, it is a... Thingy. Thingy. Right, so what we're going to do now is apply what we've learned, what we've developed in terms of the complexity of decisions, but also keeping each question simple into building a more coherent decision tree. So in this experiment, we're going to sort some Haribo, which is our experimental data, into its different shapes. We're going to use our shape sorter, A, B, C, D, E, F. You're going to put one Haribo in each box. What questions will direct your user to deciding that it is actually a cola bottle or a bear or a ring or whatever it might be? Did you think about how simple the questions were? So the yes, no questions. So what's your first question? Is the colour red on the shape? So any other questions? So is the colour red? We could do it if it has got more than one colour. It's breaking it down. This key word, decomposition. What are the simplest questions I can ask? If I'm certain that I cannot simplify the question any more, then I'll go with that question. What kind of properties or characteristics did you use to start building your decision tree? I first used what the colours are, and if they used multiple colours. And then I'd also go for the shapes and the type of shapes. Mainly round, but also was like a square at the top. So everyone's developed their decision trees. So what's the next step in the lesson? Right, so the next step is they are going to swap their decision trees, their experimental data with another person, so in this case the other table. And the other table are going to try and identify the Haribo types aligned to A, B, C, D, E or F. Yeah, I see what you mean. Or maybe that's no. Is it a regular shape? OK, so guys, so very quickly, hands up. Who got it right? Who were able to follow the partners? Oh, that's pretty good. What have we got? One, two, three, four, five, six, seven, eight, nine, ten, eleven and a bit, twelve and a bit. So about two-thirds of us were able to follow our partners' rules. And what are the important teaching points? Important teaching points all revolve around data sets. It's about the size of the data set and it's about the quality of the data set. The more data you have, the more likely you are to be able to predict accurately. The better quality of the data, the more likely you are to be able to predict accurately. And how can you demonstrate the principles of this activity to embed what they've learned? I would use an app, an online app called 20Qs, and that uses thousands of previous users' answers to questions in a machine learning type environment to try and arrive at something that you have thought of. Why do you think it's important to teach machine learning? It's part of computer science. But it's much wider than that. The skills that they develop, they use in biology for classification. They use it in maths for prediction and probability. So these are skills that are cross-curricular. It's not just based in computer science. From our lesson today, you don't need to use a computer. It's paper, pen and paper exercises, getting students to think. It's about logic and it's about framing questions. It's getting people to understand that it's about the quality of data. Yeah, it's about the size of the data set and the impact that it can have. What I found interesting is that the lesson begins, and it's deceptively simple, but as you go through, then it's revealed to the students, and it's revealed to me, that developing algorithms, developing questions to sort something as simple as a bag of sweets is actually quite difficult. And I think the valuable thing is that the thought processes, that the techniques that the students learn can be applied way beyond computer science. The techniques that you would use in biology or physics or chemistry, mathematics, a wide range of subjects.