File Exchange

image thumbnail

LMS Toolbox

version 1.0 (14.5 KB) by

Least median of squares regression and relative algorithms

6 Ratings



No License

This toolbox contains a set of functions which can be used to compute the Least Median of Squares regression, the Reweighted Least Squares regression, the accociated location and scale estiamtors, and the Minimum Volume Ellipsoid. The concept is the minimization of the median of the squared errors (residuals) in order to achieve robustness against the outliers.

Comments and Ratings (9)

Adam Smith

is there an algorithm to fit circles?

Jamie Liu



The function,'LMSregsa', clearly used a completely different algorithm from the function description.

k elmurapet

Min Poh

Well documented with working functions.

David Sterling

There are three problems with the MVE routine (the only one I've looked at so far).

The most serious problem is a bug on line 68:
should read:
according to eq 1.25 in Rousseau and Leroy, "Robust Regression and Outlier Detection", Wiley 2003.

Another problem is that the routine was apparently written with "small" data sets in mind since it performs an exhaustive (combinatorial) search of all nchoosek(n,p+1)
permutations given by:


This can be an extremely large number of combinations for moderate two dimensional data sets. See Rousseau and Leroy above for alternatives.

A final comment about effeciency: the routine several "for" loops that can easily be replaced by Matlab's "vectorized" operations which are more efficient.

Fred Webber

The algorithms implemented in these programs are not the best that are available. See

Rousseeuw, P.J. and Van Driessen, K. (1999), A Fast Algorithm for the Minimum Covariance Determinant Estimator, Technometrics, 41, 212-223.
Abstract - Program FAST-MCD - Program FAST-MCD IN MATLAB - Paper
Rousseeuw, P.J. and Van Driessen, K. (1999), Computing LTS Regression for Large Data Sets, Technical Report, University of Antwerp, submitted.
Abstract - Program FAST-LTS - Program FAST-LTS IN MATLAB - Paper

David Sharim


LMSar function bug fix

bug fix

performance improvement

bug fix

MATLAB Release
MATLAB 6.5 (R13)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video