LFD Book Forum  

Go Back   LFD Book Forum > Course Discussions > Online LFD course > Homework 5

Reply
 
Thread Tools Display Modes
  #1  
Old 05-05-2012, 11:14 AM
lucag lucag is offline
Member
 
Join Date: Apr 2012
Posts: 44
Default HW5 Q8~9: Is the line a straight line?

In homework 5, questions 8 and 9, is the random line to be chosen as a target function f(x) a straight line?
I feel it's a rather silly question ... but I am somewhat confused on what target function to pick.
Reply With Quote
  #2  
Old 05-05-2012, 11:20 AM
kkkkk kkkkk is offline
Invited Guest
 
Join Date: Mar 2012
Posts: 71
Default Re: HW5 Q8~9: Is the line a straight line?

Yes, it is a straight line.
Reply With Quote
  #3  
Old 05-05-2012, 05:58 PM
mathprof mathprof is offline
Invited Guest
 
Join Date: Apr 2012
Location: Bakersfield, California
Posts: 36
Default Re: HW5 Q8~9: Is the line a straight line?

.. Unless someone left the line out in the rain; then it may warp, and no longer be straight.
Reply With Quote
  #4  
Old 05-07-2012, 02:37 AM
ehaussmann ehaussmann is offline
Junior Member
 
Join Date: Apr 2012
Posts: 5
Default Re: HW5 Q8~9: Is the line a straight line?

Am I missing something or is the name f(x) a bit misleading? In the slides for logistic regression f(x) is explicitly referred to as a probability. However in the exercise it is a linear function that may also take negative function values.

It seems the function f(x) corresponds to the line that is learned inside the sigmoid function, but that's not the final g(x) we are learning (which should approximate f(x) ) ?
Reply With Quote
  #5  
Old 05-07-2012, 11:56 AM
mic00 mic00 is offline
Invited Guest
 
Join Date: Apr 2012
Posts: 49
Default Re: HW5 Q8~9: Is the line a straight line?

Quote:
Originally Posted by ehaussmann View Post
Am I missing something or is the name f(x) a bit misleading? In the slides for logistic regression f(x) is explicitly referred to as a probability. However in the exercise it is a linear function that may also take negative function values.

It seems the function f(x) corresponds to the line that is learned inside the sigmoid function, but that's not the final g(x) we are learning (which should approximate f(x) ) ?
The presence of f in the problem description may be a little confusing, since it hardly plays a role. f(x) is indeed a probability: P(y | x) is written in terms of it. Specifically, P(y=+1 | x) = f(x), and P(y=-1 | x) = 1 - f(x). But the problem description specifies a very simple f(x): it is always 1 on one side of the line, and always 0 on the other side. In other words, if we are on one side of the line, the "probability" that y will be +1 is exactly 1.0, and if we are on the other, the "probability" that y will be -1 is also exactly 1.0. Suppose it were a little different, say, f(x)=0.95 on one side of the line, and f(x) = 0.05 on the other. That would mean that, as you generate sample points, there is a little bit of noisiness -- the data are (probably) not linearly separable. Logistic regression is interesting because it attempts to predict probabilistic targets like this (hence the sigmoid function, which maps x*w to a probability).

In this problem, though, stochastic gradient descent is the focus. The fact that probabilities are involved is only really interesting because of the error function: if the data are linearly separable (as they are here), but E_in is not zero, then it has behaved differently from PLA, even if its goal is the same here.
Reply With Quote
  #6  
Old 05-08-2012, 06:16 AM
ehaussmann ehaussmann is offline
Junior Member
 
Join Date: Apr 2012
Posts: 5
Default Re: HW5 Q8~9: Is the line a straight line?

Thank you for clarifying. Meanwhile I realized that the excercise just utilizes a straight line to define f(x), but f(x) itself is not the straight line...

In hindsight things are (almost) always obvious
Reply With Quote
Reply

Tags
hw5, logistic regression

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 08:27 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, 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.