Skip to content

Commit

Permalink
add notation; fix numbering exacity#35
Browse files Browse the repository at this point in the history
Former-commit-id: d0b51936c944c8a6e9f0770474180495904f22ab
  • Loading branch information
SwordYork committed Jan 12, 2017
1 parent 0850be0 commit 44658ae
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
all:
xelatex dlbook_cn.tex && bibtex dlbook_cn.aux && texindy dlbook_cn.idx && makeglossaries dlbook_cn && xelatex dlbook_cn.tex
xelatex dlbook_cn.tex && bibtex dlbook_cn.aux && texindy dlbook_cn.idx && makeglossaries dlbook_cn && xelatex dlbook_cn.tex && xelatex dlbook_cn.tex

clean:
find . -type f -iregex '.*\.\(aux\|log\|toc\|backup\|acr\|brf\|gz\|acn\|xdy\|alg\)$$' -delete
5 changes: 4 additions & 1 deletion acknowledgments.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
% !Mode:: "TeX:UTF-8"
%TODO
%TODO
\chapter*{致谢}

\addcontentsline{toc}{chapter}{致谢}
TODO
7 changes: 5 additions & 2 deletions dlbook_cn.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% !Mode:: "TeX:UTF-8"
\documentclass[twoside,nofonts,fancyhdr,openany,10.5pt,UTF8]{ctexbook}
\documentclass[twoside,nofonts,fancyhdr,openany,UTF8]{ctexbook}
\usepackage{natbib}

% CJK related
Expand Down Expand Up @@ -36,7 +36,6 @@
% Make bibliography and index appear in table of contents
\usepackage[nottoc]{tocbibind}
\usepackage[font=small]{caption}
\normalspacedchars{-}

\usepackage[section]{placeins}
\usepackage[chapter]{algorithm}
Expand Down Expand Up @@ -118,6 +117,7 @@


\begin{document}
\frontmatter

\maketitle
\cleardoublepage
Expand All @@ -144,6 +144,9 @@
\input{applied_math_and_machine_learning_basics.tex}
\input{deep_networks_modern_practices.tex}
\input{deep_learning_research.tex}


\backmatter
\appendix

