{"base":{"id":"cs8-17","subject":"Systems","title":"Machine learning","scene":"ai","steps":[{"mode":"rules","eyebrow":"Rules","title":"When rules aren't enough","body":"Normal programs follow rules a person wrote. This rule sorts fruit by colour. Run it. Can a person think of a rule for every case in the real world?","actions":[{"id":"run","label":"Run the rule"}]},{"mode":"train","eyebrow":"Training","title":"Learn from examples","body":"Machine learning finds patterns in examples instead of rules. Each example has a label, like ‘apple’. Add training examples and watch the model's zones and accuracy change.","actions":[{"id":"add","label":"Add 4 examples"},{"id":"reset","label":"Start again"}]},{"mode":"predict","eyebrow":"Predicting","title":"A fruit it has never seen","body":"A trained model can classify new data. It compares the new fruit with what it learned and gives the most likely label. Try several new fruit.","actions":[{"id":"new","label":"Show a new fruit"}]},{"mode":"bias","eyebrow":"Bias","title":"Good data, good model","body":"A model only knows what its training data shows. This one never saw a green apple. Compare the biased data with fair data.","actions":[{"id":"biased","label":"Biased data"},{"id":"fair","label":"Fair data"}]},{"mode":"quiz","eyebrow":"Check yourself","title":"Spam filter","body":"An email app learns to spot spam from thousands of emails that people marked as ‘spam’ or ‘not spam’.","question":"What are the marked emails?","options":["The training data","The output","A firewall"],"answer":0,"right":"Correct. Labelled examples used to learn a pattern are training data.","wrong":"Not quite. What does the model learn from?","look":"train"}],"more":[{"type":"cards","id":"ideas","eyebrow":"Popular idea vs science","title":"Common mix-ups","items":[{"tag":"Popular idea","title":"\"The computer understands things like a person.\"","body":"A machine-learning model finds patterns in numbers. It doesn't understand what an apple is."},{"tag":"Popular idea","title":"\"AI is always right.\"","body":"Models give the most likely answer and can be wrong, especially with poor or biased data."},{"tag":"Popular idea","title":"\"A smarter AI just needs more rules.\"","body":"Machine learning learns from examples instead of hand-written rules."}]},{"type":"cards","id":"steps","eyebrow":"How it works","title":"Three steps","items":[{"tag":"1","title":"Collect training data","body":"Many examples, each with the right label: 1,000 fruit photos marked apple or orange."},{"tag":"2","title":"Train the model","body":"The system measures features such as colour and size and finds a pattern that separates the labels."},{"tag":"3","title":"Test and use it","body":"Check it on examples it has never seen, then use it to classify new data."}]},{"type":"cards","id":"uses","eyebrow":"Everyday AI","title":"Machine learning around you","items":[{"tag":"Email","title":"Spam filters","body":"Learned from emails people marked as spam."},{"tag":"Photos","title":"Grouping faces","body":"Learned what makes faces similar."},{"tag":"Music and video","title":"Recommendations","body":"Learned what people with similar taste enjoyed."},{"tag":"Health","title":"Checking scans","body":"Helps doctors spot signs of illness in X-rays."}]},{"type":"activities","id":"try","eyebrow":"Try it at home","title":"Be the model","items":[{"title":"Sort the socks","time":"15 minutes","need":["About 12 socks or small objects of two kinds","A helper"],"steps":["Your helper shows you objects one at a time and tells you the label (e.g. 'mine' or 'my brother's').","After 8 examples, write down the pattern you think you've learned.","Your helper shows 4 new objects without labels. Predict each one.","How many did you get right? Would more examples help?"],"why":"You learned from labelled examples and then classified new ones, exactly what a machine-learning model does.","safety":"No safety risks."}]},{"type":"quiz","id":"quiz","eyebrow":"Quiz","title":"Six more questions","questions":[{"question":"What is machine learning?","options":["A robot arm","A type of cable","A computer finding patterns from examples"],"answer":2,"right":"Correct. It learns from data.","wrong":"Not quite. How does it learn?"},{"question":"What is a label in training data?","options":["A sticker on the computer","The file name","The correct answer for an example"],"answer":2,"right":"Correct. Like 'apple' for an apple photo.","wrong":"Not quite. What does each example come with?"},{"question":"How do we check a model works?","options":["Test it on its training examples only","Test it on examples it hasn't seen","Count its rules"],"answer":1,"right":"Correct. New examples show if it learned the pattern.","wrong":"Not quite. Use data it hasn't seen."},{"question":"A face-unlock model was trained mostly on adults. Children's faces fail. Why?","options":["Children have no faces","The training data was biased","The screen is too small"],"answer":1,"right":"Correct. Missing examples cause mistakes.","wrong":"Not quite. What was missing from the data?"},{"question":"Which is usually true?","options":["One example is enough","Accuracy never changes","More good examples give better accuracy"],"answer":2,"right":"Correct. More varied data helps.","wrong":"Not quite. Think about the training step."},{"question":"Which task suits machine learning best?","options":["Recognising animals in photos","Adding 2 + 2","Switching on a light"],"answer":0,"right":"Correct. Too many cases for simple rules.","wrong":"Not quite. Which is hard to write rules for?"}]},{"type":"checklist","id":"check","eyebrow":"Self-check","title":"I can explain…","items":["the difference between rule-based programs and machine learning","what training data and labels are","how a model classifies new data","why biased data gives a biased model","two everyday uses of machine learning"]},{"type":"keywords","id":"words","eyebrow":"Key words","title":"Words to know","items":[{"word":"artificial intelligence","meaning":"Computer systems doing tasks that normally need human intelligence."},{"word":"machine learning","meaning":"A type of AI that learns patterns from examples."},{"word":"training data","meaning":"Labelled examples used to train a model."},{"word":"label","meaning":"The correct answer attached to an example."},{"word":"model","meaning":"The pattern a machine-learning system has learned."},{"word":"bias","meaning":"Unfairness caused by data that leaves things out."}]},{"type":"sources","id":"sources","title":"Sources","items":["Raspberry Pi Foundation: Experience AI","Google Teachable Machine"]}]},"overlay":null}