CS 460G Midterm Hub

CS 460G · Machine Learning · Fall 2026

Midterm study site

The whole course, rebuilt from the source material: 18 lecture decks (780 slides, every one rendered here as the original image) and 11 Python notebooks, plus a full worked answer key for the practice sheet.

6 questions · 50 min 2 math · 40 pts 2 coding · 40 pts 2 short answer · 20 pts

The exam in one table

#TypePointsContent
1Math20Decision trees / confusion matrix / entropy / ensembles
2Math20SVM / gradient descent / activations / neural networks
3Short answer10Linear classification & regression / k-NN / decision trees / NN
4Short answer10Clustering / dimensionality reduction / SVM / validation / ensembles
5Code (explain)20the assignment notebooks
6Code (explain)20the practice / example notebooks

Start here. Go to the answer key first — it contains all 37 practice questions worked out in exam form, organised into exactly these six sections. Use the lecture pages underneath it as the reference when an answer needs more context, and the notebook pages when the question is about code.

MASTER PAGE
Answer key — all 37 questions
Every practice-sheet question, worked in full, grouped by the six exam question types.
18 PAGES
Lecture notes
W1L1 through W8L3, each with the key formulas and the original slides inline.
11 PAGES
Python notebooks
Cell-by-cell walkthroughs with the verified outputs and every plot the notebook produces.

How to use this in the time you have

If you have two days. Read the answer key sections A and B first — those are 40 of the 100 marks and they are pure procedure. Then do section C and D, which are recall. The lecture pages are reference, not reading material.

If you have one evening. Learn five things: the entropy/information-gain procedure, the margin derivation, the confusion-matrix formulas, "L1 zeroes weights / L2 shrinks them", and "sigmoid for binary, softmax for multiclass". That covers most of A1, A3, B1, C5 and C11.

If you have an hour. Read the quick reference table at the bottom of the answer key. It is every number you might be asked to produce.

conceptual / short answer math high yield coding

Lectures

Every deck in scope, in teaching order. The tag on each card is the exam section it feeds.

Week 1 · Lecture 1
Course Introduction
Syllabus, grading, exam format, MNIST/CIFAR examples.
Week 1 · Lecture 2
Python for Machine Learning I
Colab, NumPy arrays, Matplotlib, pip/conda, imports.
Week 1 · Lecture 3
Python for Machine Learning II
SciPy, sklearn, pandas, PyTorch, OOP / classes.
Week 2 · Lecture 1
Learning Theory I — Empirical Risk Minimisation
Learning problem, loss/risk/ERM formulas, hypothesis set.
Week 2 · Lecture 2
Learning Theory II — Generalisation, PAC, Learning Types
Generalisation, PAC learning, supervised/unsupervised/RL.
Week 2 · Lecture 3
Linear Classification
Linear classifier, sigmoid, gradient descent, confusion matrix, ROC.
Week 3 · Lecture 1
Linear Regression
Least squares, normal equation, MSE/RMSE/MAE/R².
Week 3 · Lecture 2
Non-parametric Methods — k-Nearest Neighbours
Parametric vs non-parametric, Minkowski distance, k-NN algorithm.
Week 4 · Lecture 3
Decision Trees
Entropy, information gain, tree building, the 4-row worked example.
Week 5 · Lecture 1
Support Vector Machines I
Margin derivation, hard/soft margin, slack variables, C, hinge loss.
Week 5 · Lecture 2
Kernel Methods
Feature maps, kernel trick, linear/poly/RBF kernels, gamma.
Week 5 · Lecture 3
Validation & Evaluation
Holdout variants, stratification, k-fold, LOO, hyperparameters.
Week 6 · Lecture 1
Dimensionality Reduction
Curse of dimensionality, PCA algorithm, autoencoders.
Week 6 · Lecture 2
Clustering
k-means algorithm, DBSCAN core/border/noise, dendrograms and linkage.
Week 6 · Lecture 3
Regularisation
Bias/variance, over/underfitting, L1, L2, elastic net, dropout.
Week 7 · Lecture 2
Ensemble Methods I
Voting, binomial error bound, bagging, random forests, AdaBoost.
Week 7 · Lecture 3
Ensemble Methods II — Stacking, Mixture of Experts, Activations
Stacking steps, MoE gating, sigmoid vs softmax.
Week 8 · Lecture 3
Neural Networks
Perceptron, MLP, activations, forward/backward pass, parameter counting.

Notebooks

The nine practice notebooks plus both assignment notebooks. Each page walks the cells in order, quotes the verified output values, and ends with the questions an examiner is most likely to ask about that code.

Linear-Classification.ipynb
Linear Classification
Iris, logistic regression, decision boundary, confusion matrix, ROC.
Linear-Regression.ipynb
Linear Regression
Diabetes dataset, least squares, coefficient/intercept, MSE, R².
kNN-DecisionTree.ipynb
k-NN and Decision Trees
kNN k=3 vs decision tree, decision boundaries, F1 per class.
Copy of SVM-classifiation.ipynb
SVM Classification
Linear SVM, support vectors, C sweep, poly and RBF kernels.
Copy of model-evaluation.ipynb
Model Evaluation
Holdout, repeated holdout, 3-way, k-fold, LOO, hyperparameter sweep.
Copy of Overfitting&Regularization.ipynb
Overfitting and Regularization
Ridge alpha, C on logistic, weight_decay, train/test gap.
Copy of Clustering.ipynb
Clustering
make_moons, KMeans failure, DBSCAN success, dendrogram, SLIC.
Copy of dimensionality-reduction.ipynb
Dimensionality Reduction
StandardScaler, PCA on cancer/digits/MRI, reconstruction, autoencoder.
Copy of Ensemble-Methods.ipynb
Ensemble Methods
All six ensemble families on breast cancer, with their real accuracies.
CS460G-Assignment1.ipynb
Assignment 1 — Diabetes Linear Classification
Starter structure, rubric, the six sections, and the traps.
Copy_of_CS460G_Assignment2.ipynb
Assignment 2 — MNIST with PCA and SVM
NumPy PCA to 90% variance, C grid, gamma grid, two selection protocols.

What is on every page

780slide images
18lecture decks
11notebooks
37worked questions
79notebook plots