joelgrus / data-science-from-scratch

code for Data Science From Scratch book
MIT License
8.71k stars 4.52k forks source link

No example for minimize_stochastic #22

Open lafaulx opened 8 years ago

lafaulx commented 8 years ago

There's no example for minimize_stochastic function and it's not clear how to use it – in batch functions you're able to pass anything as target_fn – for minimize_stochastic you should pass function that accepts 3 params+ and one of them is y (which I believe is supposed to be the value of target_fn(x)) – where am I wrong and how should I use it?

TBOS87 commented 6 years ago

Hi,

I am having the same problem. A theta parameter is required in the stocastic minimizer. Should I just set up random values?

TBOS87 commented 6 years ago

sorry, I was to quick: i found an example with a theta put on random initial values on page 176