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.