필터 지우기
필터 지우기

How to minimize the L1 norm of residuals?

조회 수: 5 (최근 30일)
Phil
Phil 2020년 11월 12일
편집: Matt J 2020년 11월 12일
Hello,
The datasets I currently analyse are not normally distributed (according to shapiro-wilk and kolgomorov-smirnov @ p = 0.05). Therefore, I prefer plotting them as boxplots. However, I would actually like to fit a nonlinear model (in that case a dose respone curve, f(x) = y(end)./(1 + 10.^((param(1) - x)*param(2))))) to the (non-existing) mean in order to extract some parameters. So, is there any way and is it allowed to fit my function to the median instead of the mean values? I assume that I have to minimize the L1 norm of the residuals, but that gives me a hard time. Can you help me on this one?
Best regards
Philipp

채택된 답변

Matt J
Matt J 2020년 11월 12일
편집: Matt J 2020년 11월 12일
FMINSEARCH would be a good candidate, since you have only two unknowns
fun=@(param) norm( f - y(end)./(1 + 10.^((param(1) - x)*param(2))))) ,1);
fminsearch(fun,initialGuess)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Probability Distributions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by