0.0.1 • Published 6 years ago

polynet v0.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

polynet

A neural network library for Node

Usage

const PolyNet = require("./");

const network = new PolyNet(2, 3, 2);

network.train([
	[ [ 0, 1 ], [ 1, 0 ] ],
	[ [ 1, 1 ], [ 0, 0 ] ],
	[ [ 1, 0 ], [ 0, 1 ] ],
	[ [ 0, 0 ], [ 1, 1 ] ]
]);

const inputs = 	[
	[ 0, 1 ],
	[ 1, 1 ],
	[ 1, 0 ],
	[ 0, 0 ]
];

for(const input of inputs) {
	console.log(input, network.update(input));
}