[issue45766] Add direct proportion option to statistics.linear_regression()

Steven D'Aprano report at bugs.python.org
Sun Nov 21 05:29:56 EST 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Hi Raymond,

I'm satisfied that this should be approved. The code looks good to me 
and in my tests it matches the results from other software.

I don't think there is any need to verify that plain OLS regression 
produces an intercept close to zero. (What counts as close to zero?) If 
users want to check that, they can do so themselves.

Regarding my concern with the coefficient of determination, I don't 
think that's enough of a problem that it should delay adding this 
functionality. I don't know what, if anything, should be done, but in 
the meantime we should approve this new feature.

For the record, an example of the problem can be seen on the last slide 
here:

https://www.azdhs.gov/documents/preparedness/state-laboratory/lab-licensure-certification/technical-resources/calibration-training/09-linear-forced-through-zero-calib.pdf

The computed r**2 of 1.0 is clearly too high for the RTO line.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45766>
_______________________________________


More information about the Python-bugs-list mailing list