University of Sydney · S1 2027 · FACULTY OF MACHINE LEARNING

COMP4318 · Machine Learning and Data Mining

- one subject, every graph, every model, every mark
60% final exam · hurdle11 Chapters136-page Bible
Our own words - no uploaded lecturer files
Built to mirror S1 2027 · updated this semester
The Complete Exam Bible · S1 2027

Machine Learning and Data Mining

— Every algorithm, every formula, every evaluation metric — machine learning and data mining worked end to end, the way the COMP4318/COMP5318 60% exam actually asks it.

COMP4318/COMP5318 Machine Learning and Data Mining is the University of Sydney's co-badged undergraduate/postgraduate machine-learning unit, taught in the School of Computer Science over weekly two-hour lectures and one-hour tutorials (standard 6 credit points — confirm on the unit outline). It is a practical, technical introduction to machine learning and data mining: the end-to-end pipeline (data → preprocessing → model → evaluation), then the algorithm families in sequence — nearest neighbour and rule-based learners, linear and logistic regression with regularization, naïve Bayes and model evaluation, decision trees and ensembles, support vector machines and dimensionality reduction, neural networks and deep learning, clustering, Markov and hidden-Markov models, and reinforcement learning. The unit is assessed on Canvas through ten weekly homework quizzes (5%), two group programming assignments (roughly 15% and 20% — confirm the current weights on the unit outline) and a comprehensive final exam worth 60%. That final is paper-based, closed book and two hours (plus reading time), with a non-programmable calculator permitted, and it carries a hard hurdle: you must score at least 40% on the exam itself to pass, regardless of your semester marks, and you still need an overall final mark of 50 or more. Because the exam rewards running each algorithm by hand — computing an entropy, a distance, a Bayes posterior, a backprop update, a Viterbi path — steady weekly practice beats a last-minute STUVAC cram, and the COMP4318 result feeds the Weighted Average Mark (WAM) that later Sydney computer-science units build on.

COMP4318 · University of Sydney
An independent, AskSia-authored study guide. AskSia is not affiliated with, endorsed by, or sponsored by University of Sydney; the course code and name are used for identification only.
Contents · the whole subject, one map

What COMP4318 covers

COMP4318/COMP5318 is assessed on Canvas through ten weekly homework quizzes (5%), two group programming assignments (roughly 15% and 20% — confirm the current weights on the unit outline) and one comprehensive paper-based final exam worth 60%, which carries a hard 40%-on-the-exam hurdle. This eleven-chapter map follows the weekly lectures from the machine-learning pipeline through to reinforcement learning, and every chapter is written so you can run the algorithm by hand and explain it — which is exactly what the closed-book exam asks. Use it to see how each week's method builds toward that final.

Assessment

How COMP4318 is assessed

ComponentWeightFormat
Weekly Homework Quizzes5%10 weekly online quizzes (weeks 2–11), direct application of that week's lecture; no late submissions
Assignment 115% (confirm the current weight on Canvas)Group programming task + short report (out ~Week 3, due ~Week 7)
Assignment 220% (confirm the current weight on Canvas)Group programming task + report discussing the results (out ~Week 8, due ~Week 11)
Final Exam60%Paper-based, 2 hours, closed book; non-programmable calculator permitted (confirm any permitted A4 note sheet on Canvas)
Worked example · free

Confusion matrix: accuracy, precision, recall and F1 of a spam filter

Q [5 marks]. A COMP4318 spam classifier is tested on 500 emails — 200 are spam (the positive class) and 300 are ham. The model flags 180 emails as spam; 150 of those are genuinely spam and 30 are actually ham. Build the confusion matrix and compute the accuracy, precision, recall and F1 score. (5 marks)
  • +1Build the confusion matrix with spam as the positive class. TP = 150 (spam correctly flagged); FP = 30 (ham wrongly flagged as spam); FN = 200 − 150 = 50 (spam missed); TN = 300 − 30 = 270 (ham correctly left alone).
  • +1Accuracy = (TP + TN)/total = (150 + 270)/500 = 420/500 = 0.84.
  • +1Precision = TP/(TP + FP) = 150/(150 + 30) = 150/180 = 0.833.
  • +1Recall = TP/(TP + FN) = 150/(150 + 50) = 150/200 = 0.75.
  • +1F1 = 2·P·R/(P + R) = 2·(0.833·0.75)/(0.833 + 0.75) = 1.25/1.583 = 0.79.
Accuracy = 0.84, Precision = 0.833, Recall = 0.75, F1 = 0.79. Precision above recall means the filter is conservative: when it flags spam it is usually right (0.833), but it still misses a quarter of real spam (50 of 200), so recall is the weaker metric here.
Sia tip — State the positive class first, then read TP/FP/FN/TN straight off the counts — swapping precision's denominator (tp+fp) with recall's (tp+fn) is the classic lost mark. Precision rewards not raising false alarms; recall rewards not missing positives. Stuck on which is which? Ask Sia to rebuild the confusion matrix with you step by step — it explains the method, it never just hands over an answer.
Glossary

Key terms

