Backpropagation neural network source code

Discussion in 'Automated Trading' started by n00b7r4d3r, Nov 3, 2008.

  1. This is the first time I've made one of these so it does not come with a warranty. It seems to work ok so far .. I trained it to tell the difference between pictures of letters.
  2. a
  3. Well, I thought it was cool anyway.

    Do you have a working main that uses these classes?
  4. I do but it is filled with crappy literals and things that i would have to change to make portable, so i chose not to include it.
  5. I built your attached source under MSVC++ 6.0 but had to change your "for (int i=0;..." to "for (i=0;..." and separately declare "int i" at the beginning of one of the functions. It's an annoying MS compiler quirk.

    I'll try it out using the XOR truth table learning problem.
  6. I got it working with the XOR problem.

    Also, I found a fairly recent (2006) posting at CodeProject with a similar goal to yours. It also has momentum implemented.
  7. That is good news. I probably could have just copied one off the internet but I figured it would be better to code up one myself so I would understand exactly what it was doing and would be able to modify it.

    I was surprised that I got it working just because its the kind of thing where you can have one tiny logic error and the whole thing won't work.

    Also translating it from the math notation to code is hard on the head.
  8. dude25


    Hey, this is awesome thread. Have you tested the logic? I am very interested in neural networks and especially using back propagation to couple of my strategies, however I can't code in C yet.:(

    I know little bit of maple and was wondering if it is possible to code in maple? (I have to try at uni when I have some time).

    I am still trying to create the logic and still have to do calc in paper. :(
  9. Hi,

    the class looks really great. I will check if it will work as a simple strategy, or maybe integrate as a threshold-indicator for an existing strategy to confirm entering the market.

    Thanks for your work,
  10. These (and many other) algorithms are readily available (for free) within the R language ( Since it's open source, you can also take the C source code directly and use it in your own projects.
    #10     Jan 7, 2009