I'm trying to perform a customized nonlinear regression. I'm using the Linex loss function instead of least-squares. I'm doing LASSO-style regularization, so that my objective function has abs()
terms.
I think the resultant objective function, $f(\theta)$, is different enough from a vanilla regression so as to make direct use of standard libraries impossible. So I plugged into Matlab's all-purpose fmincon()
instead. I haven't yet derived a gradient/Hessian to pass in but I plan to.
However, this fails to produce the desired LASSO-like behavior of setting coefficients to exactly 0. It's not hard to see why, as I haven't told the optimization routine about the derivative discontinuities resulting from the abs()
terms.
My question is whether there is a simple way to incorporate the fact that $\partial f/\partial \theta_i$ is undefined at $\theta_i=0$ for some $i$ into a general purpose optimization routine, or whether I have to implement the whole optimization routine from scratch.
(I am new to Matlab and to custom optimization in general. Please let me know if I have some obvious fundamental misunderstandings here. Thanks!)