From 8bdcd4c07fa8770c985c6efd6c3f7d0876cfaf0c Mon Sep 17 00:00:00 2001 From: jemus42 Date: Thu, 21 Mar 2024 15:31:39 +0000 Subject: [PATCH] Update latex-math --- latex-math/basic-math.tex | 12 ++++++------ latex-math/basic-ml.tex | 25 +++++++++++++------------ latex-math/ml-interpretable.tex | 3 --- latex-math/ml-online.tex | 16 +++++----------- 4 files changed, 24 insertions(+), 32 deletions(-) diff --git a/latex-math/basic-math.tex b/latex-math/basic-math.tex index df3e12a4..5987c4e7 100644 --- a/latex-math/basic-math.tex +++ b/latex-math/basic-math.tex @@ -1,11 +1,11 @@ % math spaces -\ifdefined\N +\ifdefined\N \renewcommand{\N}{\mathds{N}} % N, naturals -\else \newcommand{\N}{\mathds{N}} \fi +\else \newcommand{\N}{\mathds{N}} \fi \newcommand{\Z}{\mathds{Z}} % Z, integers \newcommand{\Q}{\mathds{Q}} % Q, rationals \newcommand{\R}{\mathds{R}} % R, reals -\ifdefined\C +\ifdefined\C \renewcommand{\C}{\mathds{C}} % C, complex \else \newcommand{\C}{\mathds{C}} \fi \newcommand{\continuous}{\mathcal{C}} % C, space of continuous functions @@ -19,10 +19,10 @@ % basic math stuff \newcommand{\xt}{\tilde x} % x tilde -\newcommand{\argmax}{\operatorname{arg\,max}} % argmax -\newcommand{\argmin}{\operatorname{arg\,min}} % argmin +\DeclareMathOperator*{\argmax}{arg\,max} % argmax +\DeclareMathOperator*{\argmin}{arg\,min} % argmin \newcommand{\argminlim}{\mathop{\mathrm{arg\,min}}\limits} % argmax with limits -\newcommand{\argmaxlim}{\mathop{\mathrm{arg\,max}}\limits} % argmin with limits +\newcommand{\argmaxlim}{\mathop{\mathrm{arg\,max}}\limits} % argmin with limits \newcommand{\sign}{\operatorname{sign}} % sign, signum \newcommand{\I}{\mathbb{I}} % I, indicator \newcommand{\order}{\mathcal{O}} % O, order diff --git a/latex-math/basic-ml.tex b/latex-math/basic-ml.tex index 744d46ce..eff539e6 100644 --- a/latex-math/basic-ml.tex +++ b/latex-math/basic-ml.tex @@ -1,6 +1,7 @@ % machine learning \newcommand{\Xspace}{\mathcal{X}} % X, input space \newcommand{\Yspace}{\mathcal{Y}} % Y, output space +\newcommand{\Zspace}{\mathcal{Z}} % Space of sampled datapoints ! Also defined identically in ml-online.tex ! \newcommand{\nset}{\{1, \ldots, n\}} % set from 1 to n \newcommand{\pset}{\{1, \ldots, p\}} % set from 1 to p \newcommand{\gset}{\{1, \ldots, g\}} % set from 1 to g @@ -10,23 +11,23 @@ \newcommand{\xtil}{\tilde{\mathbf{x}}} % vector x-tilde (bold) \newcommand{\yv}{\mathbf{y}} % vector y (bold) \newcommand{\xy}{(\xv, y)} % observation (x, y) -\newcommand{\xvec}{\left(x_1, \ldots, x_p\right)^\top} % (x1, ..., xp) +\newcommand{\xvec}{\left(x_1, \ldots, x_p\right)^\top} % (x1, ..., xp) \newcommand{\Xmat}{\mathbf{X}} % Design matrix \newcommand{\allDatasets}{\mathds{D}} % The set of all datasets -\newcommand{\allDatasetsn}{\mathds{D}_n} % The set of all datasets of size n +\newcommand{\allDatasetsn}{\mathds{D}_n} % The set of all datasets of size n \newcommand{\D}{\mathcal{D}} % D, data \newcommand{\Dn}{\D_n} % D_n, data of size n \newcommand{\Dtrain}{\mathcal{D}_{\text{train}}} % D_train, training set \newcommand{\Dtest}{\mathcal{D}_{\text{test}}} % D_test, test set \newcommand{\xyi}[1][i]{\left(\xv^{(#1)}, y^{(#1)}\right)} % (x^i, y^i), i-th observation \newcommand{\Dset}{\left( \xyi[1], \ldots, \xyi[n]\right)} % {(x1,y1)), ..., (xn,yn)}, data -\newcommand{\defAllDatasetsn}{(\Xspace \times \Yspace)^n} % Def. of the set of all datasets of size n -\newcommand{\defAllDatasets}{\bigcup_{n \in \N}(\Xspace \times \Yspace)^n} % Def. of the set of all datasets +\newcommand{\defAllDatasetsn}{(\Xspace \times \Yspace)^n} % Def. of the set of all datasets of size n +\newcommand{\defAllDatasets}{\bigcup_{n \in \N}(\Xspace \times \Yspace)^n} % Def. of the set of all datasets \newcommand{\xdat}{\left\{ \xv^{(1)}, \ldots, \xv^{(n)}\right\}} % {x1, ..., xn}, input data \newcommand{\ydat}{\left\{ \yv^{(1)}, \ldots, \yv^{(n)}\right\}} % {y1, ..., yn}, input data \newcommand{\yvec}{\left(y^{(1)}, \hdots, y^{(n)}\right)^\top} % (y1, ..., yn), vector of outcomes \renewcommand{\xi}[1][i]{\xv^{(#1)}} % x^i, i-th observed value of x -\newcommand{\yi}[1][i]{y^{(#1)}} % y^i, i-th observed value of y +\newcommand{\yi}[1][i]{y^{(#1)}} % y^i, i-th observed value of y \newcommand{\xivec}{\left(x^{(i)}_1, \ldots, x^{(i)}_p\right)^\top} % (x1^i, ..., xp^i), i-th observation vector \newcommand{\xj}{\xv_j} % x_j, j-th feature \newcommand{\xjvec}{\left(x^{(1)}_j, \ldots, x^{(n)}_j\right)^\top} % (x^1_j, ..., x^n_j), j-th feature vector @@ -40,7 +41,7 @@ \newcommand{\preimageInducer}{\left(\defAllDatasets\right)\times\Lam} % Set of all datasets times the hyperparameter space \newcommand{\preimageInducerShort}{\allDatasets\times\Lam} % Set of all datasets times the hyperparameter space % Inducer / Inducing algorithm -\newcommand{\ind}{\mathcal{I}} % Inducer, inducing algorithm, learning algorithm +\newcommand{\ind}{\mathcal{I}} % Inducer, inducing algorithm, learning algorithm % continuous prediction function f \newcommand{\ftrue}{f_{\text{true}}} % True underlying function (if a statistical model is assumed) @@ -61,8 +62,8 @@ \newcommand{\fhDtrain}{\fh_{\Dtrain}} % fhat_Dtrain, estimate of f based on D \newcommand{\fhDnlam}{\fh_{\Dn, \lamv}} %model learned on Dn with hp lambda \newcommand{\fhDlam}{\fh_{\D, \lamv}} %model learned on D with hp lambda -\newcommand{\fhDnlams}{\fh_{\Dn, \lamv^\ast}} %model learned on Dn with optimal hp lambda -\newcommand{\fhDlams}{\fh_{\D, \lamv^\ast}} %model learned on D with optimal hp lambda +\newcommand{\fhDnlams}{\fh_{\Dn, \lamv^\ast}} %model learned on Dn with optimal hp lambda +\newcommand{\fhDlams}{\fh_{\D, \lamv^\ast}} %model learned on D with optimal hp lambda % discrete prediction function h \newcommand{\hx}{h(\xv)} % h(x), discrete prediction function @@ -91,12 +92,12 @@ \newcommand{\argmint}{\argmin_{\thetab \in \Theta}} % argmin theta % densities + probabilities -% pdf of x +% pdf of x \newcommand{\pdf}{p} % p \newcommand{\pdfx}{p(\xv)} % p(x) \newcommand{\pixt}{\pi(\xv~|~ \thetab)} % pi(x|theta), pdf of x given theta \newcommand{\pixit}[1][i]{\pi\left(\xi[#1] ~|~ \thetab\right)} % pi(x^i|theta), pdf of x given theta -\newcommand{\pixii}[1][i]{\pi\left(\xi[#1]\right)} % pi(x^i), pdf of i-th x +\newcommand{\pixii}[1][i]{\pi\left(\xi[#1]\right)} % pi(x^i), pdf of i-th x % pdf of (x, y) \newcommand{\pdfxy}{p(\xv,y)} % p(x, y) @@ -134,7 +135,7 @@ % probababilistic \newcommand{\bayesrulek}[1][k]{\frac{\P(\xv | y= #1) \P(y= #1)}{\P(\xv)}} % Bayes rule -\newcommand{\muk}{\bm{\mu_k}} % mean vector of class-k Gaussian (discr analysis) +\newcommand{\muk}{\bm{\mu_k}} % mean vector of class-k Gaussian (discr analysis) % residual and margin \newcommand{\eps}{\epsilon} % residual, stochastic @@ -192,4 +193,4 @@ % lm \newcommand{\thx}{\thetab^\top \xv} % linear model -\newcommand{\olsest}{(\Xmat^\top \Xmat)^{-1} \Xmat^\top \yv} % OLS estimator in LM +\newcommand{\olsest}{(\Xmat^\top \Xmat)^{-1} \Xmat^\top \yv} % OLS estimator in LM diff --git a/latex-math/ml-interpretable.tex b/latex-math/ml-interpretable.tex index b3d96b00..deb55d3a 100644 --- a/latex-math/ml-interpretable.tex +++ b/latex-math/ml-interpretable.tex @@ -29,8 +29,5 @@ \newcommand{\Gspace}{\mathcal{G}} % Hypothesis space for surrogate model \newcommand{\neigh}{\phi_{\xv}} % Proximity measure \newcommand{\zv}{\mathbf{z}} % Sampled datapoints for surrogate -\ifdefined \Zspace \else -\newcommand{\Zspace}{\mathcal{Z}} % Space of sampled datapoints ! Also defined identically in ml-online.tex ! -\fi \newcommand{\Gower}{d_G} % Gower distance diff --git a/latex-math/ml-online.tex b/latex-math/ml-online.tex index fc129e87..ffbfe74b 100644 --- a/latex-math/ml-online.tex +++ b/latex-math/ml-online.tex @@ -1,16 +1,10 @@ -\renewcommand{\l}{L} \newcommand{\Aspace}{\mathcal{A}} -%\renewcommand{\Zspace}{\mathcal{Z}} -\ifdefined \Zspace \else -\newcommand{\Zspace}{\mathcal{Z}} % Space of sampled datapoints ! Also defined identically in ml-interpretable.tex ! -\fi \newcommand{\norm}[1]{\left|\left|#1\right|\right|_2} - -\newcommand{\llin}{\l^{\texttt{lin}}} -\newcommand{\lzeroone}{\l^{0-1}} -\newcommand{\lhinge}{\l^{\texttt{hinge}}} -\newcommand{\lexphinge}{\widetilde{\l^{\texttt{hinge}}}} -\newcommand{\lconv}{\l^{\texttt{conv}}} +\newcommand{\llin}{L^{\texttt{lin}}} +\newcommand{\lzeroone}{L^{0-1}} +\newcommand{\lhinge}{L^{\texttt{hinge}}} +\newcommand{\lexphinge}{\widetilde{L^{\texttt{hinge}}}} +\newcommand{\lconv}{L^{\texttt{conv}}} \newcommand{\FTL}{\texttt{FTL}} \newcommand{\FTRL}{\texttt{FTRL}} \newcommand{\OGD}{{\texttt{OGD}}}