I have a table on a two column-style page. My table goes over the page margin. I have tried using tabular, however, the headings are too close.
\begin{table}[h!]
\centering
\begin{tabularx}{\textwidth}{@{} l *{3}{C} }
\hline
{} & Average Accuracy & Average BER & Average Precision \\
\hline\hline
Best accuracy of SVM & 0.000353 & 0.0187451 & 0.021746 \\
Best accuracy of SVM 1 & 0.000439 & 0.001381 & 0.015361 \\
Best accuracy of KNN & 0.000894 & 0.013037 & 0.000438 \\
Best accuracy of KNN 1 & 0.000817 & 0.024353 & 0.0195106 \\
Best accuracy of NN & 0.009123 & 0.0254135 & 0.010304 \\
Best accuracy of NN 1 & 0.00911 & 0.036151 & 0.0147809 \\
\bottomrule
\end{tabularx}\hspace*{-25pt}
\caption{Results for the models}
\label{acc}
\end{table}
How can this be fixed?



\begin{tabularx}{\textwidth}is forcing the table to be twice as wide as the column atabularxalways has to have an X column, but you should usetabularhere nottabularx– David Carlisle Oct 21 '22 at 17:18Ccolumn type defined? Do also please tell us which document class you employ. – Mico Oct 21 '22 at 17:39