 LFD Book Forum Linear regression question
 Register FAQ Calendar Mark Forums Read

#1
 Xing Wu Junior Member Join Date: Apr 2013 Posts: 2 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 htlin NTU Join Date: Aug 2009 Location: Taipei, Taiwan Posts: 610 Re: Linear regression question

Quote:
 Originally Posted by Xing Wu 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.
One possibility is to minimize |Ax - b| subject to the constraints of non-negative x, which is a linear programming problem. If you want to minimize the squared error subject to non-negative x, it would be a quadratic programming problem. Hope this helps.
__________________
When one teaches, two learn.
#3
 Xing Wu Junior Member Join Date: Apr 2013 Posts: 2 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
 Elroch Invited Guest Join Date: Mar 2013 Posts: 143 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 1-dimensional linear regression solution and knew the intercept with the y-axis 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 Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home General     General Discussion of Machine Learning     Free Additional Material         Dynamic e-Chapters         Dynamic e-Appendices Course Discussions     Online LFD course         General comments on the course         Homework 1         Homework 2         Homework 3         Homework 4         Homework 5         Homework 6         Homework 7         Homework 8         The Final         Create New Homework Problems Book Feedback - Learning From Data     General comments on the book     Chapter 1 - The Learning Problem     Chapter 2 - Training versus Testing     Chapter 3 - The Linear Model     Chapter 4 - Overfitting     Chapter 5 - Three Learning Principles     e-Chapter 6 - Similarity Based Methods     e-Chapter 7 - Neural Networks     e-Chapter 8 - Support Vector Machines     e-Chapter 9 - Learning Aides     Appendix and Notation     e-Appendices

All times are GMT -7. The time now is 05:01 PM. The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.