我的下身怎麼了?

我的下身怎麼了?
\hat{y} = \hat{f}(x) = \overset{C}{argmax}\underset{c=1}\> p(y = c|x, D)

產生這個:

在此輸入影像描述

我怎樣才能使用\undersetc=1下面argmax

答案1

我建議不要使用\undersetand\overset而是聲明argmax為運算符。這樣,argmax排版也正確了。

在此輸入影像描述

\documentclass{article}
\usepackage{amsmath}

\DeclareMathOperator*{\argmax}{argmax}

\begin{document}
\[
\hat{y} = \hat{f}(x) = \argmax_{c=1}^{C}\> p(y = c|x, D)
\]
\end{document}

答案2

只需將\underset部分放入 的參數中即可\overset

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\[
\hat{y} = \hat{f}(x) = \overset{C}{\underset{c=1}{argmax}}\> p(y = c|x, D)
\]

\end{document}

編輯:另外,argmax 排版不正確,它是一個運算符,不應該用傾斜的字母呈現。

相關內容