This is an ongoing project intended to make it easier to use neural network creation, genetic algorithms, and other data science and machine learning skills.
Install artificial.js:
npm install artificial.js
yarn add artificial.jsUse the modified unpkg version for your browser:
import { Cell, CellType, NeuralGraph, Sigmoid } from "https://unpkg.com/artificial.js@2.0.0/dist/artificial.min.js"Practical example of use:
import { Cell, CellType, NeuralGraph, Sigmoid } from 'artificial.js'
const g = new NeuralGraph()
// 1. Create cells (neurons)
const i1 = g.addCell(new Cell({ type: CellType.INPUT }))
const i2 = g.addCell(new Cell({ type: CellType.INPUT }))
const out = g.addCell(new Cell({ type: CellType.OUTPUT, activation: Sigmoid }))
// 2.Connect manually
i1.connect(out, 0.5)
i2.connect(out, -0.5)
// 3. Configure graph input and output.
g.setInputCells([i1, i2])
g.setOutputCells([out])
// 4. Run
console.log(g.activate([1, 0]))Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.
This project is free software; you can use, modify, and redistribute it under the terms of the MIT License.