alcalyn/neural-network

Create a multilayer perceptron and make it learn life.

dev-master 2017-04-11 16:13 UTC

This package is not auto-updated.

Last update: 2024-12-13 21:35:33 UTC


README

Create a multilayer perceptron and make it learn.

Usage

use Alcalyn\NeuralNetwork\Network;

# Creates a new multilayer perceptron
$network = new Network([2, 4, 1]);

# Takes an input and let it cogitate
$network->pulseInput([1, 0]); # Returns an array as output

# Takes an array of tuples input/expected output
# and adjust the network one iteration to adapt the output the expected result
$network->trainInput([[1, 0], [1]]); # Returns an array as output

Examples

License

This library is under MIT License.