Giter VIP home page Giter VIP logo

artificial-neural-networks's Introduction

An Artificial Neural Network

(in Python!!!)

"A what?"

An artificial neural network (ANN) is an abstract concept in which artificial synapses and neurons are used to predict outcomes and classify data (much like a real brain!). It helps computers "think", if you will, and is today's "hot topic" among deep learning and artificial intelligence enthusiasts. This simple ANN (written in Python 2.7) reads in data from a pre-formatted file and trains the network to classify any given data point as either a 0 or a 1. The provided file hw5data.txt is a collection of 200 x-y points and their respective labels (classifications), courtesy of Microsoft's very own Christopher Bishop.

"Cool! How do I run it?"

To run the ANN, make sure you are in a Python environment (preferably something recent) in which both NumPy and matplotlib is installed. Don't have them? No problem! Just run Python's package manager pip:

pip install -r requirements.txt

which will install the latest NumPy and matplotlib versions.

Note: matplotlib installations have been known to fail in virtual environments on OS X. See here for more details.

Once the dependencies are installed, just run:

python ann.py hw5data.txt h <number of hidden nodes> p <holdout percentage>

where h is followed by the number of nodes in the hidden layer of the network and p is followed by the percentage of the input data to use for testing the network instead of training the network.

Both options can be omitted from the command. The only required parameter is the file to read from. If h is omitted, the network uses 5 nodes in the hidden layer. If p is omitted, the network withholds 20% (0.20) of the input data.

"Neat-o! Can I use my own input?"

If you want to use your own input file, each input line must be in the following format:

<input1> <input2> <output>

For now, you can only have two inputs and one output. If you wish to have more of either, you must adjust the parse_file() function found in ann.py.

"Have you experimented with any of this?"

Heck yeah we did! You can check out the experiments we ran on certain network variables here.

Acknowledgements

artificial-neural-networks's People

Contributors

coderworld10 avatar nickersoft avatar

Watchers

 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.