我有一张表格,其中报告了使用 3 种不同方法和 3 种不同分类器观察到的最佳准确率。为了使表格更小,我将 3 个分类器的最佳准确率呈现如下:
\begin{table}[]
\caption{Accuracy for each features set as reported from the best classifier} %added
\label{Results} %added
\begin{center} %added
\begin{tabular}{llccc}
\hline
\textbf{No.} & \textbf{Features Set} & \textbf{Raw} & \textbf{PCA} & \textbf{mRMR} \\ \hline
1 & Example1& 0.90 & 0.91 & 0.92 \\
2 & Example2 & 0.80 & 0.81 & 0.82 \\ \hline
\end{tabular}
\end{center}
\end{table}
我想在每个准确度上添加一个脚注,指出报告特定结果的分类器,例如 KNN 为 1、SVM 为 2、RF 为 3,如下所示:0.90$^{1}$。有什么建议可以告诉我如何做到这一点吗?
答案1
和tabularray
:
\documentclass{book}
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\SetTblrStyle{head}{font=\small}
\SetTblrStyle{caption-tag}{font=\bfseries}
\SetTblrStyle{foot}{font=\footnotesize}
\begin{document}
\begin{table}[ht]
\centering
\begin{talltblr}[
caption = {Accuracy for each features set as reported from the best classifier},
label = {Results},
note{1} = {text for the first table note},
note{2} = {text for the second table note},
]{colspec= {ll*{3}{S[table-format=1.2{1}]}},
row{1} = {font=\bfseries}
}
\toprule
No. & Features Set & {{{Raw}}} & {{{PCA}}} & {{{mRMR}}} \\
\midrule
1 & Example1\TblrNote{1}
& 0.90\TblrNote{2}
& 0.91 & 0.92 \\
2 & Example 2 & 0.80 & 0.81 & 0.82 \\
\bottomrule
\end{talltblr}
\end{table}
\end{document}
答案2
欢迎来到 TeX.SE....希望以下内容MWE
能满足您的期望:
\documentclass{book}
\usepackage{threeparttable,booktabs}
\begin{document}
\begin{table}[]
\centering\begin{threeparttable}
\caption{Accuracy for each features set as reported from the best classifier} %added
\label{Results} %added
\begin{tabular}{llccc}
\toprule
\textbf{No.} & \textbf{Features Set} & \textbf{Raw} & \textbf{PCA} &
\textbf{mRMR} \\
\midrule
1 & Example1\tnote{1}& 0.90\tnote{2} & 0.91 & 0.92 \\
2 & Example2 & 0.80 & 0.81 & 0.82 \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item[1]...text for first table note
\item[2]...text for second table note
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}