演示代码
\documentclass{article}
\usepackage{array}
\usepackage{multirow}
\newcommand\MyBox[2]{
\fbox{\lower0.75cm
\vbox to 1.7cm{\vfil
\hbox to 1.7cm{\hfil\parbox{1.4cm}{#1\\#2}\hfil}
\vfil}%
}%
}
\begin{document}
\noindent
\renewcommand\arraystretch{1.5}
\setlength\tabcolsep{0pt}
\begin{tabular}{c >{\bfseries}r @{\hspace{0.7em}}c @{\hspace{0.4em}}c @{\hspace{0.7em}}l}
\multirow{10}{*}{\parbox{1.1cm}{\bfseries\raggedleft actual\\ value}} &
& \multicolumn{2}{c}{\bfseries Prediction outcome} & \\
& & \bfseries p & \bfseries n & \bfseries total \\
& p$'$ & \MyBox{True}{Positive} & \MyBox{False}{Negative} & P$'$ \\[2.4em]
& n$'$ & \MyBox{False}{Positive} & \MyBox{True}{Negative} & N$'$ \\
& total & P & N &
\end{tabular}
\end{document}
演示效果图
发表评论 取消回复