Monday, February 25, 2008

How to propagate errors with Kalman Filters

Yeah, the title is technical, but here is a case where what looks to be an error has been propagated into numerous papers and the Wikipedia article. The subject is the unscented Kalman filter, which is a way of estimating parameters given measurements that are nonlinear functions of those parameters. Part of the procedure is to compute a covariance matrix, a matrix that must be positive definite, by weighting a bunch of positive semidefinite matrices and adding them up. Now positive semidefinite matrices are a bit like non-negative numbers: if you multiply them by positive numbers and add up the results, you get a positive semidefinite matrix. In fact, the result should actually be positive if the unscented Kalman filter is applicable at all. But... let some of the multipliers be negative and all bets are off. Now one of the multiplicative weights one computes from the formulas in the articles can be negative. And not just a little negative, but negative enough that cancellation of terms leads to significant loss in numerical precision.

Pah, I went and derived the dang thing for myself. Then I went to the original paper where, lo and behold, it was done as G*d intended. Looking at the now universal screw up that fills the whole first page of a google search, it looks to me like it started as a punctuation error: confusing a dash with a minus. It's funny how these things propagate. And how few people really try to understand the tools they use. Reminds me of a citation error in Herzberg's famous spectroscopy book: article after article repeated the cite, they were all wrong. Apparently no one had actually read the paper they cited.

Of course, I might be wrong. But I don't think so.

1 comment:

MeaninglessHotAir said...

We're all herd animals, because it's informationally superior to be so.

I wonder to what extent the vaunted "scientific consensus" is ever anything more than simple herd behavior.