\small{
Expand Down
3 changes: 2 additions & 1 deletion math_symbol.tex
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@
\newcommand{\MX}{\boldsymbol{\mathit{X}}}
\newcommand{\MY}{\boldsymbol{\mathit{Y}}}
\newcommand{\MZ}{\boldsymbol{\mathit{Z}}}
\newcommand{\RMX}{\boldsymbol{\mathrm{X}}}


%Tensor
Expand Down Expand Up @@ -238,6 +237,8 @@

% Random Matrix
% will be added later
\newcommand{\RMX}{\boldsymbol{\mathrm{X}}}
\newcommand{\RMA}{\boldsymbol{\mathrm{A}}}

\newcommand{\Valpha}{\boldsymbol{\alpha}}
\newcommand{\Vbeta}{\boldsymbol{\beta}}
Expand Down
175 changes: 163 additions & 12 deletions notation.tex
Original file line number Diff line number Diff line change
@@ -1,14 +1,165 @@
% !Mode:: "TeX:UTF-8"
%TODO
TODO
与原书类似
\begin{itemize}
\item $\Sa$
\item $\Va$ 向量
\item $\MA$ 矩阵
\item 需要时加tensor $\boldsymbol{\mathsf{A}}$
\item $\RSa$ 随机数
\item $\RVa$ 随机向量
\item 需要时加随机矩阵 $\boldsymbol{\mathrm{A}}$
\item $\SetA$ 集合
\end{itemize}
\chapter*{数学符号}
\label{notation}

\addcontentsline{toc}{chapter}{数学符号}


本节简要介绍本书所使用的数学符号。
我们在\chapref{chap:linear_algebra}至\chapref{chap:numerical_computation}中描述大多数数学概念,如果你不熟悉任何相应的数学概念,可以参考对应的章节。

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 数和数组}
\bgroup
% The \arraystretch definition here increases the space between rows in the table,
% so that \displaystyle math has more vertical space.
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle a$ & 标量 (整数或实数) \\
$\displaystyle \Va$ & 向量 \\
$\displaystyle \MA$ & 矩阵 \\
$\displaystyle \TSA$ & 张量 \\
$\displaystyle \MI_n$ & $n$$n$列的\gls{identity_matrix} \\
$\displaystyle \MI$ & 维度蕴含于上下文的\gls{identity_matrix} \\
$\displaystyle \Ve^{(i)}$ & 标准基向量$[0,\dots,0,1,0,\dots,0]$,其中索引$i$处值为1 \\
$\displaystyle \text{diag}(\Va)$ & 对角方阵,其中对角元素由$\Va$给定 \\
$\displaystyle \RSa$ & 标量随机变量 \\
$\displaystyle \RVa$ & 向量随机变量 \\
$\displaystyle \RMA$ & 矩阵随机变量 \\
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 集合和图}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle \SetA$ & 集合 \\
$\displaystyle \SetR$ & 实数集 \\
$\displaystyle \{0, 1\}$ & 包含0和1的集合 \\
$\displaystyle \{0, 1, \dots, n \}$ & 包含$0$$n$之间所有整数的集合 \\
$\displaystyle [a, b]$ & 包含$a$$b$的实数区间 \\
$\displaystyle (a, b]$ & 不包含$a$但包含$b$的实数区间 \\
$\displaystyle \SetA \backslash \SetB$ & 差集,即其元素包含于$\SetA$但不包含于$\SetB$\\
$\displaystyle \CalG$ & 图 \\
$\displaystyle Pa_\CalG(\RSx_i)$ & 图$\CalG$$\RSx_i$的父节点
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 索引}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle a_i$ & 向量$\Va$的第$i$个元素,其中索引从1开始 \\
$\displaystyle a_{-i}$ & 除了第$i$个元素,$\Va$的所有元素 \\
$\displaystyle A_{i,j}$ & 矩阵$\MA$$i,j$元素 \\
$\displaystyle \MA_{i, :}$ & 矩阵$\MA$的第$i$行 \\
$\displaystyle \MA_{:, i}$ & 矩阵$\MA$的第$i$列 \\
$\displaystyle \TEA_{i, j, k}$ & 3维张量$\TSA$$(i, j, k)$元素 \\
$\displaystyle \TSA_{:, :, i}$ & 3维张量的2维切片 \\
$\displaystyle \RSa_i$ & 随机向量$\RVa$的第$i$个元素 \\
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 线性代数中的操作}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle \MA^\top$ & 矩阵$\MA$的转置 \\
$\displaystyle \MA^+$ & $\MA$\gls{Moore} \\
$\displaystyle \MA \odot \MB $ & $\MA$$\MB$的逐元素乘积(\gls{hadamard_product}) \\
$\displaystyle \mathrm{det}(\MA)$ & $\MA$的行列式 \\
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 微积分}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle\frac{d y} {d x}$ & $y$关于$x$的导数 \\
$\displaystyle \frac{\partial y} {\partial x} $ & $y$关于$x$的偏导 \\
$\displaystyle \nabla_{\Vx} y $ & $y$关于$\Vx$的梯度 \\
$\displaystyle \nabla_{\MX} y $ & $y$关于$\MX$的矩阵导数 \\
$\displaystyle \nabla_{\TSX} y $ & $y$关于$\TSX$求导后的张量 \\
$\displaystyle \frac{\partial f}{\partial \Vx} $ &$f: \SetR^n \rightarrow \SetR^m$\gls{jacobian}矩阵$\MJ \in \SetR^{m\times n}$ \\
$\displaystyle \nabla_{\Vx}^2 f(\Vx)\text{ or }\MH( f)(\Vx)$ & $f$在点$\Vx$处的\gls{hessian}矩阵 \\
$\displaystyle \int f(\Vx) d\Vx $ & $\Vx$整个域上的定积分 \\
$\displaystyle \int_\SetS f(\Vx) d\Vx$ & 集合$\SetS$上关于$\Vx$的定积分 \\
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 概率和信息论}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle \RSa \bot \RSb$ & $\RSa$$\RSb$相互独立的随机变量 \\
$\displaystyle \RSa \bot \RSb \mid \RSc $ & 给定$\RSc$后条件独立 \\
$\displaystyle P(\RSa)$ & 离散变量上的概率分布 \\
$\displaystyle p(\RSa)$ & 连续变量(或变量类型未指定时)上的概率分布 \\
$\displaystyle \RSa \sim P$ & 具有分布$P$的随机变量$\RSa$\\
$\displaystyle \SetE_{\RSx\sim P} [ f(x) ]\text{ or } \SetE f(x)$ & $f(x)$关于$P(\RSx)$的期望 \\
$\displaystyle \Var(f(x)) $ & $f(x)$在分布$P(\RSx)$下的方差 \\
$\displaystyle \Cov(f(x),g(x)) $ & $f(x)$$g(x)$在分布$P(\RSx)$下的协方差 \\
$\displaystyle H(\RSx) $ & 随机变量$\RSx$\gls{Shannon_entropy} \\
$\displaystyle D_{\text{KL}} ( P \Vert Q ) $ & P和Q的\gls{KL_divergence} \\
$\displaystyle \mathcal{N} ( \Vx ; \Vmu , \VSigma)$ & 均值为$\Vmu$协方差为$\VSigma$$\Vx$上的\gls{gaussian_distribution} \\
\end{tabular}
\egroup
\end{minipage}

