# fann

> FANN (Fast Artificial Neural Network Library) bindings for Node.js

Latest version **1.0.0** (published 2015-05-09) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install fann
pnpm add fann
yarn add fann
bun add fann
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-09 |
| First published | 2012-08-25 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 183 |
| Author | Alex Kocharin |
| Maintainers | rlidwka |
| Keywords | fann, neural, network, artificial, intelligence, neural network, artificial intelligence, machine learning |

## Links

- npm: https://www.npmjs.com/package/fann
- Repository: https://github.com/rlidwka/node-fann
- Issues: https://github.com/rlidwka/node-fann/issues
- npm.io page: https://npm.io/package/fann

## Dependencies (1)

- [nan](https://npm.io/package/nan.md) ~1.8

## Recent versions

- 1.0.0 (latest) — 2015-05-09
- 0.2.4 — 2014-11-15
- 0.2.3 — 2013-11-22
- 0.2.2 — 2013-09-20
- 0.2.1 — 2013-08-01
- 0.1.0 — 2012-08-25

## 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]));
```

---
_Source: https://npm.io/package/fann · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
