Skip to content

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.

License

Notifications You must be signed in to change notification settings

artificial-js/artificial.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


artificial.js


npm version npm downloads

About

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.

Example usage

Install artificial.js:

npm install artificial.js
yarn add artificial.js

Use 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]))

Quick Links

Contributing

Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.

License

This project is free software; you can use, modify, and redistribute it under the terms of the MIT License.

About

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.

Topics

Resources

License

Stars

Watchers

Forks