We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm trying to implement a generalized elastic net of the following form:
$L = \frac{1}{2}sum_{i=1}^N (y_i - X_i\beta)^2 + \lambda_1|\beta|_1 + \frac{\lambda_2}{2}\beta^TP\beta$
(see http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004790)
with P being PSD, and was wondering if I correctly understood the API. Here is my attempt:
import regreg.api as rr n,m=X.shape loss = rr.squared_error(X, y) sparsity = rr.l1norm(m, lagrange=l1) grouping = rr.quadratic_loss(m, Q=P, coef=l2) problem = rr.container(loss, grouping, sparsity) solver = rr.FISTA(problem)
Any help is greatly appreciated.
Thanks, Benni
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm trying to implement a generalized elastic net of the following form:
(see http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004790)
with P being PSD, and was wondering if I correctly understood the API. Here is my attempt:
Any help is greatly appreciated.
Thanks,
Benni
The text was updated successfully, but these errors were encountered: