el0ps.solver.MipSolver

class el0ps.solver.MipSolver(optimizer_name='gurobi', relative_gap=1e-08, absolute_gap=0.0, time_limit=None, node_limit=None, queue_limit=None, verbose=False)

Mixed-integer programming 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.BaseDatafit function, \(\mathbf{A} \in \mathbb{R}^{m \times n}\) is a matrix, \(h\) is a el0ps.penalty.BasePenalty function, and \(\lambda\) is a positive scalar. To use this solver, the optimizer specified in the optimizer_name parameter must be installed and accessible by pyomo which is the underlying library used to model the problem.

Parameters:
optimizer_name: str = “gurobi”

Mixed-Integer Programming optimizer to use. Available options are “cplex”, “gurobi”, and “mosek”.

relative_gap: float, default=1e-8

Relative tolerance on the objective value.

absolute_gap: float, default=0.0

Absolute tolerance on the objective value.

time_limit: float, default=None

Limit in second on the solving time.

node_limit: int, default=None

Limit on the number of nodes explored by the MIP solver.

queue_limit: int, default=None

Limit on the number of nodes in the queue in the MIP solver.

verbose: bool, default=False

Whether to toggle solver verbosity.

__init__(optimizer_name='gurobi', relative_gap=1e-08, absolute_gap=0.0, time_limit=None, node_limit=None, queue_limit=None, verbose=False)

Methods

__init__([optimizer_name, relative_gap, ...])

build_model(datafit, penalty, A, lmbd)

initialize_optimizer()

package_result(model, result)

solve(datafit, penalty, A, lmbd[, x_init])

Solve an L0-regularized problem.

Attributes

accept_jitclass

Return whether if the solver accepts a jitclass for the datafit and penalty function.