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

minimizeβ12S12vS12Aβ22+β+uβ+

where ARm×d is a constraint matrix, SRd×d is a positive semi-definite matrix, vRd is the linear term, and ,uRm are the penalty factors for the negative and positive parts of β, 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 on the negative part of β.

penalty_pos(m,) ndarray

Penalty u on the positive part of β.

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.