minimum of csaps smoothing spline

조회 수: 1 (최근 30일)
Shaun Werkhoven
Shaun Werkhoven 2013년 4월 28일
the spline smoothing function csaps finds the minimum of a fitting term and a smoothness term .. but can u get this minimum value? I want to try different values of p (which controls the tradeoff between smoothness and fit) and look at the minimum value, but I cant see how to actually get the value.
Thx, Shaun
  댓글 수: 1
Shaun Werkhoven
Shaun Werkhoven 2013년 4월 30일
I should have said I want the minimum value of the spline fit, ie.
min[ p(y-f(x))^2 + (1-p)Int((D^2)(f))^2 ]
= min value

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

답변 (1개)

Matt J
Matt J 2013년 4월 28일
편집: Matt J 2013년 4월 28일
pp = csaps(x,y,p);
[~,idx]=min(ppval(pp,x)); %initial guess of min location
[xmin,ymin]=fminsearch(@(z)ppval(pp,z), x(idx)); %refine the min
  댓글 수: 2
Shaun Werkhoven
Shaun Werkhoven 2013년 4월 30일
thanks for ur answer but this is not what I meant .. I guess I didnt make it clear enough. I dont want the minimum y value, I want the minimum value of the spline fit, ie.
min[ p(y-f(x))^2 + (1-p)Int((D^2)(f))^2 ]
= min value
csaps calculates this minimum over ppform functions f, but can u get this value of the minimum returned?
Matt J
Matt J 2013년 4월 30일
편집: Matt J 2013년 4월 30일
It does not appear from "doc csaps" that CSAPS will give it to you directly, but you could evaluate the function yourself using the information available from UNMKPP.
If CSAPS is an mfile, you might also be able to dig the necessary code out of there directly, or make a modified version of the code that will return the fitting error.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by