# aneron

> minimalist neural network library

Latest version **1.0.1** (published 2020-07-31) · ISC license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2020-07-31 |
| First published | 2020-07-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 97.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | muhammad mauludin anwar |
| Maintainers | mauludin |

## Links

- npm: https://www.npmjs.com/package/aneron
- npm.io page: https://npm.io/package/aneron

## Recent versions

- 1.0.1 (latest) — 2020-07-31
- 1.0.0 — 2020-07-31

## README

![logo](https://cdn.jsdelivr.net/npm/aneron@1.0.0/img/logo.jpg)
# Mouludin - Aneron v1.0.0 (Beta)


Minimalist neural network library for machine learning &amp; deep learning in Javascript

## Getting started

### Node.JS
If using on node.js you need to install via npm in your terminal / command prompt.
 
```bash
  $ npm i aneron
```

### Embeded HTML
```html
  <script src="https://cdn.jsdelivr.net/npm/aneron@1.0.0/aneron.min.js"></script>
```



## How to use this library?


if you use node.js you need to import it first

```js
  let Ane = require('aneron')
```

### Example XOR problem


#### Determine the layers:

![example](https://cdn.jsdelivr.net/npm/aneron@1.0.0/img/input.jpg)

```js
 let ac = Ane.ac
 let model = new Ane([2],[2,ac.sigmoid],[1,ac.sigmoid])
```
You can give more than 3 layers. it depends on how much you need.
Note: minimum is 3 layers

I have provided some activation functions that you can use:

  * sigmoid (Range = (0,1))
```js
Ane.ac.sigmoid
```

  * hyperbolic tangent / tanh (Range = (-1,1))
```js
Ane.ac.tanh
```

  * softsign (Range = (-1,1))
```js
Ane.ac.softsign
```

#### Training data:

![table](https://cdn.jsdelivr.net/npm/aneron@1.0.0/img/xor_table.png)

```js

  // DATASET
  // input 
  let xs = [[0,0],[0,1],[1,1],[1,0]]
  //output
  let ys = [[0],[1],[0],[1]]
  
  // epochs is the entire processing by the learning algorithm of the entire train-set.
  model.fit(xs,ys,{epochs:10000})
```
Note: the greater the number of epohcs. the smaller errors you get


#### Prediction:
```js
 console.log(model.predict([0,0]))
 console.log(model.predict([0,1]))
 console.log(model.predict([1,1]))
 console.log(model.predict([1,0]))
```


#### Output:
```js
[ 0.014714430876991562 ]
[ 0.9852129041526403 ]
[ 0.018262319885759194 ]
[ 0.985212848886903 ]
```

## that is a simple example of using this library


## Authors

* **Muhammad Mauludin Anwar** - *Initial work* - [mouludin](https://github.com/mouludin)

## License

This project is licensed under the terms of the MIT license, see LICENSE.

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