Python linear fitting with multiple error bars

I collect some data with linear fit. I want the weight of the error bars. Until now, I used fitting.py bulldogs. Their linear_fit makes weighted linear regressions very easy. Unfortunately, the data I'm working with has an error in both the X and Y directions.

I was wondering how this is done practically (in Python) and theoretically (in statistical terms), this will be done.

+6
source share
2 answers

There are several options:

Both of these solutions will account for the independent error in the X and Y directions (scld array in odr).

+3
source

You can use the scipy.optimize.fmin() function ( see this example ) to minimize the dignity function (which you must define) that calculates quadratic deviations in the x and y directions.

0
source

Source: https://habr.com/ru/post/921814/


All Articles