Giter VIP home page Giter VIP logo

neuralnetwork-xor's Introduction

#Project: XOR Learning Neural Network #Author: Ricky-N

I used Anaconda for this which includes the numpy library and can be downloaded from a quick search
The code is a nearly direct translation into python of the code from this book:

###Code Your Own Neural Network: A step-by-step explanation
###Stephen C. Shaffer
###Kindle Edition
###Sold by Amazon Digital Services, Inc

Though it is quite short, it is also quite cheap and in my opinion worth a pick up. Some liberties have been taken to clean up the code and threshold / weight matrices a little. Note that no real effort was made on the part of efficiency in either processing or memory use.

Basically:
The network class is a good generalization for a neural net with a single arbitrarily large layer of hidden nodes connecting an arbitrary number of input and output nodes. These can be set among the other parameters at the top.

The sampleMaker is tightly coupled with the network class and changes the input values and expected output values each iteration to the next xor input set. It is a decent design to separate this functionality out as it is very function specific and should not be included in the network directly, though one could argue it would be better to have the network be instantiated with a sampleMaker instead of the other way around.

An instance of each class is created and the main loop of the program steps through:
1. set the next input and expected output
2. evaluate the hidden and output layers of the network based on input
3. calculate current error and update thresholds and weights

neuralnetwork-xor's People

Watchers

Marzuk Kamal avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.