% --------- -mathematical operators ----------
\newcommand{\cholesky}[1]{\mathrm{Chol}(#1)}
\newcommand\invhalf[1]{#1\raisebox{1.15ex}{$\scriptscriptstyle-\!1/2$}}
\DeclareMathOperator*{\argmax}{\arg\max}
\DeclareMathOperator*{\argmin}{\arg\min}
%\newcommand{\argmin}{\mbox{argmin}}
%\newcommand{\argmax}{\mbox{argmax}}
\renewcommand{\d}{\textrm{d}} % integral
\newcommand{\der}[2]{\frac{\d #1}{\d #2}} % derivarive
\newcommand{\for}{\mathrm{for}} 
\newcommand{\deter}[1]{\left|#1\right|} % determinant
\newcommand{\E}{\mathbb{E}} % expectation
\newcommand{\g}{\,|\,} % given
\newcommand{\gsep}{\,\|\,} % for ||
\newcommand{\gcolon}{\,;\,} % for x;z
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\p}{\textrm{Pr}} % probability
\newcommand{\parialder}[2]{\frac{\partial #1}{\partial #2}} % partial derivative
\newcommand{\ent}{\mathbb{H}} % real line
\newcommand{\reals}{\mathbb{R}} % real line
\newcommand{\naturals}{\mathbb{N}} % real line
\newcommand{\unit}{{\mathcal{U}}} % unit interval
%\newcommand{\inv}{{-1}} % inverse
\newcommand\inv[1]{#1\raisebox{1.15ex}{$\scriptscriptstyle-\!1$}}
\newcommand{\transpose}[1]{#1^\intercal}
\newcommand{\diag}{\mathrm{diag}} 
\newcommand{\I}{\mathbb{I}}
\newcommand{\st}{\mbox{ such that }}
\newcommand{\rank}{\mathrm{rank}}
\newcommand{\sym}{\mathrm{sym}}
\newcommand{\distas}{\quad\sim\quad}
\newcommand{\fora}{\quad\forall\;}
\newcommand{\bfvec}{\mathrm{vec}}
\newcommand{\lo}{\mathrm{lo}}
\newcommand{\up}{\mathrm{up}}
% ---------- other ----------

\renewcommand{\SS}[1]{\textcolor{black}{#1}}
\renewcommand{\stop}{{\footnotesize \top}}
\newcommand{\fix}{\marginpar{FIX}}
\newcommand{\MMD}{\ensuremath{\textrm{MMD}}}
\newcommand{\GP}{\ensuremath{\textrm{GP}}}
\newcommand{\obs}{{\textrm{obs}}}
\newcommand{\tr}{{\textrm{tr}}}
\newcommand{\KL}{{\textrm{KL}}}
\newcommand{\rep}{{\textrm{rep}}}
\newcommand{\data}{{\mathcal{d}}}
\newcommand{\mis}{{\mathrm{miss}}}
\newcommand{\cen}{{\mathrm{cen}}}

% ---------- boldfonts ----------

\newcommand{\bfzero}{\mathbf{0}}
\newcommand{\bfone}{\mathbf{1}}

\newcommand{\bfalpha}{{\boldsymbol{\alpha}}}
\newcommand{\bfbeta}{{\boldsymbol{\beta}}}
\newcommand{\bfgamma}{{\boldsymbol{\gamma}}}
\newcommand{\bfdelta}{{\boldsymbol{\delta}}}
\newcommand{\bfepsilon}{{\boldsymbol{\epsilon}}}
\newcommand{\bfzeta}{{\boldsymbol{\zeta}}}
\newcommand{\bfeta}{{\boldsymbol{\eta}}}
\newcommand{\bftheta}{{\boldsymbol{\theta}}}
\newcommand{\bfvartheta}{{\boldsymbol{\vartheta}}}
\newcommand{\bfiota}{{\boldsymbol{\iota}}}
\newcommand{\bfkappa}{{\boldsymbol{\kappa}}}
\newcommand{\bflambda}{{\boldsymbol{\lambda}}}
\newcommand{\bfmu}{{\boldsymbol{\mu}}}
\newcommand{\bfnu}{{\boldsymbol{\nu}}}
\newcommand{\bfxi}{{\boldsymbol{\xi}}}
\newcommand{\bfpi}{{\boldsymbol{\pi}}}
\newcommand{\bfrho}{{\boldsymbol{\rho}}}
\newcommand{\bfvarrho}{{\boldsymbol{\varrho}}}
\newcommand{\bfsigma}{{\boldsymbol{\sigma}}}
\newcommand{\bftau}{{\boldsymbol{\tau}}}
\newcommand{\bfupsilon}{{\boldsymbol{\upsilon}}}
\newcommand{\bfphi}{{\boldsymbol{\phi}}}
\newcommand{\bfvarphi}{{\boldsymbol{\varphi}}}
\newcommand{\bfchi}{{\boldsymbol{\chi}}}
\newcommand{\bfpsi}{{\boldsymbol{\psi}}}
\newcommand{\bfomega}{{\boldsymbol{\omega}}}

\newcommand{\bfGamma}{\boldsymbol{\Gamma}}
\newcommand{\bfDelta}{\boldsymbol{\Delta}}
\newcommand{\bfTheta}{\boldsymbol{\Theta}}
\newcommand{\bfLambda}{\boldsymbol{\Lambda}}
\newcommand{\bfXi}{\boldsymbol{\Xi}}
\newcommand{\bfPi}{\boldsymbol{\Pi}}
\newcommand{\bfSigma}{\boldsymbol{\Sigma}}
\newcommand{\bfUpsilon}{\boldsymbol{\Upsilon}}
\newcommand{\bfPhi}{\boldsymbol{\Phi}}
\newcommand{\bfPsi}{\boldsymbol{\Psi}}
\newcommand{\bfOmega}{\boldsymbol{\Omega}}

\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfc}{\mathbf{c}}
\newcommand{\bfd}{\mathbf{d}}
\newcommand{\bfe}{\mathbf{e}}
\newcommand{\bff}{\mathbf{f}}
\newcommand{\bfg}{\mathbf{g}}
\newcommand{\bfh}{\mathbf{h}}
\newcommand{\bfi}{\mathbf{i}}
\newcommand{\bfj}{\mathbf{j}}
\newcommand{\bfk}{\mathbf{k}}
\newcommand{\bfl}{\mathbf{l}}
\newcommand{\bfm}{\mathbf{m}}
\newcommand{\bfn}{\mathbf{n}}
\newcommand{\bfo}{\mathbf{o}}
\newcommand{\bfp}{\mathbf{p}}
\newcommand{\bfq}{\mathbf{q}}
\newcommand{\bfr}{\mathbf{r}}
\newcommand{\bfs}{\mathbf{s}}
\newcommand{\bft}{\mathbf{t}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfw}{\mathbf{w}}
\newcommand{\bfx}{\mathbf{x}}
\newcommand{\bfy}{\mathbf{y}}
\newcommand{\bfz}{\mathbf{z}}

\newcommand{\bfA}{\mathbf{A}}
\newcommand{\bfB}{\mathbf{B}}
\newcommand{\bfC}{\mathbf{C}}
\newcommand{\bfD}{\mathbf{D}}
\newcommand{\bfE}{\mathbf{E}}
\newcommand{\bfF}{\mathbf{F}}
\newcommand{\bfG}{\mathbf{G}}
\newcommand{\bfH}{\mathbf{H}}
\newcommand{\bfI}{\mathbf{I}}
\newcommand{\bfJ}{\mathbf{J}}
\newcommand{\bfK}{\mathbf{K}}
\newcommand{\bfL}{\mathbf{L}}
\newcommand{\bfM}{\mathbf{M}}
\newcommand{\bfN}{\mathbf{N}}
\newcommand{\bfO}{\mathbf{O}}
\newcommand{\bfP}{\mathbf{P}}
\newcommand{\bfQ}{\mathbf{Q}}
\newcommand{\bfR}{\mathbf{R}}
\newcommand{\bfS}{\mathbf{S}}
\newcommand{\bfT}{\mathbf{T}}
\newcommand{\bfU}{\mathbf{U}}
\newcommand{\bfV}{\mathbf{V}}
\newcommand{\bfW}{\mathbf{W}}
\newcommand{\bfX}{\mathbf{X}}
\newcommand{\bfY}{\mathbf{Y}}
\newcommand{\bfZ}{\mathbf{Z}}

\newcommand{\calA}{\mathcal{A}}
\newcommand{\calB}{\mathcal{B}}
\newcommand{\calD}{\mathcal{D}}
\newcommand{\calF}{\mathcal{F}}
\newcommand{\calG}{\mathcal{G}}
\newcommand{\calH}{\mathcal{H}}
\newcommand{\calI}{\mathcal{I}}
\newcommand{\calL}{\mathcal{L}}
\newcommand{\calM}{\mathcal{M}}
\newcommand{\calP}{\mathcal{P}}
\newcommand{\calS}{\mathcal{S}}
\newcommand{\calV}{\mathcal{V}}
\newcommand{\calX}{\mathcal{X}}
\newcommand{\calY}{\mathcal{Y}}
\newcommand{\calZ}{\mathcal{Z}}

\newcommand{\hatbfS}{\hat{\bfS}}
\newcommand{\hatbfM}{\hat{\bfM}}

\newcommand{\hatmu}{\hat{\mu}}
\newcommand{\hatsigma}{\hat{\sigma}}

% ---------- Distributions ----------
\newcommand{\DirichletProcess}{\textrm{DP}}
\newcommand{\bernoulli}{\textrm{Bern}}
\newcommand{\betarand}{\mathrm{Beta}}
\newcommand{\binomial}{\mathrm{Bino}}
\newcommand{\multinomial}{\mathrm{Mult}}
\newcommand{\categorical}{\mathrm{Cat}}
\newcommand{\Dirichlet}{\mathrm{Dir}}
\newcommand{\doubleexp}{\mathrm{Laplace}}
\newcommand{\exponential}{\mathrm{Exp}}
\newcommand{\gammarand}{\mathrm{Gamma}}
\newcommand{\normal}{\mathcal{N}}
\newcommand{\logitnormal}{\mathcal{LN}}
\newcommand{\logistic}{\mathrm{logistic}}
\newcommand{\logit}{\mathrm{logit}}
\newcommand{\poisson}{\mathrm{Poiss}}
\newcommand{\uniform}{\mathcal{U}}
\newcommand{\expfam}{\mathrm{ExpFam}}
\newcommand{\expfamc}{\mathrm{ExpFamConj}}
\newcommand{\matnormal}{\mathcal{MN}}

% proof
\newtheorem{theorem}{Theorem}[section]

%% generic model
\newcommand{\MMM}{\textsc{MMM}}
\newcommand{\bfthetadot}{\bftheta^{(f)}}
\newcommand{\Gdot}{G^{(f)}}
\newcommand{\truncbig}{\ell}
\newcommand{\truncsml}{l}

%% specific to BNPMF-NLG
%\newcommand{\NLG}{\textsc{NPBMF-NLG}}
\newcommand{\NLG}{\textsc{NLG}}
\newcommand{\mua}{\mu^{(a)}}
\newcommand{\taua}{\tau^{(a)}}
\newcommand{\mubeta}{\bfmu^{(\bfbeta)}}
\newcommand{\taubeta}{\tau^{(\bfbeta)}}
\newcommand{\Lambdabeta}{\bfLambda}
\newcommand{\lambdatau}{\lambda^{(\tau)}}
\newcommand{\bflambdatau}{\bflambda^{(\tau)}}

\newcommand{\pia}{\pi^{(a)}}
\newcommand{\pibeta}{\pi^{(\bfbeta)}}
\newcommand{\pitau}{\pi^{(\tau)}}
\newcommand{\bfpia}{\bfpi^{(a)}}
\newcommand{\bfpibeta}{\bfpi^{(\bfbeta)}}
\newcommand{\bfpitau}{\bfpi^{(\tau)}}
\newcommand{\pidot}{\pi^{(f)}}
\newcommand{\bfpidot}{\bfpi^{(f)}}
\newcommand{\bfva}{\bfv^{(a)}}
\newcommand{\va}{v^{(a)}}
\newcommand{\bfvbeta}{\bfv^{(\bfbeta)}}
\newcommand{\vbeta}{v^{(\bfbeta)}}
\newcommand{\bfvtau}{\bfv^{(\tau)}}
\newcommand{\vtau}{v^{(\tau)}}
\newcommand{\vdot}{v^{(f)}}
\newcommand{\bfvdot}{\bfv^{(f)}}
\newcommand{\alphaa}{\alpha^{(a)}}
\newcommand{\bfalphaa}{\bfalpha^{(a)}}
\newcommand{\alphabeta}{\alpha^{(\bfbeta)}}
\newcommand{\bfalphabeta}{\bfalpha^{(\bfbeta)}}
\newcommand{\alphatau}{\alpha^{(\tau)}}
\newcommand{\bfalphatau}{\bfalpha^{(\tau)}}
\newcommand{\alphadot}{\alpha^{(f)}}
\newcommand{\bfalphadot}{\bfalpha^{(f)}}
\newcommand{\sa}{s^{(a)}}
\newcommand{\sbeta}{s^{(\bfbeta)}}
\newcommand{\stau}{s^{(\tau)}}
\newcommand{\sdot}{s^{(f)}}
\newcommand{\bfsa}{\bfs^{(a)}}
\newcommand{\bfsbeta}{\bfs^{(\bfbeta)}}
\newcommand{\bfstau}{\bfs^{(\tau)}}
\newcommand{\bfsdot}{\bfs^{(f)}}

\newcommand{\za}{z^{(a)}}
\newcommand{\zbeta}{z^{(\bfbeta)}}
\newcommand{\ztau}{z^{(\tau)}}
\newcommand{\zdot}{z^{(f)}}
\newcommand{\Sa}{S^{(a)}}
\newcommand{\Sbeta}{S^{(\bfbeta)}}
\newcommand{\Stau}{S^{(\tau)}}
\newcommand{\Sdot}{S^{(f)}}

\newcommand{\ka}{k_a}
\newcommand{\kbeta}{k_\bfbeta}
\newcommand{\ktau}{k_\tau}

%% specific to BNPMF-VAR
%\newcommand{\VAR}{\textsc{NPBMF-VAR}}
\newcommand{\VAR}{\textsc{VAR}}
\newcommand{\Beta}{\bfB}

\newcommand{\muBeta}{\bfM^{(\Beta)}}
\newcommand{\rtauBeta}{\bfU^{(\Beta)}}
\newcommand{\ctauBeta}{\bfV^{(\Beta)}}
\newcommand{\tauBeta}{\tau^{(\Beta)}}
\newcommand{\bftauBeta}{\bftau^{(\Beta)}}
\newcommand{\piBeta}{\pi^{(\Beta)}}
\newcommand{\bfpiBeta}{\bfpi^{(\Beta)}}
\newcommand{\bfvBeta}{\bfv^{(\Beta)}}
\newcommand{\vBeta}{v^{(\Beta)}}
\newcommand{\alphaBeta}{\alpha^{(\Beta)}}
\newcommand{\bfalphaBeta}{\bfalpha^{(\Beta)}}
\newcommand{\sBeta}{s^{(\Beta)}}
\newcommand{\bfsBeta}{\bfs^{(\Beta)}}
\newcommand{\zBeta}{z^{(\Beta)}}
\newcommand{\SBeta}{S^{(\Beta)}}
\newcommand{\kBeta}{k_\Beta}

\newcommand{\bfmua}{\bfmu^{(a)}}
\newcommand{\Taua}{\Lambda^{(a)}}
\newcommand{\TauBeta}{\Lambda^{(\Beta)}}


