Find Patterns with AI
Artificial Intelligence 2
This lesson will help you earn points in explaining your dataset and AI model in the Demo video part of the rubric.
In this lesson, you will…
- Learn about datasets
- Learn how to train an artificial intelligence model to predict something
You learned that artificial intelligence, or AI, has 3 parts:
The process of gathering data for a dataset and training it to find patterns is called building an AI model. The model can then be used within a program or app to make a prediction and take action.
AI models need a lot of data to make good and accurate predictions. Here we’ll look at some different ways to collect good data for your invention.
There are three possible ways to collect data (data such as images, numbers, sounds, or text) for training an AI model.
- Collect training data from your community
- The data you want to train makes sense to gather from your community
- Invention gathers data with sensors or user input
- You want your invention to be able to collect data on its own (Tip: You’ll probably still need training data from one of the other methods.)
- Use data from public datasets for training data
You need more data than you can gather in your community, or you’re working on a solution for a problem that is more global.
We’ve gathered some free public datasets for you to explore in the Additional Resources section.
Remember the key features of a good dataset!
- Matches your problem/solution
- Lots of data - the more, the better
- Comprehensive and unbiased - representing different situations
- Have permission from the people who shared the images or information
Training the Model
Once you have gathered your dataset, you need to train it to create a model. There are many available platforms where you can train an AI model, using supervised learning. Supervised learning is just as it sounds - you supervise how the model learns by telling it the correct answer. For example, if you want the model to classify dogs vs cats, you feed it lots and lots of pictures of dogs and cats, and let it know which are the dogs and which are the cats, so you help it learn the difference.
Unsupervised learning happens when the model is given inputs, but no labels so it has to learn patterns itself and determine which inputs are similar and in which ways.
In this curriculum, we will focus on supervised learning. You will gather your dataset and train a model by labelling classes. Each class is a label to identify something you want to classify. For example, “dog” and “cat” would be classes in our animal classifier.
There are many free and open source platforms available to create AI classification models. Because you want to take the next step and have your model take action, we have curated this list of programs and platforms where you can build your model to make a prediction, and also use your model in a program or mobile app to perform an action based on the prediction.
Let’s look at another example. YouTube uses AI to predict what video you might want to watch.
Its dataset is all of your previous videos watched and videos that other people with similar tastes to you have watched.
It learns your patterns for video watching from this model and predicts what you might want to watch, both when you first visit the website and what you might want to watch after viewing a particular video.
The action it takes is to display thumbnails of videos you might click on and watch.
The AI model creation platforms we recommend for ease of use for novices and integration with software to allow your model to take action are:
|Teachable Machine by Google||Text, sounds, poses||Scratch via MIT Media Lab, Scratch via Stretch3, other integrations|
|MachineLearningForKids||Images, sounds, text, numbers||Scratch, App Inventor, Python|
|MIT App Inventor||Images, sounds||Mobile apps with App Inventor|
|Stretch3||Sound, images, poses||Scratch|
Activity: Train Your Own AI Model
For this first experience training an AI model, we will use MachineLearningForKids. This site is a great place to learn how AI works, and to get your feet wet creating your first model.
NOTE: It is important for your teacher or Technovation mentor to sign up for a teacher account first. That way you will be able to log in and save your projects. You can try out MachineLearningForKids without an account, but you won’t be able to save your model or full project for use later.
As a simple example, you will create an AI model to recognize images of rock, paper, scissors so you can interact with the computer to play the game. Here is a video tutorial to show you how to make the model and complete the project. If you prefer, you can also use this worksheet and follow the instructions.
If you do get your teacher or mentor to sign up and give you an account on the MachineLearningForKids website, your project, which includes your AI model, will be saved and you can return and access it again. However, the Scratch project does not get saved. In order to save a copy, when you are in Scratch 3 from within MachineLearningForKids, save your Scratch project to your computer. Then, if needed, you can load it from your computer the next time you visit MachineLearningForKids.
You’ve made your first AI model! This should give you a glimpse into the process for making the model. You identify your labels or classes, then gather your data to input, train the model, and use it in a project - in this case, a Scratch project. No matter which platform you use from the suggestions above, they all work in a similar fashion, although the interfaces may differ slightly.
- What did you think about your AI model? Was it successful in detecting rock, paper or scissors?
- Was it made with a “healthy” dataset?
- How could you make the dataset better?
- If a friend or person in a different location from you used your model and project, would it perform as well? Why or why not?
Additional Resources: Advanced Integrations
Build your own AI Models
Here are some of the platforms we use to explore AI:
Here are some places to start exploring datasets out there.
- Kaggle (great for images)
- Google’s Dataset Search
- Datasets from the United Nations. Tip: try filtering for your country or your issue.
SolveIt Series by Technovation
Technovation created a video series that challenges you to expand your mind and tackle new problems. A lot of these concepts apply directly to creating your app and using AI!