https://github.com/rlidwka/node-fann
FANN (Fast Artificial Neural Network Library) bindings for Node.js
https://github.com/rlidwka/node-fann
Last synced: 9 months ago
JSON representation
FANN (Fast Artificial Neural Network Library) bindings for Node.js
- Host: GitHub
- URL: https://github.com/rlidwka/node-fann
- Owner: rlidwka
- Created: 2011-10-19T23:48:31.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2017-01-11T11:58:51.000Z (almost 9 years ago)
- Last Synced: 2025-04-09T22:12:21.401Z (9 months ago)
- Language: C++
- Homepage:
- Size: 291 KB
- Stars: 185
- Watchers: 13
- Forks: 34
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-ai - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js (Development / Javascript)
- awesome-machine-master - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js (Javascript)
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js **[Deprecated]** (JavaScript / [Tools](#tools-1))
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js (Javascript / Speech Recognition)
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js **[Deprecated]** (JavaScript)
- fucking-awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js **[Deprecated]** (JavaScript / [Tools](#tools-1))
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js **[Deprecated]** (JavaScript / [Tools](#tools-1))
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js (Javascript / Speech Recognition)
- awesome-machine-learning-cn - 官网
- awesome-machine-learning - Node-fann - FANN (Fast Artificial Neural Network Library) bindings for Node.js **[Deprecated]** (JavaScript / [Tools](#tools-1))
README
# node-fann
node-fann is a [FANN](http://leenissen.dk/fann/) bindings for [Node.js](http://nodejs.org).
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
1. Make sure you have `glib2` and `pkg-config` installed.
These are quite popular tools and should be available in your software repository/ports.
2. You will need [FANN library](http://leenissen.dk/fann/wp/download/) version _>= 2.1.0_ (libfann2).
3. Run `npm install fann` to install this package.
## Example
```javascript
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]));
```