Hi Tim, According to : http://www.heatonresearch.com/content/encog-30-article-2-design-goals-overview
encog 3 should have descent support for any temporal (time-series) based prediction support in particular for financial predictions...I'm afraid however that the only example that I've ported to clojure-encog which uses temporal data is the sunspot example (SVM not NN). Also, you shouldn't have any problems with the data (most likely you need to normalize them - I usually find (-1 1) or (0 1) to work best. for an example of how exactly you would do it look for "PREDICT-SUNSPOT-SVM" here: https://github.com/jimpil/clojure-encog/blob/master/src/clojure_encog/examples.clj these 2 lines do all the job with regards to your input data: normalizedSunspots (prepare :array-range nil nil :raw-seq spots :ceiling 0.9 :floor 0.1) train-set ((make-data :temporal-window normalizedSunspots) window-size 1) As far as algorimthmic problems go encog has been around for quite a while...even though I don't necessarily agree with all the design decisions made along the way I find it is a rather mature lib...of course it is written in Java so being large means it is a bit of a mess! also there is a lot of duplication in random places...anyways, what I'm trying to say is: if you've got a specific example in mind, (like the financial prediction) maybe it's worth trying it out using clojure-encog or the encog-workbench (the gui) or any other already-made lib and see how it goes...writing your own will certainly teach you loads but it might take a while until you actually test what you want to test... Normalisation, randomisation or both are almost always needed... Hope that helps... Jim On Sun, Jul 29, 2012 at 5:41 PM, Timothy Washington <twash...@gmail.com>wrote: > 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 > -- 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