\documentclass[varwidth=598pt]{standalone}

\usepackage{booktabs} % professional-quality tables
\usepackage{multirow} % multi-row cells in tables
\usepackage{colortbl} % color for tables (\cellcolor, \rowcolor)
\usepackage[table]{xcolor} % enhanced colors for tables
\usepackage{array} % more flexible column formats (often used)
\usepackage{tabularx} % for tables with auto-stretch columns (if used)
\usepackage{graphicx} % for images in tables or figure/table floats
\usepackage{amssymb} % math symbols
\usepackage{amsmath} % math environments
\usepackage{soul} % highlighting (used for colored text/cells)
\usepackage[normalem]{ulem} % underlining, strikethroughs
\usepackage[T1]{fontenc} % font encoding
\usepackage[utf8]{inputenc}% input encoding (legacy, fine for pdflatex)
\usepackage{microtype} % better text appearance
\usepackage{hyperref} % hyperlinks
\usepackage{textcomp} % for extra symbols
\usepackage{enumitem} % for compact lists (if used in table notes)
\usepackage{adjustbox}
\usepackage{tabu}
\usepackage{pifont} % http://ctan.org/pkg/pifont
\usepackage{bbding} % \XSolidBrush
\usepackage{makecell}

\begingroup
\makeatletter
\renewcommand{\fnum@table}{}%
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\centering #2\par
\vskip\belowcaptionskip
}
\makeatother

\begin{document}
\begin{table}
\centering
\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{l | r | rr| rrrrr| rrr|rrrrrrrrrr | rrrrrr}
\toprule
& \multicolumn{1}{|c|}{\textbf{Random}}
& \multicolumn{2}{|c|}{\textbf{Gender}} & \multicolumn{5}{|c|}{\textbf{Ethnicity}} & \multicolumn{3}{|c}{\textbf{SOr}} & \multicolumn{10}{|c}{\textbf{Gender+Ethnicity}} & \multicolumn{6}{|c}{\textbf{Gender+SOr}} \\
& & \bf \rotatebox{90}{M} &\bf \rotatebox{90}{F} &\bf \rotatebox{90}{W} &\bf \rotatebox{90}{A-A} &\bf \rotatebox{90}{B} &\bf \rotatebox{90}{H} &\bf \rotatebox{90}{As} &\bf \rotatebox{90}{Hetero} &\bf \rotatebox{90}{Bi} &\bf \rotatebox{90}{Homo} & \bf \rotatebox{90}{M+W} &\bf \rotatebox{90}{M+A-A} &\bf \rotatebox{90}{M+B} &\bf\rotatebox{90}{M+H} &\bf \rotatebox{90}{M+As} &\bf \rotatebox{90}{F+W} &\bf\rotatebox{90}{F+A-A} &\bf \rotatebox{90}{F+B} &\bf \rotatebox{90}{F+H} &\bf \rotatebox{90}{F+As} &\bf \rotatebox{90}{M+Hetero} & \bf \rotatebox{90}{M+Bi} & \bf \rotatebox{90}{M+Homo} &\bf \rotatebox{90}{F+Hetero} & \bf \rotatebox{90}{F+Bi} &\bf \rotatebox{90}{F+Homo} \\
\midrule
Generic &2 &\textbf{17} &\textbf{16} &6 &\textbf{14} &7 &\textbf{9} &\textbf{11} &\textbf{9} &\textbf{11} &11 &\textbf{11} &\textbf{11} &\textbf{12} &\textbf{13} &\textbf{8} &\textbf{13} &\textbf{13} &\textbf{13} &\textbf{12} &\textbf{12} &8 &\textbf{10} &6 &\textbf{12} &\textbf{15} &11 \\
Biomedical &2 &6 & 6 & 6 &8 &7 &7 &7 &6 &6 &\textbf{14} &6 &7 &5 &7 &6 &8 &8 &9 &8 &8 &\textbf{9} &9 &\textbf{23} &8 &13 &\textbf{23} \\
\bottomrule
\end{tabular}
\end{adjustbox}
\caption{Table 7: Percentage of questions with changed answers between the biomedical and generic model as compared to a question with no demographic information about the patient. \textit{M}=male; \textit{F}=female; \textit{W}=White; \textit{B}=Black; \textit{A-A}=African-American; \textit{H}=Hispanic; \textit{As}=Asian; \textit{SOr}=sexual orientation. \label{answers_change_table_generic1}}
\end{table}
\end{document}