tag:blogger.com,1999:blog-1369432396898204613.post3289895320706449848..comments2023-01-15T10:39:00.543+01:00Comments on Lighthouse in the Sky: How tempo2 does its fittingUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1369432396898204613.post-32694931190052390872010-12-04T08:17:27.910+01:002010-12-04T08:17:27.910+01:00In the simplest possible terms, tempo2 doing least...In the simplest possible terms, tempo2 doing least-squared fitting of models to data; the key wrinkle is that rather than simply being observed values with error bars, the observed values are phases, that is, reduced modulo 1. As a result, model guesses that are even a little off result in "phase wraps", and the objective function is stuck in a false minimum. So tempo2's optimizer assumes that the parameter steps are so small that the fitting function can be treated as linear. Thus optimization proceeds with a single function evaluation and a single evaluation of the partial derivative matrix. There's not really any way a normal optimizer can function with such a low call count.<br /><br />SPSA in particular looks impressive, but it solves a number of problems we don't have - for example, the only noise in our model evaluations is long double roundoff error. It's possible that it could navigate the extremely nasty optimization landscape introduced by phase wraps, but I doubt it, and in any case a scheme that has explicit knowledge of the phase jumps would almost certainly be more reliable.<br /><br />Nondimensionalization is indeed interesting; in fact I implemented a limited version of it last night. Didn't solve my convergence headaches, but it sure did improve the condition numbers.<br /><br />Orthogonal polynomials would be a much better way to represent varying quantities, as would Fourier series or splines or almost anything but truncated Taylor series. Unfortunately, the fitted models are published as primary results, so the models we use have to be simple, clear, easily implementable, and familiar to other pulsar astronomers. More complicated models will be a pretty hard sell.Anonymoushttps://www.blogger.com/profile/00764119699293212898noreply@blogger.comtag:blogger.com,1999:blog-1369432396898204613.post-29462854920571692652010-12-03T22:27:45.485+01:002010-12-03T22:27:45.485+01:00I don't really understand what the specific pr...I don't really understand what the specific problem is that Tempo2 solves (for example what the data looks like or what the models look like), and obviously you are not the author so you are constrained as to what to do about it. <br /><br />However, if I were to try to do something like what you're talking about I would be very tempted to use a technique called "Simultaneous Perturbation Stochastic Approximation" (SPSA). <br /><br />http://www.jhuapl.edu/SPSA/<br /><br />Also, I would be very tempted to use both nondimensionalization, and orthogonal polynomials (to minimize the problem of varying numerical scales)<br /><br />Dunno if any of those ideas are helpful to you but hopefully at least they are interesting.Daniel Lakelandhttp://models.street-artists.org/noreply@blogger.com