CSCI 4750/5750 · Spring 2027 · Homework Assignments
Four graded assignments (10% each). Each pairs programming with short written analysis, and each ends with a brief “reflection” question connecting the work to the current lecture arc. Due dates are Fridays 11:59 PM on Canvas.
Design principles: build it from scratch, then use the library. Every assignment has starred (★) functions written in plain NumPy — the algorithm is the learning objective — and then a part where the same task runs through scikit-learn or PyTorch at full scale, so the judgment (which model, which metric, is this number trustworthy?) is the learning objective. Everything is sized for Google Colab; only HW4 benefits from a GPU, and it runs on CPU too.
One dataset all semester. Every assignment adds an entry to the course’s Fashion-MNIST scoreboard (same official test set, same protocol): k-NN in HW1, softmax regression in HW2, PCA + k-NN in HW3, a from-scratch MLP, a CNN, and a linear probe on a pretrained network in HW4. By May you have measured one problem with seven models you understand line by line.
AI-tool tiers per the syllabus: all four assignments are Tier B (permitted with disclosure, but functions marked ★ must be written by you without AI assistance). HW4 Part 3 is Tier A: it asks you to use a pretrained model and permits AI assistants freely for that part.
Dual listing (CSCI 4750 vs. 5750): each of HW1–HW4 includes a marked graduate extension (“G part”) — a short additional experiment or analysis tied to a primary paper. Required for CSCI 5750 (worth 10 of the 100 points; core parts scaled to 90); optional extra credit for CSCI 4750 (up to +3 points). G parts are listed with each assignment below.
Setup: HW1’s starter ships
check_setup.py, which verifies the Python environment (or
Colab) before you write any code, and a short NumPy warm-up. The
background survey happens as in-class questions in Lecture 1.
HW1 — k-NN, linear regression & generalization
Out Fri Jan 15 · Due Fri Feb 5 · Covers L2–L8 · ~6–8 h
- k-nearest neighbors ★: vectorized pairwise distances, majority vote with a stated tie-break; choose k on a validation split; first Fashion-MNIST scoreboard entry.
- Linear regression ★: closed form (least squares), the gradient, batch gradient descent, ridge in closed form, polynomial features, k-fold cross-validation; a real regression dataset; the train/validation curve over polynomial degree.
- Written: least squares by hand, reading a learning curve, bias–variance in your own plot, what ridge does to the coefficients.
- G part (5750): double descent with random features and the minimum-norm solution (Belkin et al., 2019); plot test error through the interpolation threshold and explain it.
HW2 — Classification: logistic regression, evaluation & trees
Out Fri Feb 5 · Due Fri Feb 26 · Covers L9–L17 · ~7–9 h
- Logistic & softmax regression ★: stable sigmoid/softmax, cross-entropy, gradients, gradient descent with L2; second scoreboard entry.
- Evaluation metrics ★: confusion matrix, precision/recall/F1, the ROC curve and AUC from scratch, checked against scikit-learn on a real imbalanced dataset.
- Decision tree ★: Gini/entropy, best split, recursive growth with depth limit; then race it against scikit-learn’s random forest and gradient boosting on a tabular dataset.
- Written: a logistic gradient by hand, ROC/AUC by hand, choosing a threshold under costs, why the forest beat the tree.
- G part (5750): Gaussian Naive Bayes ★ vs. logistic regression learning curves — reproduce the generative-vs-discriminative crossover of Ng & Jordan (2001).
HW3 — Unsupervised learning: k-means, EM & PCA
Out Mon Mar 15 · Due Fri Apr 2 · Covers L20–L24 · ~6–8 h
- k-means ★: assignment and update steps, k-means++ initialization, inertia; color quantization of an image and clustering Fashion-MNIST.
- Gaussian mixture via EM ★: E-step, M-step, log-likelihood (log-sum-exp), with the never-decreasing likelihood checked by test.
- PCA ★: fit by SVD, project, reconstruct, explained variance; “eigen-clothes”; third scoreboard entry (PCA + k-NN).
- Written: one k-means iteration by hand, a responsibility by hand, reading a scree plot, what PCA cannot see.
- G part (5750): matrix factorization by alternating least squares ★ on MovieLens-100K vs. a bias-only baseline (Koren, Bell & Volinsky, 2009).
HW4 — Neural networks: backprop from scratch, then PyTorch
Out Fri Apr 2 · Due Fri Apr 23 · Covers L26–L31 · ~7–9 h
- MLP from scratch ★: linear, ReLU and softmax-cross-entropy layers with hand-written backward passes, verified by gradient checking; train on Fashion-MNIST in NumPy.
- PyTorch CNN: the same task with autograd and a small CNN; a training-tricks ablation (optimizer, dropout, normalization).
- Foundation features (Tier A): a linear probe — logistic regression on features from a pretrained network — vs. training from scratch; the last scoreboard entry.
- Written: one backprop step by hand, a parameter count, the overfit-one-batch ritual, reading the final scoreboard.
- G part (5750): implement Adam ★ (Kingma & Ba, 2015) and compare it with SGD and momentum on the same network.
Grading & logistics
- Each HW graded /100: ~70 implementation correctness (autograded where possible + spot checks), ~20 written analysis, ~10 reflection & presentation quality. For CSCI 5750 these core parts are scaled to 90 and the required G part is worth 10; for CSCI 4750 the G part is optional extra credit (up to +3).
- Late policy: 5 free late days per semester, at most 2 per assignment; beyond that, −5 points per additional day (partial days rounded down).
- Starter kits: one zip per assignment (starter code,
pytestautograder, setup check, written questions). The autograder students run is the one used for grading — no hidden tests.