[Tex/LaTex] How to change font size of text in a latex table

pdftextables

I would like to have font size of 9 for both caption and text in table. However, as shown below, table text is bigger. Previous answers suggest using a \resizebox{\textwidth} but that just fits the text to width of space and does not change it to a particular font size? Is there a way I can select all the text in table and set it to fontsize=small ? (Using \selectfont ?). Please download this to run code click me. Appreciate your time.

\documentclass{article}
\usepackage{ijcai17}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{adjustbox}
\usepackage{caption}

\begin{document}
\section{Test}
Test document
\begin{table}[h!]
\captionsetup{font=small}
\centering
\caption{AUC values for LR, LR-Regularized, RF-Default, RF-FS for 1s, 3s, 5s, 10s segment lengths and 2-class problems.}
\label{table:2}
\resizebox{0.47\textwidth}{!}{%
%\begin{adjustbox}{max width=\textwidth}
\begin{tabular}{c||c|c|c|c}
\toprule
 & 1s & 3s & 5s & 10s\\
\hline
LR & $0.9223$ & $0.9895$ & $0.9840$ & $0.9913$ \\ \hline
LR-Regularized & $0.9207$ & $0.9887$ & $0.9928$ & $0.9863$ \\ \hline
RF-Default & $0.9072$ & $0.9767$ & $0.9634$ & $0.9735$ \\ \hline
RF-FS & $0.9075$ & $0.9760$ & $0.9681$ & $0.9740$ \\ 
\bottomrule
\end{tabular}%
}
\end{table}
\end{document}

Best Answer

If you try this MWE, you can see that both caption and table content have same fontsize. Change Large into small to get 9pt font.

\documentclass{article}
%\usepackage{ijcai17}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{verbatim}
\usepackage{booktabs}
\usepackage{adjustbox}
\usepackage{caption}

\begin{document}
    \section{Test}
     Test document
    \begin{table}[h!]
        \Large
        \captionsetup{font=Large}
        \centering
        \caption{ AUC values for LR, LR-Regularized, RF-Default, RF-FS for 1s, 3s, 5s, 10s segment lengths and 2-class problems.}
        \label{table:2}
        %\resizebox{0.47\textwidth}{!}{%
            \begin{tabular}{c||c|c|c|c}
                \toprule
                & 1s & 3s & 5s & 10s\\
                \hline
                LR & $0.9223$ & $0.9895$ & $0.9840$ & $0.9913$ \\ \hline
                LR-Regularized & $0.9207$ & $0.9887$ & $0.9928$ & $0.9863$ \\ \hline
                RF-Default & $0.9072$ & $0.9767$ & $0.9634$ & $0.9735$ \\ \hline
                RF-FS & $0.9075$ & $0.9760$ & $0.9681$ & $0.9740$ \\ 
                \bottomrule
            \end{tabular}%
        %}
    \end{table}
\end{document}

enter image description here