#1




Linear regression question
Hello, I have a question about linear regression,
Ax=b, how to find constrained solution, like some elements of x have to be positive. Thank you. 
#2




Re: Linear regression question
One possibility is to minimize Ax  b subject to the constraints of nonnegative x, which is a linear programming problem. If you want to minimize the squared error subject to nonnegative x, it would be a quadratic programming problem. Hope this helps.
__________________
When one teaches, two learn. 
#3




Re: Linear regression question
Yeah, thanks.
But even the constraints are very sparse, I still need linear programming or quadratic programming? Do you have some related papers to recommend? Thank you. 
#4




Re: Linear regression question
If I understand correctly, you have some data you are trying to do linear regression on, but you also have some knowledge of the form of the solution?
Well, first you could find the solution if the constraints were not there. If this happens to satisfy the constraints, you are done. If it doesn't, the solution must lie on the boundary defined by the constraints, given some assumptions. If the constraints are simple enough, you may be able to rewrite your problem with the knowledge that it is on the boundary. For example if you wanted a 1dimensional linear regression solution and knew the intercept with the yaxis had to be positive, but linear regression gave a unique solution with the intercept as negative (due presumably to noise in the data, I believe the constrained solution would have to have an intercept at zero. 
Thread Tools  
Display Modes  

