0
0
AI for Everyoneknowledge~10 mins

How training data shapes AI behavior in AI for Everyone - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to show how AI learns from training data.

AI for Everyone
model.fit([1], labels, epochs=5)
Drag options to blanks, or click blank then click option'
Atest_data
Btraining_data
Cvalidation_data
Drandom_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using test or validation data instead of training data.
2fill in blank
medium

Complete the code to split data into training and testing sets.

AI for Everyone
train_data, test_data = data.[1](test_size=0.2)
Drag options to blanks, or click blank then click option'
Atrain_test_split
Bsplit
Cmerge
Dshuffle
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'split' or 'shuffle' which are not the correct function names.
3fill in blank
hard

Fix the error in the code that trains a model with biased data.

AI for Everyone
if data.is_biased():
    model.[1](data)
Drag options to blanks, or click blank then click option'
Apredict
Btrain
Cevaluate
Dfit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'train' which is not a valid method.
Using 'predict' which is for making predictions.
4fill in blank
hard

Fill both blanks to create a dictionary showing word lengths only for words longer than 3 letters.

AI for Everyone
{word: [1] for word in words if len(word) [2] 3}
Drag options to blanks, or click blank then click option'
Alen(word)
B==
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' or '<' which do not filter words longer than 3 letters.
5fill in blank
hard

Fill all three blanks to create a filtered dictionary of words and their lengths where length is greater than 4.

AI for Everyone
filtered = { [1]: [2] for [3] in words if len([3]) > 4 }
Drag options to blanks, or click blank then click option'
Aword
Blen(word)
Ditem
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names causing errors.
Using incorrect value expressions.