Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1spam_examples.append(new_email) | AThe program decides but never updates its stored data after the user marks the email. It must update word_score so the new case is used in later decisions. | |
| 2word_score["free"] = word_score["free"] + 1 | BA fixed rule list is not being changed by the program itself. Machine learning should add the marked email to its own stored examples (the data), not leave it in rules that only a programmer edits. | |
| 3A spam filter removes an old example from its data when the user says it was marked wrongly | Cspam_examples.remove(old_email) | |
| 4The updated stored data is used on later decisions, so the next email is judged using what was learned | DThe program adds a newly marked email to its stored data so it can learn from it | |
| 5IF user_marks_spam THEN fixed_rules.append(email) ENDIF | EThe program updates a stored value after seeing another spam email containing that word | |
| 6new_email = get_email() IF word_score["free"] > 5 THEN mark_as_spam (word_score is never changed) | FIF word_score["free"] > 5 THEN mark_as_spam |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
self-updating data — A machine learning program changes its own stored data by adding, updating or removing items as it meets new cases, e.g. spam marked by users, and uses that data in later decisions.IF userMarksSpam = TRUE THEN
spamData.add(emailWords)
ENDIFIF word IN spamEmail THEN
spamScore ← spamScore + 1
ENDIFIF userSaysNotSpam THEN
spamData.remove(oldEmail)
ENDIFscore ← spamData.count(newEmail)
IF score > 5 THEN OUTPUT "Move to spam"spamData.add(email)
result ← spamData.count(nextEmail)