UNPKG

neural-network-node

Version:

A simple neural network coded from scratch with no external modules. Lets you train your own neural network in a simple and easy to learn way.

11 lines (8 loc) 172 B
function sigmoid(x) { return 1 / (1 + Math.exp(-x)); } function dsigmoid(y) { return y * (1 - y); } exports.sigmoid = sigmoid; exports.dsigmoid = dsigmoid;