Joint Application of Least Squares and Finite Element Approximation Principles in Regression Analysis