https://bagelmobestcheapprice.blogspot.com/2022/11/least-linear-squares.html