el0ps.solver.BnbSolver¶
- class el0ps.solver.BnbSolver(relative_gap=1e-08, absolute_gap=0.0, time_limit=inf, node_limit=None, queue_limit=None, queue_strategy='bound', verbose=False, **kwargs)¶
Branch-and-Bound solver for L0-regularized problems.
The problem is expressed as
\[\textstyle\min_{\mathbf{x} \in \mathbb{R}^{n}} f(\mathbf{Ax}) + \lambda\|\mathbf{x}\|_0 + h(\mathbf{x})\]where \(f\) is a
el0ps.datafit.BaseDatafitfunction, \(\mathbf{A} \in \mathbb{R}^{m \times n}\) is a matrix, \(h\) is ael0ps.penalty.BasePenaltyfunction, and \(\lambda\) is a positive scalar.- Parameters:
- relative_gap: float, default=1e-8
Relative gap targeted on the objective value by the solver.
- absolute_gap: float, default=0.0
Absolute gap targeted on the objective value by the solver.
- time_limit: float, default=None
Limit in second on the solving time.
- node_limit: int, default=None
Limit on the number of nodes explored during the BnB algorithm.
- queue_limit: int, default=None
Limit on the number of nodes in the queue during the BnB algorithm.
- queue_strategy: str, default=”bound”
Queue strategy during the BnB algorithm. Can be one of the following: - “bound”: select nodes with the worst lower bound first - “objective”: select nodes with the best upper bound first - “breadth”: select shallower nodes in the BnB tree first - “depth”: select deepest nodes in the BnB tree first - “fifo”: select nodes lastly added to the queue first - “lifo”: select nodes firstly added to the queue first - “random”: select nodes randomly in the queue - “local_gap”: select nodes with the closest gap between their upper and lower bounds first
- verbose: bool, default=True
Toggle solver verbosity.
- **kwargs: keyword arguments
Additional keyword arguments passed to a
BoundSolverinstance used for the bounding step of the Branch-and-Bound algorithm.
- __init__(relative_gap=1e-08, absolute_gap=0.0, time_limit=inf, node_limit=None, queue_limit=None, queue_strategy='bound', verbose=False, **kwargs)¶
Methods
__init__([relative_gap, absolute_gap, ...])package_results(problem, results)solve(datafit, penalty, A, lmbd[, x_init])Solve an L0-regularized problem.
Attributes
accept_jitclass