Skip to content

Instantly share code, notes, and snippets.

@zhpmatrix
Created April 14, 2016 11:42
Show Gist options
  • Save zhpmatrix/84a45c537e7fcd86261472612bcd17bb to your computer and use it in GitHub Desktop.
Save zhpmatrix/84a45c537e7fcd86261472612bcd17bb to your computer and use it in GitHub Desktop.
some nice ideas about the scipy.odr references: http://docs.scipy.org/doc/scipy/reference/odr.html

1.when you know that your measurements of X are uncertain,

or when you don’t want to focus on the errors of one variable over another.

2.the history of the ODR:

Orthogonal Distance Regression (ODR) is a method that can do this (orthogonal in this context means perpendicular –

so it calculates errors perpendicular to the line, rather than just ‘vertically’).

Unfortunately, it’s a lot more complicated to implement than standard linear regression,

but fortunately there is some lovely Fortran code called ODRPACK that does it for us.

Even more fortunately,

the lovely scipy people have wrapped this Fortran code in the scipy.odr Python module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment