I have the following table:
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}
\centering
\footnotesize
\begin{tabular}{lllll}
\toprule
Algorithm & Learner Memory & Production & Interpretation & Hyperparameters\\
\midrule
KNN & Samples (S) & KNN-based & KNN-based & $k$\\
\multirow{2}{*}{PE} & Prototypes (P) & Discriminative & Nearest & $\alpha$\\
& & Descriptive & & \\
\multirow{2}{*}{AP} & P + S & Discriminative & Nearest & / \\
& & Descriptive & & \\
\multirow{2}{*}{CWP} & P + Counts & Discriminative & Nearest & $\alpha$\\
& & Descriptive & & \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
As you can see, I use multirow
to have two entries in the third column. However, I don't like how the output looks. While the entries in the first column (Algorithm
) are centered vertically, the other columns where there is only 1 entry (Learner Memory
, Interpretation
and Hyperparameters
) are aligned at the top, because of the multirow. How can I center these entries as well?