Training an AI Model

Let’s explore how patterns can help AI make predictions and do actions.

Dataset >

finds patterns with learning algorithm  >

prediction to make  >

actions or decisions!

We’re going to learn how to make a Scratch project that uses AI to make a happy or sad face appear based on the sentence our user types!
 
In this activity you will create a dataset and use that to train an AI model to make a prediction.
 
An AI model is just another word for a dataset that has been trained and tested to correctly identify or label something. 
 
You will train the AI model to find patterns.

Dataset

Happy sentences and sad sentences

You will train your dataset with sentences that can be considered happy and others that can be considered sad.

happy sad dataset
happy face

OR

You will train and test your model on the website  machinelearningforkids.co.uk
 
And then you’ll use Scratch to make a project! Your project will use AI to make a happy or sad face appear, depending on what kind of sentence the user types.

ACTIVITY: HAPPY OR SAD

Follow the 3 video tutorials below to train your model and use it in a Scratch project.

In this first video, you’ll visit the Machine Learning for Kids website and make a non-AI Scratch project to start.

In this second video, you’ll make your dataset, then train and test it.

This is called supervised learning, because you are carefully watching how your model learns and fixing any issues.

In this third video, you’ll use your model in your Scratch project so the sprite can react using AI.

CONGRATULATIONS!

You’ve trained an AI model! You can always improve your model by adding more examples. Make sure you test your model if you do!

Now test yourself with the AI Models quiz.