adelie.bcd.solve#

adelie.bcd.solve(*, quad: ndarray, linear: ndarray, l1: float, l2: float, tol: float = 1e-12, max_iters: int = 1000, solver: str = 'newton_abs', smart_init: bool = True)[source]#

Solves the BCD update.

The BCD update for the group elastic net is obtained by minimizing the BCD objective given in adelie.bcd.objective(). The solution exists finitely if and only if \(\|v\|_2 \leq \lambda_1\) or \(\|v_S\|_2 < \lambda_1\), where \(S\) is the subset of indices such that \(\Sigma_{ii} + \lambda_2 = 0\). If the solution exists, it is unique.

Parameters:
quad(p,) ndarray

See adelie.bcd.objective().

linear(p,) ndarray

See adelie.bcd.objective().

l1float

See adelie.bcd.objective().

l2float

See adelie.bcd.objective().

tolfloat, optional

Convergence tolerance. Default is 1e-12.

max_itersint, optional

Max number of iterations. Default is 1000.

solverstr, optional

Solver type must be one of the following:

  • "brent": Brent method.

  • "ista": ISTA method.

  • "fista": FISTA method.

  • "fista_adares": FISTA with Adaptive Restarts method.

  • "newton": Newton method.

  • "newton_abs": Newton method combined with Adaptive Bisection Starts for initialization.

  • "newton_abs_debug": same as "newton_abs" but with more debug information.

  • "newton_brent": Newton method combined with Brent method for initialization.

Default is "newton_abs".

Warning

The following methods are known to have poor convergence:

  • "brent"

  • "ista"

  • "fista"

  • "fista_adares"

smart_initbool, optional

If True, the ABS method is invoked to find a smart initial point before starting Newton’s method. It is only used when solver is "newton_abs_debug". Default is True.

Returns:
resultDict[str, Any]

A dictionary containing the output:

  • "beta": solution vector.

  • "iters": number of iterations taken.

  • "time_elapsed": time elapsed to run the solver.