0%

Preliminary Survey on LASSO Convex optimization

LASSO is short for least absolute shrinkage and selection operator, which can be seen in wiki. The followings are some optimization python package, showing whether support LASSO and gpu.

Sklearn

Statsmodel

H2O

H2O4GPU

  • using sklearn api
    • import h2o4gpu as sklearn
    • install trouble, only support python3.6?

CVXPY

  • support LASSO
  • construct Poisson regression following DCP rules
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    def loss_fn(X, Y, beta):
    lbd = X @ beta
    return cp.sum(cp.exp(lbd) - cp.multiply(Y, lbd))

    def regularizer(beta):
    return cp.norm1(beta)

    def objective_fn(X, Y, beta, lambd):
    return loss_fn(X, Y, beta) + lambd * regularizer(beta)

    def mse(X, Y, beta):
    return (1.0 / X.shape[0]) * loss_fn(X, Y, beta).value
  • on GPU depend on the solver

glmnet

Not support LASSO?