我想将其放在包含这些行和标题的两列文章的表格中,但它应该是列宽,并且应该在底部有一个标题。
\begin{quote}
\begin{enumerate}
\item Let $M_0$ denote the \textit{null} model, which contains no predictors.
\item For $k=0$, ..., $p-1$:
\begin{enumerate}
\item Consider all $p-k$ models that augment the predictors in $M_k$ with one additional predictor.
\item Choose the \textit{best} among these $p-k$ models and call it $M_{k+1}$. Here \textit{best} is defined as having the smallest RSS or highest $R^2$.
\end{enumerate}
\item Select a single best model from among $M_0$, ... $M_p$ using cross validated prediction error, $C_p$ (AIC), BIC, or adjusted $R^2$.
\end{enumerate}
\end{quote}
答案1
为什么不把它设置为一个算法,由algorithm2e
包裹:
\documentclass[twocolumn]{article}
\usepackage{lipsum,amsmath,enumitem}
\usepackage[linesnumbered,ruled,noend]{algorithm2e}
\DontPrintSemicolon
\makeatletter
%\def\@algocf@pre@ruled{\hrule height\algoheightrule depth0pt\kern\interspacetitleruled}%
\def\@algocf@post@ruled{\kern\interspacealgoruled\hrule height\algoheightrule\relax\kern\interspacetitleruled}%
\def\@algocf@capt@ruled{under}%
\makeatother
\begin{document}
\lipsum[1]% Some dummy text
\noindent
\begingroup
\makeatletter
\@twocolumnfalse
\begin{algorithm}[H]
\caption{Forward stepwise selection}
Let $M_0$ denote the \textit{null} model, which contains no predictors. \;
\For{$k = 0, \dots, p-1$}{
Consider all $p - k$ models that augment the predictors in $M_k$ with one additional predictor. \;
Choose the \textit{best} among these $p - k$ models and call it $M_{k+1}$. Here \textit{best} is defined as having the smallest RSS or highest $R^2$\!. \;
}
Select a single best model from among $M_0, \dots, M_p$ using cross validated prediction error, $C_p$ (AIC), BIC, or adjusted $R^2$\!. \;
\end{algorithm}
\endgroup
\lipsum[2-5]% Some dummy text
\end{document}
这看起来与要求的略有不同,但受益于使用传统的算法语法,因此易于阅读。