\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 函数}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle f: \SetA \rightarrow \SetB$ & 定义域为$\SetA$值域为$\SetB$的函数$f$ \\
$\displaystyle f \circ g $ & $f$$g$的组合 \\
$\displaystyle f(\Vx ; \Vtheta) $ & 由$\Vtheta$参数化,关于$\Vx$的函数(有时为简化表示,我们忽略$\Vtheta$记为$f(\Vx)$ )\\
$\displaystyle \log x$ & $x$的自然对数 \\
$\displaystyle \sigma(x)$ & Logistic sigmoid, $\displaystyle \frac{1} {1 + \exp(-x)}$ \\
$\displaystyle \zeta(x)$ & Softplus, $\log(1 + \exp(x))$ \\
$\displaystyle || \Vx ||_p $ & $\Vx$$L^p$范数 \\
$\displaystyle || \Vx || $ & $\Vx$$L^2$范数 \\
$\displaystyle x^+$ & $x$的正数部分, 即$\max(0,x)$\\
$\displaystyle \textbf{1}_\mathrm{condition}$ & 如果条件为真则为1,否则为0\\
\end{tabular}
\egroup
\end{minipage}

有时候我们使用函数$f$,它的参数是一个标量,但应用到一个向量、矩阵或张量: $f(\Vx)$, $f(\MX)$, or $f(\TSX)$
这表示逐元素地将$f$应用于数组。
例如,$\TSC = \sigma(\TSX)$,则对于所有合法的$i$$j$$k$$\TEC_{i,j,k} = \sigma(\TEX_{i,j,k})$


\vspace{\notationgap}
\begin{minipage}{\textwidth}
\centerline{\bf 数据集和分布}
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{cp{3.25in}}
$\displaystyle p_{\text{data}}$ & 数据生成分布 \\
$\displaystyle \hat{p}_{\text{train}}$ & 由训练集定义的经验分布 \\
$\displaystyle \SetX$ & 训练样本的集合 \\
$\displaystyle \Vx^{(i)}$ & 数据集的第$i$个样本(输入)\\
$\displaystyle y^{(i)}\text{ or }\Vy^{(i)}$ & \gls{supervised_learning}中与$\Vx^{(i)}$关联的目标 \\
$\displaystyle \MX$ & $m \times n$ 的矩阵,其中行$\MX_{i,:}$为输入样本$\Vx^{(i)}$ \\
\end{tabular}
\egroup
\end{minipage}
2 changes: 1 addition & 1 deletion terminology.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2853,7 +2853,7 @@

\newglossaryentry{hadamard_product}
{
name=哈达玛乘积,
name=Hadamard乘积,
description={Hadamard product},
sort={Hadamard product},
}
Expand Down

0 comments on commit 44658ae

Please sign in to comment.