Tables – Table with Multiple Columns

tables

I want to create a table in this format, but I haven't managed to get it to work.
I dont need to have any colour, i would just like to have it shown as a plain table.

Table Layout

Best Answer

You're right about not wanting colors; however, you don't want vertical rules either. Nor it's necessary that “Data set” is lowered: the first row has the column headers, some of which have subheaders in the second row, with a horizontal rule to show the groups.

With siunitx and its S column you can get exact spacing between columns, alignment under the decimal point and automatic management of numbers (see in the eighth column).

The input is straightforward; only some care is needed for adjusting the column specifiers, which can be done when the data are in their final form.

A local setting of \tabcolsep is necessary, at least for the standard text width; if you have a different text width you may be able to omit the setting or you may need to change the size.

\documentclass[11pt]{article}
\usepackage{siunitx}
\usepackage{booktabs}

\begin{document}

\begin{tabular}{
  l 
  *{6}{S[table-format=1.4]}
  S[table-format=5]
  S[table-format=3.2]
}
\toprule
\multicolumn{1}{c}{Data Set} &
  \multicolumn{3}{c}{Balanced Error}  &
  \multicolumn{3}{c}{Area Under Curve} &
  \multicolumn{2}{c}{Features} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7}  \cmidrule(lr){8-9}
  & {Train} & {Valid} & {Test} & {Train} & {Valid} & {Test} & {\#} & {\%} \\
\midrule
arcene  & 0.5000 & 0.4886 & 0.5006 & 0.5000 & 0.5114 & 0.4994 & 10000 & 100.10 \\
gisette & 0.5000 & 0.4886 & 0.5006 & 0.5000 & 0.5114 & 0.4994 & 10000 & 100.10 \\
dexter  & 0.5000 & 0.4886 & 0.5006 & 0.5000 & 0.5114 & 0.4994 & 10000 & 100.10 \\ 
madelon & 0.5000 & 0.4886 & 0.5006 & 0.5000 & 0.5114 & 0.4994 & 10000 & 100.10 \\
\bottomrule
\end{tabular}

\end{document}

enter image description here