|
I wont place my code, but I basically just took over what was shown in the video for hw5-3. Funnily enough I get:
I have tried to vary the style a bit to get different results, but I keep getting similar issues. If I just check Thrun's formula I think there is nothing wrong with it, but a direct implementation seem to be not working. Anyone that has seen something similar or just has a general tip for what I am doing wrong? |
|
Okay, I just spent a large amount of time facing the same problem and I finally solved it. The new update procedures that Sebastian talks about in the homework video are to be added to the old update procedures. NOTE: The new equations have to be added, they don't replace either of the original update steps If you do what I did, which was to replace one of the original steps, then your answer will blow up to a really large number. Judging by your output, that's exactly what happened. And I just noticed you solved your own problem 25 mins before I did. Yay! So much time I will never get back. 1
The weight_data is set to 0.0 by default. Does that need to be changed? @bayowulf... I belive no, but I'm not sure. 1
@yoshi ... weight_data=0.0 seems to work. I passed the 2 test cases using the default for weight_data=0.0. I probably failed a few attempts because I had changed it to 0.1. I suppose that since four data points are totally fixed there is no need for the remainder to influence the curve. Thanks @bayowulf, @yoshi! I have the habit of copying other examples and modifying them to work, but I tend to miss tiny differences like that. Spent a bunch of time trying to figure out what was wrong when I saw your comments. I thought I was modifying the new data points, but found out I was clobbering my old value and not actually updating properly. This caused my answers to grow very quickly. This helped me find the bug in my logic! @yoshi - I wish I could buy you two tickets to that thing you like - thank you. I was so close to the answer before this dawned on me. Thank you thank you thank you! This question was tricky for me because it was hard to debug the intermediate steps, but what I did managed to do was print them out for say, step 3, 4, or 5 incrementally (as the whole output was unwieldy) and watch them approach the correct vales. Thank you, thank you. That makes all the difference. Why didn't I check the forum before pulling my hair out for hours trying to see where I had gone wrong! Thank you, thank you! I should learn to check the forum earlier when I am tearing my hair out over a problem for hours. Ditto. |
|
Read the comments on top of the code, they say apply ... and the formulas presented in the video. Also consider http://www.udacity-forums.com/cs373/questions/24337/homework-5-3-update-formulas Thanks!! I didn't read it carefully. That was precisely the problem. I hate when I do this :) 1
Lol, Ruslan, you saved me again! Minus one for me for lack of reading skills. To the original person who wrote the question: I got similar numbers until I read the line "# You will need to use ..." and followed those instructions carefully. Do we need to use the equations from gradient descent for fixed points also? Sebatian implements that in his code as well with |
|
Answer is to look in the notes of the program itself. |
|
I had exactly the same problem - took me a while to figure out what's wrong. |
Could you format your output please? Select your output and hit the 1010 button.
Alright, I see what I missed there. Tip for the next person: look in the notes for the word: AND.
D'oh!
Just a clarification needed - when Prof says 'points like these' did he mean points either side of the fixed points? He speaks faster at times and I am listening it repeatedly but he remains elusive ;)
No, rukacity, he means ALL non-fixed points. I admit, at first it was a little confusing.