This functions implements the algorithm of Orthogonal Least Squares.It can be used to rank regressor
Author: Marco Cococcioni
I would tend to agree with Mr. Shvorob and Mr D'Errico, this is not what I understand orthogonal least-squares. Also, although the code is not as poor as previously seen entries, the general structure is confusing and unnecessarily bloated. In particular, I find the choice to include a demo capability into the function itself, rather than including it as a seperate file, questionable to say the least.
None the less, I'm sure that with a good cleanup, this code will find its uses in some scenarios, if not for the functionality it offers then for its thorough discussion of the theory (although it should probably be moved out of the file to a seperate document).