简体   繁体   中英

Is numpy.polyfit with 1 degree of fitting, TLS or OLS?

I have two timeseries x and y, both have the same length. Using numpy.polyfit , I fit a straight line through the data with:

numpy.polyfit(x,y,1)

Is this Total Least Squares (TLS) or Ordinary Least Squares (OLS) ? I want to fit a TLS in python, how can this be done?

您可以使用scipy.odr它将计算应等于 tls 的正交回归。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM