Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mtbookv2
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
NiuTrans
mtbookv2
Commits
861c82a6
Commit
861c82a6
authored
Aug 18, 2020
by
单韦乔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
第一章新bib和第二章文字修改
parent
129235d7
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
25 行删除
+26
-25
Chapter2/Figures/figure-example-of-greedy-search.tex
+9
-8
Chapter2/Figures/figure-no-smoothing&smoothed-probability-distributions.tex
+16
-16
Chapter2/chapter2.tex
+1
-1
bibliography.bib
+0
-0
没有找到文件。
Chapter2/Figures/figure-example-of-greedy-search.tex
查看文件 @
861c82a6
...
...
@@ -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
.3
pt]
([xshift=-1em]n11.west) -- (n11.west);
\draw
[->,red,ultra thick,opacity=0.7,line width=2
.3
pt]
(n11.east) -- (n22.west);
\draw
[->,red,ultra thick,opacity=0.7,line width=2
.3
pt]
(pt22.south) -- (n36.west);
\draw
[->,red,ultra thick,opacity=0.7,line width=2
.3
pt]
(pt36.south) -- ([xshift=1em]pt36.south);
\end{tikzpicture}
\ No newline at end of file
Chapter2/Figures/figure-no-smoothing&smoothed-probability-distributions.tex
查看文件 @
861c82a6
\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}
...
...
Chapter2/chapter2.tex
查看文件 @
861c82a6
...
...
@@ -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))]
...
...
bibliography.bib
查看文件 @
861c82a6
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论