58 lines
2.9 KiB
TeX
58 lines
2.9 KiB
TeX
\documentclass[11pt]{article}
|
||
\usepackage{CJK}
|
||
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
|
||
\usepackage{algorithm}
|
||
\usepackage{algorithmicx}
|
||
\usepackage{algpseudocode}
|
||
\usepackage{amsmath}
|
||
|
||
\floatname{algorithm}{algorithm}
|
||
\renewcommand{\algorithmicrequire}{\textbf{imput:}}
|
||
\renewcommand{\algorithmicensure}{\textbf{output:}}
|
||
|
||
\begin{document}
|
||
\begin{CJK*}{UTF8}{gkai}
|
||
\begin{algorithm}
|
||
\caption{Improving Classification Model}
|
||
\begin{algorithmic}[1] %每行显示行号
|
||
\Require $model$, $issue$
|
||
\Ensure $change$ prediction or not
|
||
\Function {Improving}{$model, issue$}
|
||
\State $change \gets False$
|
||
\If {$\Delta < threshold_\Delta$}
|
||
\State $sentences \gets +$ \Call{SplitSentence}{$issue$}
|
||
\State $preds \gets +$ \Call{model.predict\_proba}{$sentences$}
|
||
\For{$pred:preds$}
|
||
\If {$\Delta_s < threshold_{\Delta_s}$}
|
||
\If {position in begin $||$ end}
|
||
\State $change \gets True$
|
||
\State $break$
|
||
\EndIf
|
||
\EndIf
|
||
\EndFor
|
||
\EndIf
|
||
\State \Return{$change$}
|
||
\EndFunction
|
||
\end{algorithmic}
|
||
\label{a:improving}
|
||
\end{algorithm}
|
||
\end{CJK*}
|
||
|
||
|
||
\begin{table}[h] %开始一个表格environment,表格的位置是h,here。因为latex会根据情况,把表格放在页面的适当的位置,设置了h选项,就不会随便乱放了
|
||
\begin{tabular}{p{3.5cm}|p{3cmp{2.5cm}}|p{5cm}} %开始一个具体的表格,设置第一列的宽度是3.5cm,第二列的宽度是2.5cm,第三列的宽度是5cm。默认情况下latex的text wrap不是很好,所以,这里我就设置了每一列的宽度,强制转换。而且,我没有使用分割单元格的竖线。如果需要的话,可以这样设置{c|c|c},这里的 c表示center,当然还可以使用l和r,意思很没白了。这样,就定义了一个3列的表格,而且有单元格分割线。对了,就是使用|来表示分割线的。
|
||
%下面就是单元格的具体内容了
|
||
Format & Extension & Description \\ %用&来分隔单元格的内容 \\表示进入下一行
|
||
\hline %画一个横线,下面的就都是一样了,这里一共有4行内容
|
||
Bitmap & .bmp & Bitmap images are recommended because they offer the most control over the exact image and colors.\\
|
||
\hline
|
||
Graphics Interchange Format (GIF) & .gif & Compressed image format used for Web pages. Animated GIFs are supported.\\
|
||
\hline
|
||
Joint Photographic Experts Group (JPEG) & .jpeg, .jpg & Compressed image format used for Web pages.\\
|
||
\hline
|
||
Portable Network Graphics (PNG) & .png & Compressed image format used for Web pages.
|
||
\end{tabular}
|
||
\caption{Art File Formats} %显示表格的标题
|
||
\end{table}
|
||
\end{document}
|