How to use regularization with lsqnonlin function
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I would like to use lsqnonlin functinon with regularization (e.g. Tikhonov regularization). However, to my big surprise there is no such option it seems!
I like lsqnonlin because I can specify a cost function with an anonymous function in a convenient way.
Please, tell me there is a way to add regularization or another function that does the same thing with regularization?
Also please note that my fonction takes as input a matrix and convolves with a small kernel k:
fun = @(x)conv2(x,k,'same')-y;
lsqnonlinoptions=optimset('Algorithm','Levenberg-Marquardt','MaxIter',maxIterArg);
x_lsq =lsqnonlin(fun,x0,[],[],lsqnonlinoptions);
0 Kommentare
Akzeptierte Antwort
Bruno Luong
am 14 Nov. 2020
Bearbeitet: Bruno Luong
am 14 Nov. 2020
You are free to incorporation anything in the objective function, e.g., l^2 regularization
regcoef = some_small_coef;
fun = @(x) [reshape(conv2(x,k,'same')-y,[],1); regcoef*x(:)];
12 Kommentare
Bruno Luong
am 15 Nov. 2020
I have no image-processing tbox so I can't try, and I guess I know the reason. But I stop to answer your many questions that drift from the original question.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Mathematics and Optimization finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!