Skip to content

A fully connected Artificial Neural Network implementation.

Notifications You must be signed in to change notification settings

mcjcloud/NeuralNetworkJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralNetworkJS

NeuralNetworkJS is a simple library to demonstrate supervised learning with an Artificial Neural Network. The library allows you to create a NeuralNetwork object which represents a fully connected network of an arbitrary size.

How to Install

  1. First clone the repository into the node_modules folder of your npm project: git clone https://github.com/mcjcloud/NeuralNetworkJS.git

  2. Install the dependencies: cd NeuralNetworkJS && npm install

How to Use

From your code:

const NeuralNetwork = require('NeuralNetworkJS');

var nn = new NeuralNetwork([3, 3, 2]);

The input for this constructor is an array of layer sizes. The size of the array is the number of layers (including the input and output layer), and each number in the array is the number of nodes in that layer.

Feedfoward data

// input is an array of numbers which is fed into the input layer
nn.feedforward([0, 1, 1]);

Train using back-propogation

// the first array is the input data and the second is the expected output data
nn.train([0, 1, 1], [0.5, 0.5]);

About

A fully connected Artificial Neural Network implementation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published