adelie.bcd.objective#
- adelie.bcd.objective(beta: ndarray, *, quad: ndarray, linear: ndarray, l1: float, l2: float)[source]#
Computes the BCD objective.
The BCD objective is given by
\[\begin{align*} \frac{1}{2} \beta^\top \Sigma \beta - v^\top \beta + \lambda_1 \|\beta\|_2 + \frac{\lambda_2}{2} \|\beta\|_2^2 \end{align*}\]where \(\beta \in \mathbb{R}^p\), \(\Sigma \in \mathbb{R}_+^{p\times p}\) diagonal, \(v \in \mathbb{R}^p\), and \(\lambda_i \geq 0\).
- Parameters:
- beta(p,) ndarray
The value \(\beta\) at which the objective is computed.
- quad(p,) ndarray
The quadratic component \(\Sigma\).
- linear(p,) ndarray
The linear component \(v\).
- l1float
The \(\ell_1\) component \(\lambda_1\).
- l2float
The \(\ell_2\) component \(\lambda_2\).
- Returns:
- objfloat
The BCD objective.