Rank: 464670 based on 0 downloads (last 30 days) and 0 file submitted
photo

David Heslop

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by David
Updated File Comments Rating
10 Dec 2009 SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico

Thank you John this is wonderful package, but I think there may be an issue with slmeval when using the inverse of a spline which is monotonically decreasing.

As a simple example, when I work with data with a positive relationship everything is okay:

%first working with a simple positive relationship
X=sort(randn(20,1));
Y=X+10;
slm = slmengine(X,Y,'plot','on');

%find the Y value for X=0.5
Yhat=slmeval(0.5,slm,0);

%and work in the opposite direction
Xhat=slmeval(Yhat,slm,-1)

Xhat =

0.5000

But when I try them same thing for a negative relationship a NaN is returned:

%now work with a negative relationship
X=sort(randn(20,1));
Y=-X-10;
slm = slmengine(X,Y,'plot','on');

%find the Y value for X=0.5
Yhat=slmeval(0.5,slm,0)

%and work in the opposite direction
Xhat=slmeval(Yhat,slm,-1)

Xhat =

NaN

Of course this is just a simply example and the problem I'm working involves more complex relationships. Maybe I've misunderstood the use of slmeval, but any advice you could offer would be great,
thanks, Dave

Contact us