These are chat archives for uwhpsc-2016/uwhpsc-2016

22nd
Apr 2016
alyfarahat
@alyfarahat
Apr 22 2016 06:24
This message was deleted
nishalad95
@nishalad95
Apr 22 2016 17:29
Hi, I'm trying to figure out what we need to plot for question 2 involving cosine(x). If we have an initial guess of x0 = 0.1 then pass that through the gradient_step() we only get one value out .... how can we plot the rest? or am i misinterpreting the question? do we need to catch the values that are outputted from gradient_step() ? surely there is a much quicker way to do this than feeding in each value into gradient_step(). I know that gradient_descent catches the updated values so then do we have to somehow store them in an array and then plot them? My confusion is that gradient descent returns 1 value and so does gradient_step, so i'm not sure how to extract multiples values to plot. If we change what gradient_descent() returns then doesn't this effect what Chris's tests will output ok or fail ?
mvelegar
@mvelegar
Apr 22 2016 17:58
@nishalad95 One way of doing this is calling gradient_step in a while loop from Jupyter notebook, and saving each new iterate in a Python list. This will be a similar while loop as the one in gradient_descent. The tests do expect one value returned (the final iterate or the global minimum), so you are correct in assuming that your gradient_descent should not return a Python list/array.
@nishalad95 I am suggesting using the Jupyter notebook, since @cswiercz has demonstrated how to generate your pdf report using this in class.
@nishalad95 with the cosine function and a "good" sigma value it should not be too slow to call gradient_step multiple times till it reaches the global minimum
nishalad95
@nishalad95
Apr 22 2016 18:02
This makes more sense now. I will try that out. Thank you!
mvelegar
@mvelegar
Apr 22 2016 18:03
Good luck!
nishalad95
@nishalad95
Apr 22 2016 23:09
I can no longer push things up to github, after I type in 'git push origin master' and hit enter the terminal crashes
nishalad95
@nishalad95
Apr 22 2016 23:55
I keep getting this error and i'm not sure what to do. "Your branch is ahead of 'origin/master' by X commits. (use "git push" to publish your local commits)"
Hugh Krogh-Freeman
@hughkf
Apr 22 2016 23:57
@nishalad95 sometimes SageMathCloud has hickups. I suggest emailing their support if you see things crash. The other message about your branch being ahead means that your local code is newer than the code in Github. You need to push the code to github. Just do "git push". You probably need to set your email and name in Git first.