On Wed, Jun 29, 2016 at 08:04:44AM -0700, Bill Unruh wrote: > On Wed, 29 Jun 2016, Miroslav Lichvar wrote: > > I'm very interested in implementing some estimation of the asymmetry > > to chrony. I'd like to allow any slope between -0.5 and 0.5, not just > > one of the three values (-0.5, 0.0, +0.5). One idea I had was to > > search for a value which minimizes the variance in the linear > > regression when all points have a constant weight. With each new > > sample, the asymmetry would be estimated first and then the offsets > > would be adjusted for the weighted regression which is currently used > > to estimate the offset. Basically I'm looking for a constant A between > > -0.5 and 0.5 which minimizes the variance in linear regression of > > points (x, y + A * d), where x is time, y is the symmetric offset and > > d is the increase in delay over the minimum. Can A be calculated > > directly from (x, y, d) samples? I suspect it would have to be an > > iterative approach and this might be expensive. > > No, that would just be a two, instead of one, variable linear regression, > One would just minimize (y-C(x-x0)+Ad)^2 over C, x0 and A. Still linear > equations.
Oh, that's great. Thanks. I'll try that. I suspect we will need to use a long-term average of the slope to prevent adding more noise when the number of samples is small. If this works well, there will probably be other interesting problems with "asymmetric" offset that will need to be addresses. For instance the error interval used in the source selection would shift, which could be a problem for detection of falsetickers. The code will likely have to work with both offsets depending on the context. There is also a question how they should be reported in chronyc and the logs, and how much confusion this will create. -- Miroslav Lichvar -- To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" in the subject. For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the subject. Trouble? Email listmas...@chrony.tuxfamily.org.