[SciPy-User] synchronizing timestamps from different systems; unpaired linear regression

Nathaniel Smith njs@pobox....
Tue Apr 10 16:22:58 CDT 2012


On Tue, Apr 10, 2012 at 10:18 PM, Nathaniel Smith <njs@pobox.com> wrote:
>    return np.sum((y_times - x_times[closest_x_times]) ** 2)

On further thought, squaring is probably exactly the wrong
transformation here -- squared error focuses on minimizing the large
errors, and in this case we know that the large errors are caused by
events that got dropped on the X side, and that these contain no
information about the proper (offset, clockspeed).
np.sqrt(np.abs(...)) would probably do better, or something similar
that flattens out for larger values. Easy to play around with, though.

Also on further thought, it might make sense to run that both
directions, and match x values against y values too.

-- Nathaniel


More information about the SciPy-User mailing list