Search Comments and Ratings

go

   
Date File Comment by Comment Rating
04 Sep 2014 Gaussian smoothing filter Function to smooth a time series using a Gaussian filter. Author: James Conder James Conder

jon, thanks for the feedback. I originally wrote the function for a non-uniformly spaced time vector, which conv would not handle correctly. That said, I expect most uses of this function will be for uniformly spaced time vectors, where your criticism is exactly right.

I uploaded an update that will look to do the convolution unless the spacing is variable, in which case it will use the (ugly) loop.

03 Sep 2014 Gaussian smoothing filter Function to smooth a time series using a Gaussian filter. Author: James Conder jon erickson

Works fine, but implementation is could be improved/sped up by using conv(...) instead of a for loop to compute filtered waveform

06 Aug 2014 Gaussian smoothing filter Function to smooth a time series using a Gaussian filter. Author: James Conder Philippe

Great! Does what it advertise. Thanks for this submission.

12 Feb 2014 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder James Conder

Andrew, I spent some time looking at it, and think I have fixed the problem. I just uploaded a newer version. Once it is up, please try your dataset on it and let me know how it goes.

10 Feb 2014 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder Andrew

James,

Great function, thank you. I too have the issue with outputting a constant value for Qpre, and, as with Darren, changing the scaling of the value for t fixes this. My t values scale between 0 and 1 in steps of 0.001.

Many thanks

28 May 2013 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder James Conder

Hi Darren,

Sorry about the plotting calls. I realized that I forgot to remove them just after resubmitting. I guess the follow up submission with those removed is still moving though the system.

Good catch on reversing t. It is one of those bugs introduced when addressing a different problem. I'll fix that bug and put a test example in the help comments in new submission later today.

27 May 2013 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder Darren Rowland

Hey James,

I've tested out the new code and it works a lot better for my case. One problem I've now identified is that you are not re-reversing t at the end of the function, so the calculated Qpre can be in error.

Other than this, I would suggest for you to include a brief usage example within the Help comments, e.g. constructing data from known parameters, adding some random error and obtaining parameter estimates. Just a few lines to help someone getting started.

Also, you should turn the various plotting calls off by default then have an extra (optional) input parameter for people to use to turn them on.

Hope that helps,
Darren

23 May 2013 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder James Conder

Thanks for the feedback, Darren. I've made a fix based on your idea of rescaling the vector internally, and submitted an update. It isn't completely obvious to me why Qpre goes to the mean of Q for some scalings of t. In any case, I hope my fix is general and not limited to your special case. Keep me posted.

22 May 2013 Logistic curve fit Fit a time series to a best-fitting logistic function. Author: James Conder Darren Rowland

Hi James,

This is a nice function but there is a failure condition to be aware of.

When I run the function on the following data, Qpre = 169.35 for all t. However, if I multiply t by 100, the function returns a better result.

Perhaps you can detect these cases and scale the vector internally to correct.

Darren

t = [0.8753
0.9267
0.9499
0.9678
0.9875
1.0206];
Q = [ 48.3871
96.7742
145.1613
193.5484
241.9355
290.3226];

20 May 2013 F-Test Test whether addition of model parameters is warranted by improvement of data misfits. Author: James Conder Ai Lishu

Contact us