Introduction to AI Lab

Welcome to AI Lab!

AI Lab is a tool that lets you create Machine Learning Models to solve problems, make decisions, or create predictions. Machine Learning Models are just computer programs designed to make a decision. Sometimes the decision can be random, or it can be based on a set of rules like when playing a board game.

In this widget, we create models that use patterns in data to make decisions. You will help train A.I. Bot to make decisions based on data, then you can save A.I. Bot's decision-making model to use in an App Lab project.

Step 1: Choose a Label

A Label is what you are trying to help A.I. Bot predict or decide. The label is usually related to a problem you are trying to solve, or it can be something you wonder or are curious about. Sometimes data is collected with the label in mind, but not always.

You can explore your data on the left panel, and make decisions on the right panel.

Step 2: Choose Features

The Features are what A.I. Bot is basing it's prediction on. You can choose as many features as you like, but some may not be as helpful for making predictions as others. AI Lab has different data visualizations that can help you decide which features are more useful than others.

You can explore your data on the left panel, and make decisions on the right panel.

Step 3: Train A.I. Bot

Based on your decisions, A.I. Bot will look at the data find patterns to help it make decisions.
A.I. Bot automatically holds back some of the data so it can test itself to see how well it's doing. It's kind of like studying for a test - you might look at most of the practice questions to study, but then save several for the end to quiz yourself and see how well you're doing.

Step 4: Evaluate and Test

In this screen, you can see some of the decisions that A.I. Bot is making based on the data. You can also see how accurate it did based on the testing data A.I. Bot held back.

If A.I. Bot isn't making very good decisions, you can always return to a previous screen and choose different features or a new label.

You can also test A.I. Bot's model yourself. Try out different values and see what decisions A.I. Bot makes. Testing the model is important to make sure we avoid bias, which is when decisions favor some things and de-prioritize others. If you discover bias in your model, you can always go back and choose new features or a new label.

Step 5: Save Your Model

In this screen, you can save your model to use in an App Lab project. Saving the model is like taking A.I. Bot's brain and using it to make the same decisions in different places. The code for your project will just ask your model to make a prediction.

Before you can save, you need to answer a few questions that get saved with your model. This is like documenting your code - instead of writing comments to describe how a program works, we're adding notes about how we trained our model to make its decisions.

Found a bug in the documentation? Let us know at documentation@code.org