Rank: 4 based on 3322 downloads (last 30 days) and 68 files submitted
photo

John D'Errico

E-mail
Company/University
Consultant
Lat/Long
43.236435, -76.93324

Personal Profile:

Retired from the Eastman Kodak Company, where I was an applied mathematician consulting typically on matters of curve fitting, modeling, and numerical analysis. I enjoy playing bridge, doing woodworking and woodturning, and going for walks. We have a sweet wire hair fox terrier. In my spare time I still like to use Matlab.

Professional Interests:
Numerical analysis, mathematical modeling

 

Watch this Author's files

 

Files Posted by John View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
29 Jul 2010 Published M-Files Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico 2d surfaces, scattered data, surface fitting, surface, regression, interpolation 418 57
  • 4.89286
4.9 | 57 ratings
21 Jul 2010 Published M-Files SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico shape, free knots, interpolation, spline, splines, slm 246 32
  • 5.0
5.0 | 19 ratings
30 Jun 2010 LSE A linear least squares solver, subject to linear equality constraints Author: John D'Errico regression, least, squares, linear, linear algebra, constraints 118 4
  • 5.0
5.0 | 3 ratings
17 Jun 2010 Moving window standard deviation A (fast) windowed std on a time series Author: John D'Errico windowed running std ..., dsp 101 7
  • 4.875
4.9 | 8 ratings
04 Jun 2010 Minimum Radius Bounding Sphere Minimum radius bounding sphere around a 3d set of points Author: John D'Errico enclose, minimum, sphere, optimum, radius, enclosing 34 14
  • 3.8
3.8 | 7 ratings
Comments and Ratings by John View all
Updated File Comments Rating
30 Jul 2010 nsumk Returns a listing of n-tuples of non-negative integers adding up to k Author: Peter Cotton

I am NOT proposing anything. I merely tried to read the help for your own function, then tried to convince you that your code needs documentation when used in a way that your help says is possible. Here are a couple of lines, written by you!

% Usage 2: x = nsumk(1:5,2)
%
% n: vector

Exactly how should your code work? What is the behavior of your code when it is passed a vector input for n? You need to define that. And to this point, I have seen no definition, no explanation. I've seen multiple references to nchoosek, that your code is related in some way to nchoosek. Therefore I assumed that when I call it in a way that I would call nchoosek, I might get a similar result. If this is false, then you need to document your own code properly. I am not suggesting any new functionality for this code. Merely that you document the EXISTING functionality so that a person who might want to use it can do so.

30 Jul 2010 nsumk Returns a listing of n-tuples of non-negative integers adding up to k Author: Peter Cotton

Yes, but if you will argue that this code is in any way consistent with nchoosek, then it must be so. In the example I posed,

nsumk(1:3,5)

yields numbers that are not in that set! Zero is not in the set. 4 is not in the set. 5 is not in the set.

So clearly your code is not consistent with nchoosek, despite multiple statements that it is. You say what your code does and doe not require, but no place do you state that in the help. If you do not state what your code does, then how will anybody else ever find it of value?

Next, if you have lost the code before, then this is even a better reason to enable lookfor. Use an H1 line. Use a help style that at least tries to follow the style of help that the MathWorks uses. This makes your code more useful to others. Otherwise, it is of no use to anybody but you.

30 Jul 2010 nsumk Returns a listing of n-tuples of non-negative integers adding up to k Author: Peter Cotton

Also, the help needs to be explicit about whether the pair of integers {2,3} is distinct from the pair {3,2}. I would argue that is an extremely important distinction. This code seems to count them both.

30 Jul 2010 nsumk Returns a listing of n-tuples of non-negative integers adding up to k Author: Peter Cotton

I would first point out that my own partitions.m solves exactly this problem, as well as a flexible variety of related problems.

http://www.mathworks.com/matlabcentral/fileexchange/12009

A quick test shows there to be a problem here though. Use nsumk to find all sums of tuples of the integers 1:3, that sums to 5. The help seems to indicate that this is possible, using the following call:

nsumk(1:3,5)
ans =
     0 0 5
     0 1 4
     0 2 3
     0 3 2
     0 4 1
     0 5 0
     1 0 4
     1 1 3
     1 2 2
     1 3 1
     1 4 0
     2 0 3
     2 1 2
     2 2 1
     2 3 0
     3 0 2
     3 1 1
     3 2 0
     4 0 1
     4 1 0
     5 0 0

But clearly, that interpretation seems to fail, since nsumk uses 4 and 5 in those sums.

The help here seems reasonable, although it lacks an H1 line. AN H1 line is valuable when next month or next year, you simply cannot recall the name of that blasted function you wrote or downloaded long ago. It enables the function lookfor, which uses the very first line of your help. By putting a single line of intelligent description there, you can now use lookfor to do a keyword search of those H1 lines.

There are no error checks in this code. Of course, how can you check for errors when the help is not quite clear about what the arguments mean?

30 Jul 2010 SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico

I wish I had written a paper on this topic years ago when I wrote the first version of this tool. I did not do so then, although I have given a few talks on the underlying modeling philosophy of these tools.

The basic idea is simply that of a least squares spline, augmented by a smoothness penalty like a smoothing spline. The smoothness penalty solves the problem of arbitrary (poor) knot selection in many cases.