Supervised learning
Learning a mapping from labelled examples so you can predict the label (class or value) of new, unseen examples. Classification and regression are the two supervised tasks in the unit.
Unsupervised learning
Learning structure from unlabelled data — grouping similar examples (clustering) or reducing dimensions — with no target to predict.
Overfitting
When a model has low training error but high test error because it has memorised noise rather than generalised; the opposite is underfitting (too simple, poor on both). Controlled by the complexity–generalisation trade-off.
Regularization
Explicitly restricting a model to avoid overfitting: Ridge (L2) adds α·Σwᵢ² to the cost and shrinks coefficients; Lasso (L1) adds α·Σ|wᵢ| and can drive some coefficients to exactly 0 (feature selection).
Cross-validation
Splitting the training data into k folds, training on k−1 and testing on the held-out fold in turn, then averaging the k accuracies. Stratified 10-fold is the ML standard; the test set is never used to tune hyperparameters.
Confusion matrix
A table of true/false positives and negatives from which accuracy = (tp+tn)/total, precision = tp/(tp+fp), recall = tp/(tp+fn) and F1 = 2PR/(P+R) are computed.
FAQ

COMP4318 FAQ

Is COMP4318 hard?

It is demanding but tractable if you keep up. COMP4318/COMP5318 is broad — a new algorithm family almost every week, from k-NN and naïve Bayes to SVMs, deep networks, HMMs and reinforcement learning — and the closed-book final expects you to run each method by hand with a non-programmable calculator, not just import it. The maths is mostly algebra, probability and a little linear algebra, so the real challenge is breadth and consistency. Students who do the weekly homework quiz on time and work one small numeric example of each week's method tend to find it manageable; leaving it to STUVAC is what makes it feel hard. A High Distinction (HD, 85+) rewards being able to start every topic cleanly, which is what the 40% exam hurdle is really testing.

Can AI help me with COMP4318?

Yes — Sia is an AI tutor trained on how COMP4318/COMP5318 is actually taught and assessed, so it can walk you through a worked exam question step by step (an entropy split, a naïve Bayes posterior, a backprop update or a Viterbi path) and check your reasoning as you go. Use it to understand the method and rehearse under exam-style conditions. It does not do graded assessment for you, and University of Sydney academic-integrity rules apply — any AI-tool use in your assignments must be acknowledged, and unapproved or unacknowledged use is a breach.

Where can I find past exam papers/practice for COMP4318?

Start on Canvas, where the unit posts its lecture slides, tutorial and homework-quiz solutions and any released sample papers, and check the University of Sydney Library exam-paper collection for past papers. The tutorials and weekly quizzes are the closest match to the exam's style. This guide also includes a re-authored practice exam that mirrors the final's shape — distances, Bayes, information gain, SVM margins, a forward pass, a Viterbi path — with fresh numbers, and you can ask Sia to generate extra questions in the same style and explain each step. Treat any third-party 'model answers' with caution and confirm what is officially provided on Canvas.

Does COMP4318 have a hurdle?

Yes. The final exam is worth 60% of the unit and is a hurdle set by the School of Computer Science: you must score at least 40% on the exam itself (40 of 100 marks) to pass, regardless of your semester marks. A student who misses the hurdle is capped at a maximum final mark of 45, and to pass overall you also need a final mark of 50 or more. That is why it pays to cover every topic through the semester rather than banking on a strong coursework total — confirm the exact rule for your offering on the Canvas Assessments page and the unit outline.

Is the COMP4318 final open- or closed-book?

The available unit materials describe it as paper-based, two hours, closed book with a non-programmable calculator permitted, and no materials supplied. However, some prior offerings of the co-badged unit allowed a single self-made A4 note sheet, so do not assume you can bring nothing — 'no materials supplied' means no formula sheet is given, which is not the same as a note sheet being banned. Confirm the exact permitted-materials rule on Canvas and the exam-paper front page, along with the date, time and room on the University of Sydney exam timetable, before you rely on either interpretation.

Study strategy

How to study for the exam

Treat COMP4318 as a set of algorithms you must be able to run by hand, not just import. Each week, take that week's method and work one small numeric example end to end — an entropy and information-gain split, a k-NN vote, a Bayes posterior with a Gaussian density, a gradient-descent or backprop update, a Forward/Viterbi pass — because the closed-book final asks exactly that, with a non-programmable calculator. Do the weekly homework quiz on time (no late submissions, no extensions) and use the two group assignments to lock in the pipeline and evaluation habits. Keep a one-page summary per algorithm: what it assumes, its core formula, its complexity, and the trap that costs marks (which speed goes into an average, which class is positive, log base 2 for entropy, minimise ½‖w‖² for the SVM). For the 60% final, prioritise breadth — the 40% hurdle rewards being able to start every topic — then deepen the ones you find hardest, and keep old topics warm through STUVAC. When a step won't click, ask Sia to explain that single step a different way and set you a fresh practice question in the same style; it teaches the method and checks your reasoning, and it never does your graded assessment for you. Confirm the exact exam date, room and permitted-materials rule on Canvas and the exam timetable.

Study COMP4318 with AI

Your AI Machine Learning tutor for COMP4318

Stuck on a hard COMP4318 question? Sia is AskSia’s AI Machine Learning tutor — ask any COMP4318 Machine Learning and Data Mining question and get a clear, step-by-step explanation grounded in how the course is actually taught and assessed. Read this whole study guide free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 12 of your University of Sydney subjects - and 1,000+ Bibles across every Australian university.
Sia - your COMP4318 tutor, unlimited, worked the way the exam marks it
The full 136-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$25/ month
30-day money-back · cancel in one tap · how it works
Unlock the full COMP4318 Bible + 12 University of Sydney subjects解锁完整 COMP4318 Bible + University of Sydney 12 门科目
$25/mo