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 | |
|---|---|---|
| 1pred = classify(model, traffic) | ALoading a previously trained model for use | |
| 2model = load_model() | Bif pred == "anomaly": alert() | |
| 3ML models learn patterns from training data rather than fixed rules | Cmodel = train_model(data) | |
| 4Classifying traffic flags it as normal or anomalous based on learned patterns | DThe mistake: swapping the argument order for classify() | |
| 5pred = "normal" | EThe mistake: hardcoding the prediction instead of using the model | |
| 6pred = classify(t, model) | FClassifying traffic using a trained model |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Machine learning traffic analysis — Using a trained model to classify network traffic as normal or anomalous, based on learned patterns rather than fixed rules.model = load_model()traffic = get_traffic()prediction = classify(model, traffic)if prediction == "anomaly":def classify_batch(model, traffic):