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
where
is a constraint matrix, is a positive semi-definite matrix, is the linear term, and are the penalty factors for the negative and positive parts of , respectively.- Parameters:
- A(m, d) Union[ndarray, MatrixConstraintBase32, MatrixConstraintBase64]
Constraint matrix
. It is typically one of the matrices defined inadelie.matrix
submodule.- S(d, d) ndarray
Positive semi-definite matrix
.- v(n,) ndarray
Linear term
.- penalty_neg(m,) ndarray
Penalty
on the negative part of .- penalty_pos(m,) ndarray
Penalty
on the positive part of .- kappaint, optional
Violation batching size. If
None
, it is set tomin(m, d)
. Default isNone
.- 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.