| # | date | topic | description |
|---|---|---|---|
| 1 | 24-Aug-2026 | Introduction | |
| 2 | 26-Aug-2026 | Foundations of learning | Drop/Add |
| 3 | 31-Aug-2026 | PAC learnability | HW1 |
| 4 | 02-Sep-2026 | Linear learning models | |
| 5 | 07-Sep-2026 | Labor Day Holiday | Holiday |
| 6 | 09-Sep-2026 | Principal Component Analysis | Project ideas |
| 7 | 14-Sep-2026 | Curse of Dimensionality | HW2, HW1 due |
| 8 | 16-Sep-2026 | Bayesian Decision Theory | |
| 9 | 21-Sep-2026 | Parameter estimation: MLE | |
| 10 | 23-Sep-2026 | Parameter estimation: MAP & NB | finalize teams |
| 11 | 28-Sep-2026 | Logistic Regression | HW3, HW2 due |
| 12 | 30-Sep-2026 | Kernel Density Estimation | |
| 13 | 05-Oct-2026 | Support Vector Machines | |
| 14 | 07-Oct-2026 | Matrix Factorization | |
| 15 | 12-Oct-2026 | * Midterm | Exam, HW3 due |
| 16 | 14-Oct-2026 | k-means clustering | |
| 17 | 19-Oct-2026 | Invited: Intro to Causal Learning I |
| # | date | topic | description |
|---|---|---|---|
| 18 | 21-Oct-2026 | Invited: Intro to Causal Learning II | |
| 19 | 26-Oct-2026 | * Mid-point projects checkpoint | HW4, P |
| 20 | 28-Oct-2026 | Expectation Maximization | |
| 21 | 02-Nov-2026 | Stochastic Gradient Descent | |
| 22 | 04-Nov-2026 | Automatic Differentiation | |
| 23 | 09-Nov-2026 | Nonlinear embedding approaches | HW5, HW4 due |
| 24 | 11-Nov-2026 | Model comparison | |
| 25 | 16-Nov-2026 | Model Calibration | |
| 26 | 18-Nov-2026 | Convolutional Neural Networks | |
| 27 | 23-Nov-2026 | Thanksgiving Break | Holiday |
| 28 | 25-Nov-2026 | Thanksgiving Break | Holiday |
| 29 | 30-Nov-2026 | Word Embedding | |
| 30 | 02-Dec-2026 | Project Final Presentations | HW5 due, P |
| 31 | 07-Dec-2026 | Presentation spillover / Exam prep | Classes End |
| 32 | 09-Dec-2026 | * Final Exam | Exam |
| 33 | 16-Dec-2026 | Project Reports | due |
| 34 | 17-Dec-2026 | Grades due 5 p.m. | PAWS |
| # | date | topic |
|---|---|---|
| 1 | 24-Aug-2026 | Introduction |
| 2 | 26-Aug-2026 | Foundations of learning |
| 3 | 31-Aug-2026 | PAC learnability |
| 4 | 02-Sep-2026 | Linear learning models |
| 5 | 07-Sep-2026 | Labor Day Holiday |
| 6 | 09-Sep-2026 | Principal Component Analysis |
| 7 | 14-Sep-2026 | Curse of Dimensionality |
| 8 | 16-Sep-2026 | Bayesian Decision Theory |
| 9 | 21-Sep-2026 | Parameter estimation: MLE |
| 10 | 23-Sep-2026 | Parameter estimation: MAP & NB |
| 11 | 28-Sep-2026 | Logistic Regression |
| 12 | 30-Sep-2026 | Kernel Density Estimation |
| 13 | 05-Oct-2026 | Support Vector Machines |
Minimizing the Bayes error is the optimal strategy if we know the posterior exactly!
In the general case, we need to non-parametrically estimate the densities
$\prob{P$_{KDE}$}{\vec{x}} = \frac{1}{Nh^d} \sum_{n=1}^N \prob{K}{\frac{\vec{x} - \vec{x}^n}{h}}$, where $\prob{K}{\vec{x}} = (2\pi)^{-d/2}e^{-\frac{1}{2}\vec{x}^T\vec{x}}$
Decision boundary is sensitive to outliers!
Definition: Given a joint distribution $\prob{P$_{KDE}$}{\vec{x},C}$ and a set of classifiers $\cal H$, we say that $h^*$ is a restricted Bayes optimal classifier with respect to $\cal H$ and ${\rm P}_{KDE}$if $h^* \in {\cal H}$ and $\forall h\in {\cal H}$, $\prob{error}{h^*:{\rm P}_{KDE}} \le \prob{error}{h: {\rm P}_{KDE}}$
The distance does not depend on $\|\vec{w}\|$
To maximize the gap, need to minimize $\|\vec{w}\|$ or equivalently $\frac{1}{2}\|\vec{w}\|^2$ ($\frac{1}{2}\vec{w}^T\vec{w}$)
Want to minimize $\frac{1}{2}\|\vec{w}\|^2$ subject to $y_i(\vec{w}^T\vec{x}_i + b) \ge 1$ for $i=1,\dots, N$
Classify new instance $\vec{x}$ as $f(\vec{x}) = \mbox{sign}(\vec{w}^T\vec{x} + b)$
Minimize $\frac{1}{2}\|\vec{w}\|^2$ subject to $y_i(\vec{w}^T\vec{x}_i + b) - 1 \ge 0$ for $i=1,\dots, N$
\begin{align} \underset{\vec{w} \in \RR^m}{\argmin} \vec{w}^T {\mathbf Q} \vec{w} & + \vec{w}^T\vec{c} + \epsilon \\ {\mathbf A}\vec{w} & \le \vec{b} \\ {\mathbf A} \in \RR^{n\times m}, \vec{w} & \in \RR^m, \vec{b}\in \RR^n\\ {\mathbf C}\vec{w} & = \vec{d} \\ {\mathbf C} \in \RR^{s\times m}, \vec{d} &\in \RR^s\\ \end{align}

