Solving misfit using both L1 and L2 norm

조회 수: 3 (최근 30일)
Rock Interpreter
Rock Interpreter 2022년 6월 21일
댓글: Torsten 2022년 6월 21일
Hi,
I have observed data and a vector "Pmodel ", which I am calculating following one equation. Now I need to have L1 norm and L2-norm solution of the difference between the observed and calculated parameter. Below, I followed the logic. Am I correct in this sense, kindly suggest.
----------------------------------------------
for i=1:length(s)
for j=1:length(h)
P_Model=C-(2.*v.*m_h(j))-(m_s(i).*log(v)); %Model
P_Obs=data(:,1);
Error(i,j)=sqrt(sum( sum( ((P_Model-P_Obs)).^2 ) )) %misfit calculation with L2 norm
Error(i,j)=sum(abs(P_Model-P_Obs)) %misfit calculation with L1 norm
end
end
------------------------------------------------------------------------------------------------------------------
Answer will be highly appreciated. Kindly suggest alternative if this is not correct apporach.
Thanking you in anticipation.
  댓글 수: 6
Rock Interpreter
Rock Interpreter 2022년 6월 21일
I am computing the residual (error) between the modeled and observed value, which I need to minimize using L1 and L2norm solution. This is an inverse problem. 's' and 'h' are two paramters that we want to get finally through this minimization. The values of s and h for which we will get minimum of the error will be the solution of the problem (Please refer to the figure attached; here x axis is 's' and y axis is P_Model / P_Obs). The loop is for having various possible values of 's' and 'h' to fit the data. Hope this clears your doubt. Please sugest whether my approach is correct or not.
Thank you.
Torsten
Torsten 2022년 6월 21일
Instead of searching for optimal s and h in a loop, use lsqcurvefit to fit your parameters (and minimize the error).

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

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by