I tried using the following code, with an unexpected outcome shown below (I've also attached the outcome I am expecting):
\documentclass{article}
\usepackage{siunitx}
\usepackage{array,booktabs}
\begin{document}
\begin{table}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lSS@{}} \\\toprule
&{\textit{Score}}\\\midrule
\textbf{class 1} & 0 \\
\midrule
&\multicolumn{2}{cc}{\textbf{Model A}\textbf{Model B}}\\
\midrule
\textbf{class A} 0 & 0\\
\textbf{class B} 0 & 0\\
\textbf{class C} 0 & 0\\
\textbf{class D} 0 & 0\\
\midrule
\textbf{class X} 0 & 0\\
\textbf{class Y} 0 & 0\\
\textbf{class Z} 0 & 0\\
\bottomrule
\end{tabular*}
\caption{caption here}
\label{table:results}
\end{table}
\end{document}
This has three major issues shown below: (1) the alignment of "Score" should be centered, (2) Model A Model B are repeating, and (3) the 0 values are shifted towards the left
I am trying to get an output which looks like:





\begin{tabular}{@{}lSS@{}}be sufficient? – leandriis Feb 21 '21 at 20:14