\makeatletter
\DeclareFontFamily{U}{tipa}{}
\DeclareFontShape{U}{tipa}{m}{n}{<->tipa10}{}
\newcommand{\arc@char}{{\usefont{U}{tipa}{m}{n}\symbol{62}}}%

\newcommand{\arc}[1]{\mathpalette\arc@arc{#1}}

\newcommand{\arc@arc}[2]{%
  \sbox0{$\m@th#1#2$}%
  \vbox{
    \hbox{\resizebox{\wd0}{\height}{\arc@char}}
    \nointerlineskip
    \box0
  }%
}
\makeatother
\newtheorem{mytheorem}{Theorem}
\newtheorem{mylemma}{Lemma}
\newcommand{\argmax}{\mathop{\rm argmax}\limits}
\newcommand{\argmin}{\mathop{\rm argmin}\limits}
\newcommand{\TpPsi}{{T_{p(\boldx;\boldtheta)}\boldpsi(\boldx)}}
\newcommand{\phatp}{\hat{p}(X_p)}
\newcommand{\arcrocstar}{\arc{\mathrm{ROC}}(t^*)}

%Highlight
%\newcommand{\hilight}[1]{\colorbox{yellow}{#1}}
%Disable Highlight
\newcommand{\hilight}[1]{{#1}}
\newcommand{\highlight}[2][yellow]{\mathchoice%
  {\colorbox{#1}{$\displaystyle#2$}}%
  {\colorbox{#1}{$\textstyle#2$}}%
  {\colorbox{#1}{$\scriptstyle#2$}}%
  {\colorbox{#1}{$\scriptscriptstyle#2$}}}%
\newcommand{\infHessLL}{\lambda_{\min}\left[\nabla_\bolddelta^2\ell(\bolddelta)\right]}
\newcommand{\hessianLLstar}{\nabla_\bolddelta^2 \ell(\bolddelta^*)}
\newcommand{\hessianLL}{\nabla_\bolddelta^2 \ell(\bolddelta)}
% \newcommand{\unorm}[1]{\|#1\|}
% \newcommand{\unorms}[1]{\unorm{#1}^2}
\newcommand{\calX}{{\mathcal{X}}}
\newcommand{\calY}{{\mathcal{Y}}}
\newcommand{\boldtheta}{{\boldsymbol{\theta}}}
\newcommand{\bolddelta}{{\boldsymbol{\delta}}}
% \newcommand{\boldthetaP}{{\boldsymbol{\theta}}_{p}}
% \newcommand{\boldthetaQ}{{\boldsymbol{\theta}}_{q}}
\newcommand{\boldthetaP}{{\boldsymbol{\theta}}^{(p)}}
\newcommand{\boldthetaQ}{{\boldsymbol{\theta}}^{(q)}}
\newcommand{\boldthetaPtop}{{\boldsymbol{\theta}}^{(p)\top}}
\newcommand{\factorp}{{\phi}^P}
\newcommand{\factorq}{{\phi}^Q}
\newcommand{\boldalpha}{{\boldsymbol{\alpha}}}
\newcommand{\boldHh}{{\widehat{\boldH}}}
\newcommand{\boldeta}{{\boldsymbol{\eta}}}
\newcommand{\bolda}{{\boldsymbol{a}}}
\newcommand{\boldH}{{\boldsymbol{H}}}
\newcommand{\boldA}{{\boldsymbol{A}}}
\newcommand{\boldB}{{\boldsymbol{B}}}
\newcommand{\boldC}{{\boldsymbol{C}}}
\newcommand{\boldS}{{\boldsymbol{S}}}
\newcommand{\boldK}{{\boldsymbol{K}}}
\newcommand{\boldmu}{{\boldsymbol{\mu}}}
\newcommand{\boldJ}{{\boldsymbol{J}}}
\newcommand{\boldT}{{\boldsymbol{T}}}
\newcommand{\boldTheta}{{\boldsymbol{\Theta}}}
\newcommand{\boldf}{{\boldsymbol{f}}}
\newcommand{\boldepsilon}{{\boldsymbol{\epsilon}}}
\newcommand{\boldl}{{\boldsymbol{l}}}
\newcommand{\boldu}{{\boldsymbol{u}}}
\newcommand{\boldm}{{\boldsymbol{m}}}
\newcommand{\bolds}{{\boldsymbol{s}}}
\newcommand{\boldGamma}{{\boldsymbol{\Gamma}}}
%\newcommand{\boldeta}{{\boldsymbol{\eta}}}
\newcommand{\boldone}{{\boldsymbol{1}}}
\newcommand{\boldxi}{{\boldsymbol{\xi}}}
\newcommand{\boldSigma}{{\boldsymbol{\Sigma}}}
\newcommand{\boldv}{{\boldsymbol{v}}}
\newcommand{\boldM}{{\boldsymbol{M}}}
\newcommand{\boldk}{{\boldsymbol{k}}}
\newcommand{\boldb}{{\boldsymbol{b}}}
\newcommand{\boldbeta}{{\boldsymbol{\beta}}}
\newcommand{\boldDelta}{{\boldsymbol{\Delta}}}
\newcommand{\nnu}{\nsample}
\newcommand{\nsample}{n}
\newcommand{\subsetr}{\boldsymbol{r}}
\newcommand{\boldthetah}{{\widehat{\boldtheta}}}
\newcommand{\mathbbR}{\mathbb{R}}
\newcommand{\KL}{\mathrm{KL}}
\newcommand{\numparams}{n}
\newcommand{\boldhh}{{\widehat{\boldh}}}
\newcommand{\boldh}{{\boldsymbol{h}}}
\newcommand{\Hh}{{\widehat{H}}}
\newcommand{\boldxnu}{\boldY}
\newcommand{\boldPhi}{{\boldsymbol{\Phi}}}
\newcommand{\boldx}{{\boldsymbol{x}}}
\newcommand{\bolde}{\boldsymbol{e}}
\newcommand{\boldxp}{{\boldsymbol{x}}_{p}}
\newcommand{\boldxq}{{\boldsymbol{x}}_{q}}
\newcommand{\boldz}{{\boldsymbol{z}}}
\newcommand{\boldg}{{\boldsymbol{g}}}
\newcommand{\boldV}{{\boldsymbol{V}}}
\newcommand{\boldw}{{\boldsymbol{w}}}
\newcommand{\boldr}{{\boldsymbol{r}}}
\newcommand{\boldQ}{{\boldsymbol{Q}}}
\newcommand{\boldF}{{\boldsymbol{F}}}
\newcommand{\boldphi}{{\boldsymbol{\phi}}}
\newcommand{\boldzero}{{\boldsymbol{0}}}
\newcommand{\thetahat}{{\hat{\boldsymbol{\theta}}}}
\newcommand{\thetaShat}{{\hat{\boldsymbol{\theta}}_S}}
\newcommand{\thetaSchat}{{\hat{\boldsymbol{\theta}}_{S^c}}}
\newcommand{\zhat}{{\hat{\boldsymbol{z}}}}
\newcommand{\zSchat}{{\hat{\boldsymbol{z}}_{S^c}}}
\newcommand{\zShat}{{\hat{\boldsymbol{z}}_{S}}}
\newcommand{\nde}{\nsample'}
\newcommand{\boldxde}{\boldY'}
\newcommand{\boldX}{{\boldsymbol{X}}}
\newcommand{\boldY}{{\boldsymbol{Y}}}
\newcommand{\boldy}{{\boldsymbol{y}}}
\newcommand{\boldt}{{\boldsymbol{t}}}
\newcommand{\boldYnu}{{\boldsymbol{Y}}}
\newcommand{\boldYde}{{\boldsymbol{Y}}}
\newcommand{\boldpsi}{{\boldsymbol{\psi}}}
\newcommand{\hh}{{\widehat{h}}}
\newcommand{\boldI}{{\boldsymbol{I}}}
\newcommand{\boldR}{{\boldsymbol{R}}}
\newcommand{\PE}{{\widehat{PE}}}
\newcommand{\ratioh}{\widehat{\ratiosymbol}}
\newcommand{\ratiosymbol}{r}
\newcommand{\ratiomodel}{g}
\newcommand{\thetah}{{\widehat{\theta}}}
\newcommand{\mathbbE}{\mathbb{E}}
\newcommand{\pnu}{p_\mathrm{te}}
\newcommand{\pde}{p_\mathrm{rf}}
\newcommand{\refsection}{\boldS_\mathrm{rf}}
\newcommand{\tesection}{\boldS_\mathrm{te}}
\newcommand{\refY}{\boldY_\mathrm{rf}}
\newcommand{\teY}{\boldY_\mathrm{te}}
\newcommand{\nseg}{n}
\newcommand{\distP}{P}
\newcommand{\distQ}{Q}
\newcommand{\iid}{\stackrel{\mathrm{i.i.d.}}{\sim}}
\newcommand{\dx}{\mathrm{d}\boldx}
\newcommand{\dy}{\mathrm{d}\boldy}

\newcommand{\gxeta}{g(\boldx;\boldeta)}
\newcommand{\Zeta}{Z(\boldeta)}
\newcommand{\Zetahat}{\hat{Z}(\boldeta)}
\newcommand{\FPR}{\mathrm{FPR}}
\newcommand{\TPR}{\mathrm{TPR}}
% \newcommand{\normDtwo}{\|\nabla_{\boldtheta}^2 \ell(\boldtheta)\|}
% \newcommand{\DtwoLSE}{\nabla_{\boldg}^2 \mathrm{LSE}\left(g_1, g_2, \cdots, g_{n_q}\right)}

\def\ratio{r}
\def\relratio{{\ratio}_{\alpha}}

\def\ci{\perp\!\!\!\perp} % from Wikipedia
\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}} % symbols-a4, p.106
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}} 
\newcommand*\xor{\mathbin{\oplus}}

\newcommand{\vertiii}[1]{{\left\vert\kern-0.25ex\left\vert\kern-0.25ex\left\vert #1 
    \right\vert\kern-0.25ex\right\vert\kern-0.25ex\right\vert}}