Package Exports
- jarnet
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jarnet) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Backpropagation Algorithm
Example of usage in architecture.js
file
Configuration:
{
epochs: 90,
stopOnError: 0.01, // break iteration when achieved error
neuronNrHidden: 2, // quantity of neurons in hidden layer
learningRate: 0.2,
datasets: [], // array with data arrays with [input, input, output]
logging: true // log info to console
}
Usage:
const Net = require('./');
let net = new Net();
net.setup({
epochs: 90,
neuronNrHidden: 2,
learningRate: 0.2,
datasets: [ [1, 1, 0], [0, 0, 1], [1, 0, 1], [0, 1, 1] ],
logging: true
});
net.train();
net.test(); // compare trained network with provided data for training
net.predict([1, 1]); // => returns 0
// saving model
net.save('trained_network.json');
net.saveSync('trained_network.json');
// loading model
net.load('trained_network.json');
net.loadSync('trained_network.json');