Commit 861c82a6 by 单韦乔

第一章新bib和第二章文字修改

parent 129235d7
......@@ -28,18 +28,18 @@
\node [anchor=north,rotate=90,inner sep=1pt,minimum width=2em,fill=black] (pt36) at (n36.east) {\small{{\color{white} \textbf{-1.3}}}};
\node[anchor=south,unit,text=red] (w3) at ([yshift=0.5em]n34.north){$w_3$};
\draw[->,ublue,very thick] (n11.east) -- (n21.west);
\draw[->,ublue,very thick,opacity=0.5] (n11.east) -- (n21.west);
% \draw[->,ublue,very thick,dashed] (n11.east) -- (n22.west);
\draw[->,ublue,very thick] (n11.east) -- (n23.west);
\draw[->,ublue,very thick,opacity=0.5] (n11.east) -- (n23.west);
\draw[->,ublue,very thick] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick] (pt22.south) -- (n35.west);
\draw[->,ublue,very thick,opacity=0.5] (pt22.south) -- (n34.west);
\draw[->,ublue,very thick,opacity=0.5] (pt22.south) -- (n35.west);
% \draw[->,ublue,very thick,dashed] (pt22.south) -- (n36.west);
% \draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.east) -- (n22.west) -- (pt22.south) -- (n36.west) -- ([xshift=1em]pt36.south);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt]([xshift=-1em]n11.west) -- (n11.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt](n11.east) -- (n22.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt](pt22.south) -- (n36.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2pt](pt36.south) -- ([xshift=1em]pt36.south);
\draw[->,red,ultra thick,opacity=0.7,line width=2.3pt]([xshift=-1em]n11.west) -- (n11.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2.3pt](n11.east) -- (n22.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2.3pt](pt22.south) -- (n36.west);
\draw[->,red,ultra thick,opacity=0.7,line width=2.3pt](pt36.south) -- ([xshift=1em]pt36.south);
\end{tikzpicture}
\ No newline at end of file
\definecolor{ublue}{rgb}{0.152,0.250,0.545}
\begin{tikzpicture}%画图中的属性如xshift应该是通用的,前面的关键字如xlabel规定了修改的部分
\begin{tikzpicture}
\begin{axis}[
width=10cm, height=4.5cm,
symbolic x coords={未抽取词,do,want,what,am,people,look},%自定义x坐标
xtick=data,%自定义x坐标
symbolic x coords={未抽取词,do,want,what,am,people,look},
xtick=data,
ytick={0,0.05,0.1,0.15,0.2,0.25},
xlabel={低概率词汇},
ylabel={词汇概率},
legend pos=outer north east,%图标位置
legend pos=outer north east,
xlabel style={align=right,xshift=5.3cm,yshift=0.8cm,font=\footnotesize},
ylabel style={rotate=-90,yshift=2cm,xshift=1cm,font=\footnotesize},
y tick style={opacity=0},%隐藏y轴刻度线
x tick style={opacity=0},%隐藏x轴刻度线
y tick style={opacity=0},
x tick style={opacity=0},
x tick label style={anchor=base,font=\footnotesize,yshift=-0.5cm},
y tick label style={font=\footnotesize,/pgf/number format/.cd,fixed,precision=2},%y轴精度,不用科学表示
y axis line style={opacity=0},%隐藏y轴
tick align=inside,%原本的横行线
ymajorgrids,%显示横行网格线
axis x line*=bottom,%显示x轴坐标汉字(应该是对齐)
major grid style={dotted,draw=ublue},%横行线颜色
axis on top,%网格线位于顶层
legend style={anchor=north west,font=\footnotesize},%图标格式
y tick label style={font=\footnotesize,/pgf/number format/.cd,fixed,precision=2},
y axis line style={opacity=0},
tick align=inside,
ymajorgrids,
axis x line*=bottom,
major grid style={dotted,draw=ublue},
axis on top,
legend style={anchor=north west,font=\footnotesize},
ymin=0,
ymax=0.25]
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};%area legend图例显示长方形颜色
\addplot [ybar,bar shift=-2mm,bar width=4mm,fill=blue!40,draw=blue!40,area legend] coordinates{(未抽取词,0) (do,0.05) (want,0.05) (what,0.05) (am,0.1) (people,0.15) (look,0.2)};
\addplot [ybar,bar shift=2mm,bar width=4mm,fill=red!40,draw=red!40,area legend] coordinates{(未抽取词,0.03) (do,0.062) (want,0.062) (what,0.062) (am,0.09) (people,0.122) (look,0.138)};
\legend{未平滑,平滑后}%右上图例
\legend{未平滑,平滑后}
\end{axis}
\end{tikzpicture}
......
......@@ -285,7 +285,7 @@ F(x)=\int_{-\infty}^x f(x)\textrm{d}x
\subsubsection{2.KL距离}
\parinterval 如果同一个随机变量$X$上有两个概率分布$P(x)$$Q(x)$,那么可以使用KL距离(“Kullback-leibler”散度)来衡量这两个分布的不同,这种度量就是{\small\bfnew{相对熵}}\index{相对熵}(Relative Entropy)\index{Relative Entropy}。其公式如下:
\parinterval 如果同一个随机变量$X$上有两个概率分布$\funp{P}(x)$$\funp{Q}(x)$,那么可以使用KL距离(“Kullback-leibler”散度)来衡量这两个分布的不同,这种度量就是{\small\bfnew{相对熵}}\index{相对熵}(Relative Entropy)\index{Relative Entropy}。其公式如下:
\begin{eqnarray}
\funp{D}_{\textrm{KL}}(\funp{P}\parallel \funp{Q}) & = & \sum_{x \in \textrm{X}} [ \funp{P}(x)\log \frac{\funp{P}(x) }{ \funp{Q}(x) } ] \nonumber \\
& = & \sum_{x \in \textrm{X} }[ \funp{P}(x)(\log \funp{P}(x)-\log \funp{Q}(x))]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论