This project is a simple neural network made in javascript as known as MLP(Multilayer Perceptron) also.
You can check a example of usage with MNIST Dataset to recognize handwritten human digits.
You have to provide in order: Inputs, Hidden Layers, Output
var nn = new NeuralNetwork(2,4,1);
Feed the training data with the expected label
nn.train([0,0],[0]);
nn.train([1,0],[1]);
nn.train([0,1],[1]);
nn.train([1,1],[0]);
nn.predict([0]);
// console.log: 0.00342487123987
Long story short, a neural network is a universal function aproximator. If you would like to understand better, I really recommend you some articles:
And 3Blue1Brown video serie about neural networks:
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.