This is a port of Daniel's Toy Neural Nework from CodingTrain. Source found here: https://github.com/CodingTrain/Toy-Neural-Network-JS/blob/master/lib/nn.js https://github.com/CodingTrain/Toy-Neural-Network-JS/blob/master/lib/matrix.js