$$ \newcommand{\st}{\text{ s.t. }} \newcommand{\and}{\text{ and }} \DeclareMathOperator*{\argmin}{arg\,min} \DeclareMathOperator*{\argmax}{arg\,max} \DeclareMathOperator*{\liminf}{lim\,inf} \DeclareMathOperator*{\limsup}{lim\,sup} \DeclareMathOperator*{\dom}{dom} \DeclareMathOperator*{\epi}{epi} \newcommand{\<}{\langle} \newcommand{\>}{\rangle} \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} \newcommand{\O}{\mathcal{O}} \newcommand{\dist}{\text{dist}} \newcommand{\vec}[1]{\mathbf{#1}} \newcommand{\diag}{\mathrm{diag}} \newcommand{\d}{\mathrm{d}} \newcommand{\L}{\mathcal{L}} \newcommand{\H}{\mathcal{H}} \newcommand{\Tr}{\mathrm{\mathbf{Tr}}} \newcommand{\E}{\mathbb{E}} \newcommand{\Var}{\mathrm{Var}} \newcommand{\Cov}{\mathrm{Cov}} \newcommand{\indep}{\perp \!\!\! \perp} \newcommand{\KL}[2]{\mathrm{KL}(#1 \parallel #2)} \newcommand{\W}{\mathbf{W}} % Wasserstein distance \newcommand{\SW}{\mathbf{SW}} % Sliced-Wasserstein distance $$

Alternative classification techniques

K-Nearest Neighbors classifier The idea is to represent each record in the data set as an element in $\mathbb{R}^n$ $\DeclareMathOperator*{\argmax}{arg \,max \,} \DeclareMathOperator*{\argmin}{arg \,min \,}$. Then, to predict the class of a new point $x$, compute the $k$ points that are nearest to $x$. The majority class of these $k$ points is the predicted class of $x$. To run this algorithm, we need to define a distance function and also a value for $k$. ...

October 9, 2024 · 4 min

k-cores and Densest Subgraph

Definition: Induced subgraph A graph $H = (V_H, E_H)$ is an induced subgraph of $G = (V_G, E_G)$ if $V_H \subseteq V_G$ and if $u, v \in V_H$ and $(u, v) \in E_G$, then $(u, v) \in E_H$. We will say that $\delta_G(v)$ is the number of edges incident to $v$ in $G$. Definition: $k$-core Given a graph $G$ and $k \geq 0$, a subgraph $H$ of $G$ is a $k$-core if: ...

October 9, 2024 · 3 min

Bayesian Statistics

Tip: Beta distribution The Beta distribution is a continuous probability distribution defined on the interval $[0, 1]$. It has two parameters: $\theta = (\alpha, \beta)$. Then, we have: $$ \begin{align*} p_\theta(x) &= \frac{x^{\alpha - 1} (1 - x)^{\beta - 1}}{B(\alpha, \beta)} \\ \mathbb{E}[X] &= \frac{\alpha}{\alpha + \beta} \\ \mathrm{Var}(X) &= \frac{\alpha \beta}{(\alpha + \beta)^2 (\alpha + \beta + 1)}, \end{align*} $$ where $B(\alpha, \beta)$ is the Beta function, defined as: ...

October 7, 2024 · 4 min

Color perception and representation

Perception Color is the result of 3 things: An illuminant: source of light ($I(\lambda)$); An object: absorbs and reflects light ($R(\lambda)$); An observer: sensor ($S(\lambda) = I(\lambda) R(\lambda)$). Our visual system consists of rods (sensible, imprecise) and cones (not so sensible, very precise). There are three types of cones: S (short) cones: blue; M (medium) cones: green; L (large) cones: red; Let $s(\lambda)$, $m(\lambda)$ and $l(\lambda)$ be the spectral sensibilities of these cones. Then, we perceive a spectrum $S(\lambda) = I(\lambda) R(\lambda)$ as three values: ...

October 7, 2024 · 2 min

Image segmentation

Definition: Segmentation To segment an image is to divide it into homogeneous regions, considering one or many attributes (gray level, color, texture, etc.). We call borders the boundaries between these regions. Classical methods of border detection We try to use the local variations of the image to find borders: the 1st and 2nd derivatives. Since we are looking for discontinuities in the image, we need to find the points where the derivative is maximum. This is equivalent of looking for places where the second derivative is zero. ...

October 7, 2024 · 4 min