2014-04-01

Nights Without Convergence

I spend many sleepless nights during preparation of last release of Munipack when no convergence occurred up to morning blue hours. The new feature, which I developed, was improvement of the robust algorithms which implements join estimation of location and scale parameters of statistical distributions.

With a presumption of Normal (Gaussian) distribution of data, the location parameter (centre of distribution) is independent on its scale and moreover, the estimate of the scale by conventional methods (standard deviation, mean of absolute deviations) is optional and naturally guaranties minimal noise and maximal information. Processing of data with other distributions, which we are supposing when robust algorithms are applied, also requires estimate of its scale (standard deviation) of the distribution together with the location.

From numerical mathematics point of view, this is a standard task. One can use the method of maximum likelihood, the likelihood function will be constructed and its minimum is determined to get parameters. Another standard way is to derive a gradient of the function and use an appropriate numerical library to locate minimum from an initial estimate.

Unfortunately, I revealed during the sleepless nights, that the gradient way can fail when the original function is not quadratic (opposite to the least square method). In this case, the false (artificial) features are appearing and I spend nights by looking for its convergence criterion.

Square of gradient of the function

The final result, on figures, is self-describing. When initial estimate of the gradient method falls inside of pit, on the left from the artificial throat, a method converges. When we are starting on the right, the algorithm is non-convergent or with minimum in infinity.

Negative logarithm of maximum likelihood function

A non-gradient method without derivatives locates the minimum easy and unique (and unfortunately slowly).

As the result of all the sleepless nights, users of Munipack benefits in less scattered estimates of averaged biases, darks, flats, sky backgrounds, photometry calibrations,…


Closing doors


I'm closing Munipack's site on Google Code because separation on development and stable sites was source of confusing for many users. The content of wiki has been merged to main site and Mercurial repositories will be sometimes updated.

Together with the change, I thinking also about closing of mailing lists and Google plus page which are practically abandoned.

No comments: