adelie.solver.pinball#

adelie.solver.pinball(A: ndarray | MatrixConstraintBase32 | MatrixConstraintBase64, S: ndarray, v: ndarray, penalty_neg: ndarray, penalty_pos: ndarray, *, kappa: int | None = None, max_iters: int = 100000, tol: float = 1e-07, n_threads: int = 1, warm_start=None)[source]#

Solves pinball least squares.

The pinball least squares is given by

\[\begin{align*} \mathrm{minimize}_{\beta} &\quad \frac{1}{2} \|S^{-\frac{1}{2}} v - S^{\frac{1}{2}} A^\top \beta\|_{2}^2 + \ell^\top \beta_- + u^\top \beta_+ \end{align*}\]

where \(A \in \mathbb{R}^{m \times d}\) is a constraint matrix, \(S \in \mathbb{R}^{d \times d}\) is a positive semi-definite matrix, \(v \in \mathbb{R}^d\) is the linear term, and \(\ell, u \in \mathbb{R}^m\) are the penalty factors for the negative and positive parts of \(\beta\), respectively.

Parameters:
A(m, d) Union[ndarray, MatrixConstraintBase32, MatrixConstraintBase64]

Constraint matrix \(A\). It is typically one of the matrices defined in adelie.matrix submodule.

S(d, d) ndarray

Positive semi-definite matrix \(S\).

v(n,) ndarray

Linear term \(v\).

penalty_neg(m,) ndarray

Penalty \(\ell\) on the negative part of \(\beta\).

penalty_pos(m,) ndarray

Penalty \(u\) on the positive part of \(\beta\).

kappaint, optional

Violation batching size. If None, it is set to min(m, d). Default is None.

max_itersint, optional

Maximum number of coordinate descents. Default is int(1e5).

tolfloat, optional

Coordinate descent convergence tolerance. Default is 1e-7.

n_threadsint, optional

Number of threads. Default is 1.

warm_startoptional

If no warm-start is provided, the initial solution is set to all zeros. Otherwise, the warm-start is used to extract all necessary state variables. Default is None.

Returns:
state

The resulting state after running the solver.