LFD Book Forum *ANSWER* Question 2
 User Name Remember Me? Password
 FAQ Calendar Mark Forums Read

 Thread Tools Display Modes
#1
05-07-2013, 01:33 PM
 Ziad Hatahet Member Join Date: Apr 2013 Location: San Francisco, CA Posts: 23
*ANSWER* Question 2

Plugging in gives the following plot: http://www.wolframalpha.com/input/?i=x%5E2-y%5E2+%3D+1

Yet, it seems that choice [e] was incorrect according to the answer key. But choice [d] (as per the answer key) gives the following plot: http://www.wolframalpha.com/input/?i...%2By%5E2+%3D+1

What am I missing?
#2
05-07-2013, 02:01 PM
 Michael Reach Senior Member Join Date: Apr 2013 Location: Baltimore, Maryland, USA Posts: 71
Re: *ANSWER* Question 2

I think you are adding the constant term on the wrong side of the equation.
w0*1 + w1*x^2 + w2*y^2
To get these to add up to +1 in the middle of the plot (x=0, y=0, say), we'll need w0 = -1.
Then to get negative values as x increases ( --> -1 on the right side of of the plot), we'll need w1 to be negative. And so on.
#3
05-07-2013, 02:06 PM
 dlammerts Junior Member Join Date: Apr 2013 Location: San Mateo, CA Posts: 6
Re: *ANSWER* Question 2

Ziad,
I made the same mistake and finally figured out that the shape of the hyperbolas in your two plots is determined by the fact that your w0 is negative (just rearrange your formulas into the h = sign(w0 + w1*x1^2 + w2*x2^2) form to see this). The "inner" part of your hyperbolas assumes the value -1 instead of +1 as required. If your plot answer [d] with a positive w0, which makes the inner region assume the value +1, then the the orientation of the hyperbolas flips to the required shape:
http://www.wolframalpha.com/input/?i...Bx2%5E2+%3D-+1

Dirk
#4
05-07-2013, 02:07 PM
 Elroch Invited Guest Join Date: Mar 2013 Posts: 143
Re: *ANSWER* Question 2

What happens if you shunt everything to the same side of the equation?

[EDIT: snap, Michael ]
#5
05-07-2013, 03:40 PM
 Ziad Hatahet Member Join Date: Apr 2013 Location: San Francisco, CA Posts: 23
Re: *ANSWER* Question 2

Thank you everyone for the replies. It is somewhat annoying to make a mistake on an "easy" question
#6
05-07-2013, 08:35 PM
 Michael Reach Senior Member Join Date: Apr 2013 Location: Baltimore, Maryland, USA Posts: 71
Re: *ANSWER* Question 2

Join the club! Throughout the course, I have struggled on the programming problems and generally get them right eventually - and consistently get half of the "easy" ones wrong on some dumb mistake or another.

 Thread Tools Display Modes Linear 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 12:47 AM.

 Contact Us - LFD Book - Top

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.