Does anyone know where I can find some sample codes about the NN Back propagation for XOR
,
that I can also test the system after it was trained?
Preferably in C++ or MATLAB.
Does anyone know where I can find some sample codes about the NN Back propagation for XOR
,
that I can also test the system after it was trained?
Preferably in C++ or MATLAB.
I recommend 'Step by Step Guide to Implementing a Neural Network in C' by John A. Bullinaria.
This is very simple walk through on how to implement a multi-layer neural network that's capable of learning how to XOR.
The code introduced in the article is in C, which is very easy to understand. Most 'introduction-to-neural-network' articles on the web are Object-Oriented-based and comes in form of reusable libraries, which may make them harder to be understood and get started with.
Try this sample NN backpropagation code from the textbook, Machine Learning. It is also in C.
You've gotten a few answers dealing with C code, so here's an XOR demo for MATLAB. The demo is written for an older version of MATLAB (ver. 6) and requires the Neural Network Toolbox, but should hopefully still give you some ideas on how to implement the network.
EDIT: For more general information on backpropagation algorithms in the Neural Network Toolbox, I would suggest the online documentation at The MathWorks website.