General least squares splines are covered in depth in the literature, as are smoothing splines. For these fundamental ideas, de Boor is of course the classic reference, a book worth reading for any user of splines.

What the SLM tools add though is something that I've never really seen written about in the literature. This is the idea that intelligently chosen constraints on the curve shape can act as a strong, useful regularizer on your result. They allow you to build your own knowledge about a system into the model, using a simple vocabulary to describe the desired shape of that curve.

I wrote these tools after some years of seeing people using strange nonlinear regression models to fit curves, just because they needed a curve with a given shape. So the user picks some nonlinear sigmoidal form, a Gaussian, etc., for no better reason than that it fits some fundamental desired shape. And of course, nonlinear regression has its own problems, like poor starting values, lack of convergence, etc. Worse, the user finds that the curve shape they chose is not really the correct shape, so they end up with significant lack of fit. Once a viable tool becomes available to fit those curves, I find that far fewer people end up using nonlinear regression models for the wrong reasons.

There are a couple of files that discuss some of these ideas "slm_tutorial.html" and "shape prescriptive modeling.rtf" in the zip file, but that is all I can offer. We also suggested a citation format for tools from the file exchange, if you do need an explicit reference. You can find our recommendations here:

http://matlabwiki.mathworks.com/Citing_Files_from_the_File_Exchange

Comments and Ratings on John's Files View all
Updated File Comment by Comments Rating
30 Jul 2010 SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico Avital, Royi

John, Thank you for your response.
I will cite as you advised me to.

I'll try to have a look at De Boor's book.
I just wanted the solid math behind the tool.
Hopefully I'll get from there.

One day, If you do write an article or notes about it I'd be happy to read and learn.

Thank you.

30 Jul 2010 SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico D'Errico, John

I wish I had written a paper on this topic years ago when I wrote the first version of this tool. I did not do so then, although I have given a few talks on the underlying modeling philosophy of these tools.

The basic idea is simply that of a least squares spline, augmented by a smoothness penalty like a smoothing spline. The smoothness penalty solves the problem of arbitrary (poor) knot selection in many cases.

General least squares splines are covered in depth in the literature, as are smoothing splines. For these fundamental ideas, de Boor is of course the classic reference, a book worth reading for any user of splines.

What the SLM tools add though is something that I've never really seen written about in the literature. This is the idea that intelligently chosen constraints on the curve shape can act as a strong, useful regularizer on your result. They allow you to build your own knowledge about a system into the model, using a simple vocabulary to describe the desired shape of that curve.

I wrote these tools after some years of seeing people using strange nonlinear regression models to fit curves, just because they needed a curve with a given shape. So the user picks some nonlinear sigmoidal form, a Gaussian, etc., for no better reason than that it fits some fundamental desired shape. And of course, nonlinear regression has its own problems, like poor starting values, lack of convergence, etc. Worse, the user finds that the curve shape they chose is not really the correct shape, so they end up with significant lack of fit. Once a viable tool becomes available to fit those curves, I find that far fewer people end up using nonlinear regression models for the wrong reasons.

There are a couple of files that discuss some of these ideas "slm_tutorial.html" and "shape prescriptive modeling.rtf" in the zip file, but that is all I can offer. We also suggested a citation format for tools from the file exchange, if you do need an explicit reference. You can find our recommendations here:

http://matlabwiki.mathworks.com/Citing_Files_from_the_File_Exchange

30 Jul 2010 SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico Avital, Royi

Is there any article which could be used as reference to this kind of fitting?
I'd like to use this tool in my project and would like to back it up with some background info.

Thanks for this amazing tool.

30 Jul 2010 Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico Chapman, Adam

the new setting "'smoothness',[xsmooth ysmooth]" is a Godsend. Many Thanks

26 Jul 2010 Minimal Bounding Rectangle Minimal bounding rectangle around points in the (x,y) plane Author: John D'Errico m, m

Thanks for sharing the code, very well written... I have one question though...
What is the name of the implemented algorithm?

Top Tags Applied by John
interpolation, approximation, computational geometry, matrices, minimum
Files Tagged by John View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
29 Jul 2010 Published M-Files Surface Fitting using gridfit Model 2-d surfaces from scattered data Author: John D'Errico 2d surfaces, scattered data, surface fitting, surface, regression, interpolation 418 57
  • 4.89286
4.9 | 57 ratings
21 Jul 2010 Published M-Files SLM - Shape Language Modeling Least squares spline modeling using shape primitives Author: John D'Errico shape, free knots, interpolation, spline, splines, slm 246 32
  • 5.0
5.0 | 19 ratings
30 Jun 2010 LSE A linear least squares solver, subject to linear equality constraints Author: John D'Errico regression, least, squares, linear, linear algebra, constraints 118 4
  • 5.0
5.0 | 3 ratings
17 Jun 2010 Moving window standard deviation A (fast) windowed std on a time series Author: John D'Errico windowed running std ..., dsp 101 7
  • 4.875
4.9 | 8 ratings
04 Jun 2010 Minimum Radius Bounding Sphere Minimum radius bounding sphere around a 3d set of points Author: John D'Errico enclose, minimum, sphere, optimum, radius, enclosing 34 14
  • 3.8
3.8 | 7 ratings

Contact us at files@mathworks.com