Total Least Squares implementation with Python Reference is here(http://people.duke.edu/~hpgavin/SystemID/CourseNotes/TotalLeastSquares.pdf)