pst is printstacktrace, it's in the clojure.repl namespace and comes with clojure. Sometimes lein or something makes it available automatically, but if it isn't, you can (use 'clojure.repl) to get to it. http://clojure.github.io/clojure/clojure.repl-api.html#clojure.repl/pst
Yes, switching to mapv (map into a vector) instead of map (lazy-seqs) prevents laziness from building up while keeping the same semantics. On Mon, Jun 24, 2013 at 9:03 AM, P Martin <prof.pmarti...@gmail.com> wrote: > Thanks a lot for tracing through my code! So, as I understand it, my > loop/recur is correct, but I was not using map in a correct way within the > vector functions. > > By the way, what is your (pst e*) line doing? Is that from a debugging > library? I don't appear to have that in my clojure environment. > > Patrick > > > On Friday, June 21, 2013 4:06:28 PM UTC-4, P Martin wrote: >> >> Hi, >> >> I am new to clojure and I am trying to reimplement some optimization code >> that uses gradient descent. I have attached the source to this post. My >> experience with gradient descent is in Matlab, which is procedural. >> >> When I run my function gradient-descent I supply step sizes and error >> values of 0.01, it runs correctly and gives me good results. However, if I >> decrease the error value below 0.001 it produces a stack overflow error. I >> get the same error if my step value goes down to 0.001. >> >> Is my looping mechanism correct and I am just having numerical >> limitations? Am I abusing loop/recur? Any suggestions/critiques would be >> great! >> >> Thanks, >> Patrick >> > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.