0
0
AI for Everyoneknowledge~30 mins

How AI models learn from data in AI for Everyone - Try It Yourself

Choose your learning style9 modes available
How AI models learn from data
📖 Scenario: You want to understand how AI models learn by using examples from everyday life.Imagine teaching a friend to recognize fruits by showing pictures and telling their names.
🎯 Goal: Build a simple step-by-step explanation of how AI models learn from data, using a list of examples, a learning goal, and a summary of the learning process.
📋 What You'll Learn
Create a list of example data points with exact fruit names
Add a learning goal variable with a clear description
Use a loop to simulate the learning process over the examples
Summarize the learning outcome in a final statement
💡 Why This Matters
🌍 Real World
Understanding how AI models learn helps people trust and use AI tools better in daily life.
💼 Career
This knowledge is useful for anyone working with AI, data science, or technology education.
Progress0 / 4 steps
1
Create example data
Create a list called examples with these exact strings: 'apple', 'banana', 'orange', 'apple', 'banana'.
AI for Everyone
Hint

Use square brackets to create a list and put the fruit names inside quotes separated by commas.

2
Set the learning goal
Create a variable called learning_goal and set it to the string 'Recognize fruits by their names'.
AI for Everyone
Hint

Use an equals sign to assign the string to the variable learning_goal.

3
Simulate learning process
Create an empty dictionary called model_knowledge. Then use a for loop with variable fruit to go through examples. Inside the loop, add 1 to the count of fruit in model_knowledge, or set it to 1 if not present.
AI for Everyone
Hint

Use a dictionary to keep counts and a for loop to go through each fruit.

4
Summarize learning outcome
Create a variable called summary and set it to the string 'The model learned to recognize 3 types of fruits.'
AI for Everyone
Hint

Count the number of keys in model_knowledge to know how many fruit types were learned.