I have problem (see https://public.jmp.com/packages/Problematic-Nonlinear-Fit/js-p/kz0BFg2_XHtZjz6kNKdXg) where I am fitting a non-linear model, and because of the data there is some instability in the model fit. One of the parameters in the non-linear model tends to "slide to infinity" when there are small errors in the data compared to the true theoretical model. What I would like to do is fit the non-linear model, but put a penalty on that parameter (e.g. L2 norm) so that is prevents the parameter from blowing up.
What I mean by this:
Suppose my non-linear model is
f(t) = A * (1 - exp(-k*t)) + B * (1-exp(0.0193 * t))
normally, the loss function that is minimized to find the parameter estimates is the squared error loss
find(A, k,
so that sum { (y-f(t))^2) } is minimized
what I want to do is something more like
find(A, k,
so that sum{ (y-f(t))^2 + lambda*k^2} is minimized
where lambda is a regularization parameter that I would pick on my own based on a simple grid search.
I looked into using a custom loss function column, but I don't know if I can include a model parameter from another column in that column.
Any ideas on how to keep the rate ("k") from blowing up?