raykeating / simpleneuralnet Goto Github PK
View Code? Open in Web Editor NEWA simple neural network that only uses numPy and Python. The model attempts to learn the parity of a bit string
A simple neural network that only uses numPy and Python. The model attempts to learn the parity of a bit string
Using a Neural Network as a parity bit checking system - Dec 2nd, 2021 Brock University COSC3P71 ------------------------------------------------------------------------------- Numpy ------------------------------------------------------------------------------- This project is built with the help of numpy, so if you don't already have it installed you can install it using the pip installer. Type "pip3 install numpy" or "pip install numpy" ------------------------------------------------------------------------------- Execution Instructions ------------------------------------------------------------------------------- To run: 1. Navigate to the assignment folder in your terminal 2. Type the command "python3 main.py" or "python main.py" If numpy isn't found by your terminal, what worked for me (on linux) was the command "/bin/python3 main.py" ------------------------------------------------------------------------------- Changing Parameters ------------------------------------------------------------------------------- All of the neural net related parameters can be changed in the main method. The layer sizes can be changed with the layer_sizes tuple (Note: the third value, the output layer size, must be 1) The training_examples variable is a list of decimal integers to be converted into binary and used to generate inputs and expected ouputs to the network during training. The testing_examples is the same thing, but for testing. The epochs and learning rate are pretty self-explanatory. ------------------------------------------------------------------------------- Note ------------------------------------------------------------------------------ Although the network was able to memorize training examples with 100% accuracy, I wasn't able to get it to generalize to work on new examples (testing_data). I'm not really sure why. I believe my backpropagation algorithm is working well, since the mean squared error goes down epoch-to-epoch. I've tried multiple things to prevent overfitting, nothing seemed to work though. Anyways, the general idea is there and it does kind of work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.