el0ps.estimator.L0L1L2Classifier¶
- class el0ps.estimator.L0L1L2Classifier(lmbd, alpha, beta, M=inf, fit_intercept=False, solver=<el0ps.solver.bnb.BnbSolver object>)¶
Scikit-learn-compatible linear model classification estimators with L0L1L2-regularization.
The estimator corresponds to a solution of the problem
\[\textstyle\min_{\|\mathbf{x}\|_{\infty} \leq M} f(\mathbf{Ax}) + \lambda\|\mathbf{x}\|_0 + \alpha\|\mathbf{x}\|_1 + \beta\|\mathbf{x}\|_2^2\]where \(f\) is a
el0ps.datafit.Logistic
function, \(\mathbf{A} \in \mathbb{R}^{m \times n}\) is a matrix, \(\lambda > 0\) is a parameter, the L0-norm \(\|\cdot\|_0\) counts the number of non-zero entries in its input, and \(h\) is a penalty function.- __init__(lmbd, alpha, beta, M=inf, fit_intercept=False, solver=<el0ps.solver.bnb.BnbSolver object>)¶
Methods
__init__
(lmbd, alpha, beta[, M, ...])decision_function
(X)Predict confidence scores for samples.
fit
(X, y)Fit model.
get_metadata_routing
()Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
predict
(X)Predict using the linear model.
score
(X, y[, sample_weight])Return the mean accuracy on the given test data and labels.
set_params
(**params)Set the parameters of this estimator.
set_score_request
(*[, sample_weight])Request metadata passed to the
score
method.