implicit function fit, linear regression with x and y std
In order to solve a weigthed linear regression (with x and y weights), I converted the explicit to implicit expression. We are given (xmean,xstd) , (ymean,ystd) each 1d of length n. The error is given in factor of std (x_z , y_z). The explicit expression is: ymean + y_z * ystd = a * (xmean + x_z * xstd) + b. Implicit expression: x_a * (xmean+x_z*xstd) + (ymean+y_z*ystd) + c == 0. (with a, b = -x_a, -c) In order to enforce this implicit expression, I use a constrain impl_lin_constraint_zero (it could be implemented with LinearConstraint also). Then I use scipy.optimize.minimize on impl_lin_loss
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.