Package Exports
- fann
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 (fann) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
node-fann
node-fann is a FANN bindings for Node.js.
FANN (Fast Artificial Neural Network Library) is a free open source neural network library, which implements multilayer artificial neural networks with support for both fully connected and sparsely connected networks.
Installation
Make sure you have
glib2andpkg-configinstalled.These are quite popular tools and should be available in your software repository/ports.
You will need FANN library version >= 2.1.0 (libfann2).
Run
npm install fannto install this package.
Example
var fann = require('fann');
var net = new fann.standard(2,3,1);
var data = [
[[0, 0], [0]],
[[0, 1], [1]],
[[1, 0], [1]],
[[1, 1], [0]],
];
net.train(data, {error: 0.00001});
console.log("xor test (0,0) -> ", net.run([0, 0]));
console.log("xor test (1,0) -> ", net.run([1, 0]));
console.log("xor test (0,1) -> ", net.run([0, 1]));
console.log("xor test (1,1) -> ", net.run([1, 1]));