Math notation can be too concise. Programming notation can be too verbose (but supports [[type theory|type checking]]). Let's find a nice inbetween? # conventions - $f[\theta] : \mathcal{X} \to \mathcal{Y}$ for some [[currying|curried]] function $f : [\Theta] \to \mathcal{X} \to \mathcal{Y}$ (I use this one a lot) - $X = \mathbb{R}^{N}, Y = \mathbb{R}^{M}$, i.e. [[finite-dimensional]] [[normed space]]s. - Lowercase letters range over the corresponding uppercase letters. ie $x \in X$ - $\vec x$ for $x/\|x\|$ (a unit vector) - $X_{a}, Y_{b}$ for subsets of $X$ and $Y$. - $f: X \twoheadrightarrow Y$ for a linear map from $X$ to $Y$, i.e. $f(ax_{1} + x_{2}) = a f(x_{1}) + x_{2}$. We identify $(\mathbb{R} \twoheadrightarrow Y) \cong Y$ at the end of a function signature since it can be replaced by scalar multiplication. - $[[ f ]]_{U,V}$ for the matrix of a [[linear]] $f$ from basis $U$ of $X$ to basis $V$ of $Y$. Note this takes $(X \twoheadrightarrow Y) \to \mathbb{R}^{M \times N}$. Note the ordering in the superscript. - Bases are written as matrices $U = (u_{1:N}), V = (v_{1:M})$. - If $f : X \to Y$ and $g : Y \to Z$ then $f ; g = g \circ f : X \to Z$ - $x_{*}, y_{*}$ denote fixed points of interest. - $\sigma_{1:K} \in S$ means each *element* of $\sigma$ resides in $S$. $(\sigma_{1:K}) \in S$ means that the sequence $\sigma$ is an element of the sequence space $S$. - Indexing into arrays uses NumPy indexing notation. - $c \cdot y$ for the [[dot product]] or sometimes scalar multiplication. - For filenames and such: "min-max" instead of "max-min". - Let $g$ be of some [[group]]. Then $g_{\natural} := h \mapsto g h g^{-1}$ (see [[conjugate]]) - ${\circlearrowleft^{n}_{N}} := \exp(2 \pi i n/N)$. ${\circlearrowleft^{\theta}} := \exp(i \theta)$. - $\odot$ for elementwise multiplication ![[line segment]] # letters and symbols - $n \in [N], m \in [M]$ where $[N] = \{ 1, \dots, N\}$ - $\mathcal{X}$ for [[covariate]]s, $\mathcal{Y}$ for [[response]]s, $\mathcal{Z}$ for hidden features - $h$ for some kind of transformation (eg [[basis expansion]]) - $d \in [D]$ for data [[dimension]] - $p, q \in \triangle(\mathcal{X})$ for distributions - $p_{*}$ for [[statistics|data generating process]] - $\delta \in \mathcal{X}$ denotes some distance in the domain. - $\epsilon \in \mathcal{Y}$ denotes some distance in the range. - $t \in \mathbb{R}$ and can usually be thought of as "time" - $\mathcal{L}$ for [[Lagrangian duality]] - $\mathcal{F}$ for [[function space]] - $\mathcal{H}$ for [[Hilbert space]] or [[statistical hypothesis]] space (rarely overlap) - $H$ for [[entropy]] - $E$ for [[energy function]] - $\theta \in \Theta$ for [[parameter]] - $T$ for a [[statistic]] [Abuse of notation - Wikipedia](https://en.wikipedia.org/wiki/Abuse_of_notation) ![[sequential decision making framework]]