Hey Ben, It's the same problem.
user> (incanter/exp (incanter/minus 3254604.9658621363)) 0.0 But it's not the functions. It's the math. Euler's number 2.71828... raised to the power of 3254604.9658621363, gives Infinity. So for my neural net's activation func, either i) I shouldn't used a sigmoid, or ii) my linear combiner needs to keep values within a certain bound. My neuron inputs are below. And it's the bid and sk volumes and the long time value that's giving me such a large number. - 1.3239 (bid price) - 1.32379 (ask price) - 3000000.0 (bid volume) - 2250000.0 (ask volume) - 1335902400676 ( #<DateTime 2012-05-01T20:00:00.676Z> long value) I just had the idea to try a Gaussian or tanh activation function. I think this is the point where I'll give clojure-encog<https://github.com/jimpil/clojure-encog>a whirl. I have a feeling I'll be running into a lot of these data and other algorithmic problems. And it'd be good to work with something that has already dealt with these issues. I still don't know if I need to normalize my input data, how to untangle the activation result for back propagation, etc. Any insights are welcome. Tim Washington Interruptsoftware.ca 416.843.9060 On Sat, Jul 28, 2012 at 7:44 PM, Ben Mabey <b...@benmabey.com> wrote: > On 7/28/12 4:52 PM, Timothy Washington wrote: > > Hey Jim, > > Encog does look very interesting. Right now, I'm trying (and failing) to > implement the sigmoid function. I'm using wikipedia's > reference<http://en.wikipedia.org/wiki/Sigmoid_function>, > and trying to use Incanter's (incanter/exp) function, but Incanter's > function doesn't seem to work: > > user> user> (incanter/exp -3254604.9658621363) > 0.0 > user> user> (incanter/exp 3254604.9658621363) > Infinity > > > Try this... > > (use 'incanter.core) > => (defn sigmoid [z] > (div 1 (plus 1 (exp (minus z))))) > => (sigmoid 0) > 0.5 > => (sigmoid 7) > 0.9990889488055994 > => (sigmoid 112) > 1.0 > => (sigmoid -112) > 2.285693676718672E-49 > > > If you want the library to be fast you will want to be using primitives or > use the underlying colt API.. for learning purposes you don't really need > to worry about that though. > > HTH, > Ben > -- 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