Hw4 q4
What is the range of a? [1,1] of [INF, +INF] ?

Re: Hw4 q4
From my testing, a is within +/ pi.
This follows from the max/min gradient of sin(pi.x) = pi . cos(pi . x) It is ok to use a larger range, just that the program will run slower. 
Re: Hw4 q4
Thanks, but now I think I've hit another snag. Is the bias in class surely 0.21? My calculation shows it as exactly 0.31...

Re: Hw4 q4
I can't help with that but I have a more basic question. To get ax on two points, do we take the "a" based on the average of the two points
(y1+y2)/(x1+x2) or calculate "a" on each point and take the average? 1/2 (y1/x1 + y2/x2) 
Re: Hw4 q4
The two give very different results, but shouldn't they be equivalent in grading?

Re: Hw4 q4
I don't think (y1+y2)/(x1+x2) is valid, i.e., not the best choice for the line a*x. Maybe 1/2*(y1/x1 + y2/x2) is close but is it correct?
Seems like the way to go is to get a formula for the distance function (squared distance) and then minimize it. The answer from that process differs from 1/2*(y1/x1 + y2/x2). EDIT: Prof. Mostafa posted while I was checking that result. 
Re: Hw4 q4
Quote:

Re: Hw4 q4
Quote:

All times are GMT 7. The time now is 06:39 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. AbuMostafa, Malik MagdonIsmail, and HsuanTien Lin, and participants in the Learning From Data MOOC by Yaser S. AbuMostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.