Archive for the ‘tech’ Category

Teaching students that increasing training data diversity often improves accuracy

Thursday, December 1st, 2022

This post was written for MachineLearningForKids.co.uk/stories: a series of stories I wrote to describe student experiences of artificial intelligence and machine learning, that I’ve seen from time I spend volunteering in schools and code clubs.

Students can make a Scratch project to play Rock, Paper, Scissors. They use their webcam to collect example photos of their hands making the shapes of ‘rock’ (fist), ‘paper’ (flat hand), and ‘scissors’ (two fingers). Then they use those photos to train a machine learning model to recognise their hand shapes.

I often have at least one enthusiastic (or impatient!) student keen to create their machine learning model as quickly as possible. They’ll hold their hand fairly still in front of the webcam, and keep hitting the camera button. The result is that they’ll take a large number of very similar photos.

(more…)

Teaching students that crowdsourcing and gamification help generate training data

Monday, November 28th, 2022

This post was written for MachineLearningForKids.co.uk/stories: a series of stories I wrote to describe student experiences of artificial intelligence and machine learning, that I’ve seen from time I spend volunteering in schools and code clubs.

I like running projects like Pac-Man (where students collect training examples by playing a game) with a class after they’ve done a project like chatbots (where students collect training examples by typing them in).

(more…)

Teaching students that collecting more training examples improves accuracy

Friday, November 25th, 2022

This post was written for MachineLearningForKids.co.uk/stories: a series of stories I wrote to describe student experiences of artificial intelligence and machine learning, that I’ve seen from time I spend volunteering in schools and code clubs.

This video starts with one student’s training data from their Pac-Man project. They played a simplified version of Pac-Man in Scratch.

They set up the game in Scratch so that every time they pressed an arrow key (‘left’, ‘right’, ‘up’, or ‘down’) as well as moving their Pac-Man character, it put the x,y coordinates for Pac-Man and the Ghost into the training bucket for that direction.

For example, when Pac-Man was at x=3,y=4 and the Ghost was at x=5,y=5 – they went right. That became a training example for when it’s good to go right. and so on.

(more…)

Teaching the workflow of a machine learning project

Tuesday, November 22nd, 2022

This post was written for MachineLearningForKids.co.uk/stories: a series of stories I wrote to describe student experiences of artificial intelligence and machine learning, that I’ve seen from time I spend volunteering in schools and code clubs.

If students are given the time and freedom to create their own machine learning models, rather than being given an existing model to use, they can learn even more.

A major part of the Machine Learning for Kids site is a child-friendly training tool that can be used to create a wide range of machine learning models.

For example, students can make their own simple chatbots, by training a text classifier to recognise frequently asked questions. They can choose their own subject for what the chatbot can answer questions about. In the video shown here, the student chose to make a project about the Moon.

They have to guess what questions someone might ask about their subject. In the video shown, you can see the student thought someone might ask where the Moon is, how big it is, how cold it is on the Moon, or what it’s made of.

For each of those questions, they came up with a few examples of how someone might ask that question.

They used those examples to train their own custom machine learning model, unique to their project.

Then they scripted the responses that their chatbot should give when it gets a question that it has learned to recognise.

I’ve run this project with school classes dozens of times, and it is different every time, with each class bringing their own creativity and imagination to the chatbot.

I’ve helped history classes make chatbot Vikings, chatbot Romans, and chatbot Ancient Greeks – trained to answer about what it was like to live in their times, what they ate, what they wore, and so on.

I’ve helped English classes have created chatbot Shakespeares that they trained to answer questions about his life and some of his most famous plays.

I’ve helped school clubs create local chatbot guides about their own school or their own town, trained to answer questions about their local area.

By going through the process for themselves, they learn the workflow of a machine learning project – a workflow that is similar to real-world projects: predict what users might do; collect examples of how the user would do that; use those examples to train a machine learning model to recognise that; and script what the system should do in response when it recognises something.

Going through the process of creating a machine learning project for themselves gives students an insight into how these systems are created in the real world.


Machine learning hasn’t replaced the need to learn to code

Sunday, November 20th, 2022

This post was written for MachineLearningForKids.co.uk/stories: a series of stories I wrote to describe student experiences of artificial intelligence and machine learning, that I’ve seen from time I spend volunteering in schools and code clubs.

I like to introduce students to building with machine learning by allowing them to play with pretrained models – a range of new blocks that can be added to the Scratch palette to represent a variety of powerful machine learning models.

For example, imagenet: a model that can recognise the object in a photo that you give it. It can recognise over a thousand different things.

With just a few Scratch blocks, students can start building projects that do remarkably powerful and impressive things.

(more…)

Tech events are back

Saturday, November 12th, 2022

I’ve loved the return of (in-person) tech events and conferences this year. I’m not expecting to go to any more events in 2022, so I thought this would be a good time to look back over some of my highlights for this year.

(more…)

From bytes to objects: describing Kafka events

Saturday, October 23rd, 2021

The recording of the talk that Kate Stanley and I gave at Kafka Summit Americas is now available.

Events stored in Kafka are just bytes, this is one of the reasons Kafka is so flexible. But when developing a producer or consumer you want objects, not bytes. Documenting and defining events provides a common way to discuss and agree on an approach to using Kafka. It also informs developers how to consume events without needing access to the developers responsible for producing events.

In our talk, we introduced the most popular formats for documenting events that flow through Kafka, such as AsyncAPI, Avro, CloudEvents, JSON schemas, and Protobuf.

We discussed the differences between the approaches and how to decide on a documentation strategy. Alongside the formats, we also touched on the tooling available for the different approaches. Tools for testing and code generation can make a big difference to your day-to-day developer experience.

The talk was aimed at developers who maybe aren’t already documenting their Kafka events or who wanted to see other approaches.


watch the recording on the Kafka Summit website

(more…)

Using pitch estimation to play with music in Scratch

Tuesday, October 5th, 2021

I’ve added a pitch extraction machine learning model to Machine Learning for Kids today. In this post, I want to describe the model a little, and suggest a few ways that students could use it.

Background

I started adding pretrained machine learning models to Machine Learning for Kids last year. Although my main focus is still allowing students to create their own machine learning models and make things with them, there are some fun projects that can be made using models that are too complex for students to train by themselves.

imagenet (that I added last Christmas), and the question-answering model (that I added in April) are both good examples of that!

I hope this one will be similarly welcomed!

SPICE

The new model is a pitch estimation model. Given some audio as input, you can use it to recognize the dominant pitch in sung audio (even if there is background music and noise).

(more…)