Karush-Kuhn-Tucker (KKT) Necessary Optimality Conditions
1. Stationarity: $\nabla_x \Lambda = 0$ | 2. Primal Feasibility: $c_i(x^*) \ge 0, \; g_i(x^*) \le 0, \; h_i(x^*) = 0$
3. Dual Feasibility: $\alpha_i \ge 0, \; \lambda_i \ge 0$ | 4. Complementary Slackness: $\alpha_i c_i(x^*) = 0, \; \lambda_i g_i(x^*) = 0$
For convex problems with regular constraints (Slater's condition), KKT conditions are both necessary and sufficient for global optimality!
$\min_x x^2$
s.t. $x \ge b$
$\min_x x^2$Let's move the constraint to the objective Lagrangian
s.t. $x \ge b$ or $x-b\ge 0$
$L(x, \alpha) = x^2 - \alpha(x-b)$
s.t. $\alpha \ge 0$
Solve: $\min_x \max_{\alpha} L(x, \alpha)$
s.t. $\alpha \ge 0$
Ellipse equation
$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$
Main point
Using Lagrangian multipliers and KKT conditions can convert a constrained problem into an unconstrained saddle-point problem.
KKT Complementary Slackness: $\alpha_i \left[ y_i(\vec{w}^T\vec{x}_i + b) - 1 \right] = 0 \quad \forall i$
$$\vec{w} = \sum_{i \in \text{SV}} \alpha_i y_i \vec{x}_i$$
Out of $N=100,000$ data points, often only a few dozen support vectors define the entire decision boundary.
The data may not be linearly separable
Appropriate mappings are hard to construct. What to do?
Maximize $\sum_{i=1}^N \alpha_i - \frac{1}{2} \sum_{i,j=1}^N \alpha_i\alpha_j y_i y_j (\vec{x}_i^T\vec{x}_j)$
subject to $\alpha_i \ge 0$ and $\sum_{i=1}^N \alpha_i y_i = 0$
Final classifier: $f(\vec{x}) = \mbox{sign}\left(\sum_{i=1}^N \alpha_i y_i (\vec{x}_i^T\vec{x}) + b\right)$
Replace inner product $\vec{x}_i^T\vec{x}_j$ with kernel $K(\vec{x}_i,\vec{x}_j)$:
Maximize $\sum_{i=1}^N \alpha_i - \frac{1}{2} \sum_{i,j=1}^N \alpha_i\alpha_j y_i y_j K(\vec{x}_i,\vec{x}_j)$
subject to $\alpha_i \ge 0$ and $\sum_{i=1}^N \alpha_i y_i = 0$
Final classifier: $f(\vec{x}) = \mbox{sign}\left(\sum_{i=1}^N \alpha_i y_i K(\vec{x}_i, \vec{x}) + b\right)$
Matrix form: Maximize $\vec{\alpha}^T\mathbf{1} - \frac{1}{2} \vec{\alpha}^T \mathbf{Y}\mathbf{G}\mathbf{Y} \vec{\alpha}$
subject to $\vec{\alpha} \ge 0$ and $\vec{\alpha}^T \vec{y} = 0$, where $\mathbf{Y} = \operatorname{diag}(\vec{y})$, $G_{ij} = K(\vec{x}_i, \vec{x}_j)$
Introduce slack variables $\xi_i \ge 0$ allowing margin violations
$\xi_i = 0$: correctly outside or on margin.
$0 < \xi_i \le 1$: inside margin, correctly classified.
$\xi_i > 1$: misclassified!
Dual Soft-Margin QP: Maximize $\vec{\alpha}^T\mathbf{1} - \frac{1}{2} \vec{\alpha}^T\mathbf{Y}\mathbf{G}\mathbf{Y}\vec{\alpha}$
subject to $0 \le \alpha_i \le C$ and $\vec{\alpha}^T \vec{y} = 0$
Primal Problem: $\min_{\vec{w}, b, \vec{\xi}} \frac{1}{2}\|\vec{w}\|^2 + C\sum_{i=1}^N \xi_i \quad \text{s.t.} \quad y_i(\vec{w}^T\vec{x}_i + b) \ge 1 - \xi_i, \; \xi_i \ge 0$
Multiplier $\beta_i \ge 0$ for $\xi_i \ge 0 \implies \frac{\partial L}{\partial \xi_i} = C - \alpha_i - \beta_i = 0 \implies \alpha_i + \beta_i = C \implies \mathbf{\alpha_i \le C}$!
SVM outputs uncalibrated scores $f(\vec{x}) \in \mathbb{R}$, not probabilities. To get well-calibrated posteriors: $$P(y=1|\vec{x}) = \frac{1}{1 + \exp(A f(\vec{x}) + B)}$$ Fit parameters $A, B$ on held-out validation data via maximum likelihood! (Preview to Lecture 22 Calibration).
from sklearn.svm import SVC
clf = SVC(C=1.0, kernel='rbf', gamma='scale',
probability=True)
clf.fit(X_train, y_train)