LFD Book Forum  

Go Back   LFD Book Forum > Book Feedback - Learning From Data > Chapter 3 - The Linear Model

Reply
 
Thread Tools Display Modes
  #1  
Old 04-25-2013, 02:28 PM
Xing Wu Xing Wu is offline
Junior Member
 
Join Date: Apr 2013
Posts: 2
Default 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.
Reply With Quote
  #2  
Old 04-25-2013, 10:24 PM
htlin's Avatar
htlin htlin is offline
NTU
 
Join Date: Aug 2009
Location: Taipei, Taiwan
Posts: 601
Default Re: Linear regression question

Quote:
Originally Posted by Xing Wu View Post
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.
Reply With Quote
  #3  
Old 04-26-2013, 08:47 AM
Xing Wu Xing Wu is offline
Junior Member
 
Join Date: Apr 2013
Posts: 2
Default 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.
Reply With Quote
  #4  
Old 04-26-2013, 11:31 PM
Elroch Elroch is offline
Invited Guest
 
Join Date: Mar 2013
Posts: 143
Default 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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 Jump


All times are GMT -7. The time now is 06:55 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
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.