sparse_ho.models.SVM

class sparse_ho.models.SVM(estimator=None)

Support Vector Machine classifier without bias.

The optimization problem is solved in the dual:

1/2 r^T(y * X)(y * X)^T r - sum_i^n r_i s.t 0 <= r_i <= C

Parameters
estimator: instance of ``sklearn.base.BaseEstimator``

An estimator that follows the scikit-learn API.

__init__(estimator=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([estimator])

Initialize self.

generalized_supp(X, v, log_C)

Generalized support of iterate.

get_L(X)

Compute Lipschitz constant of datafit.

get_dual_v(mask, dense, X, y, v, log_C)

TODO

get_full_jac_v(mask, jac_v, n_features)

TODO

get_jac_obj(Xs, ys, n_samples, sign_beta, …)

get_jac_v(X, y, mask, dense, jac, v)

Compute hypergradient.

get_mat_vec(X, y, mask, dense, log_C)

Returns a LinearOperator computing the matrix vector product with the Hessian of datafit.

proj_hyperparam(X, y, log_alpha)

Project hyperparameter on an admissible range of values.

reduce_X(X, mask)

Reduce design matrix to generalized support.

reduce_y(y, mask)

Reduce observation vector to generalized support.

sign(x, log_C)

Get sign of iterate.