필터 지우기
필터 지우기

How to use regularization with lsqnonlin function

조회 수: 12 (최근 30일)
AD
AD 2020년 11월 14일
편집: AD 2020년 11월 15일
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);

채택된 답변

Bruno Luong
Bruno Luong 2020년 11월 14일
편집: Bruno Luong 2020년 11월 14일
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
Bruno Luong
Bruno Luong 2020년 11월 15일
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.
AD
AD 2020년 11월 15일
편집: AD 2020년 11월 15일
Ok, - sorry for the many questions, its just that I am trying things - shall I post another question with this? It's just for getting a better intuition of things... I know there are algorithms for image re-alignment.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by