I’m trying to solve a modified LASSO where weights are constrained to be nonnegative, using StructuredOptimization.jl. The documentation suggests this should be possible using a code similar to the one below :
using StructuredOptimization
n = 5
p = 10
A = rand(n, p)
y = rand(n)
x = Variable(n)
@minimize ls(A*x-y) + norm(x, 1) st x >= 0.
This however gives me the following error message :
“Sorry, I cannot parse this problem for solver of type PANOC{Float64}”
Does someone (maybe @nantonel or @lostella ?) have any idea what is wrong with this ? Thanks anyway for developping this package which I have found extremly useful and easy to use aside this particular case
For this particular problem, I think the l_1 norm can be rewritten as sum(x) or 1^Tx (as x is non-negative) and absorbed into the smooth part of the objective. The problem could then be solved with a proximal method (though if your problem is small I’d recommend LBFGS-B).