Skip to content

Simple neural network library for browser and Node.js. Work in Progress.

License

Notifications You must be signed in to change notification settings

ajlopez/SimpleNeuron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleNeuron

Simple neural network library for browser and Node.js. Work in Progress.

Installation

Via npm on Node:

npm install simpleneuron

Usage

Reference in your program:

var sn = require('simpleneuron');

Create a neuron

var neuron = sn.neuron();

It is a simple threshold neuron with trigger value = 1.

Connect a neuron with other neuron

var neuron = sn.neuron();
var input = sn.neuron();
neuron.input(input);

The input has weight 1

Connect a neuron with other neuron using a weight value

var neuron = sn.neuron();
var input = sn.neuron();
neuron.input(input, -0.5);

The input has weight -0.5.

Set the output value of neuron:

neuron.output(1);

Usually, this method is used to set the initial neuron layer values.

Get the output value of a neuron:

var result = neuron.output();

Create a network of neurons, with three layers, containing 4, 15, 3 neurons. The weights are random values between -1 and 1:

var network = ss.network([4, 15, 3]);

Get the number of neurons in a network:

var count = network.neurons();

In the previous created network, the count is 4+15+3 == 22.

Get the number of neurons in a layer:

var count0 = network.neurons(0); // 4
var count1 = network.neurons(1); // 15
var count2 = network.neurons(2); // 3

TBD

Development

git clone git://github.com/ajlopez/SimpleNeuron.git
cd SimpleNeuron
npm install
npm test

Samples

TBD

Versions

  • 0.0.1 Published

License

MIT

References

Books

  • Neural Networks, Simon Haykin
  • Fundamentals of Deep Learning, Nikhil Buduma (2017, O’Reilly)
  • Anthony L. Caterini, Dong Eui Chang - Deep Neural Networks in a Mathematical Framework (2018, Springer)
  • Charu C. Aggarwal - Neural Networks and Deep Learning. A Textbook (2018, Springer)
  • Ian Goodfellow, Yoshua Bengio, Aaron Courville - Deep Learning (2016, The MIT Press)

Contribution

Feel free to file issues and submit pull requests — contributions are welcome<

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.

About

Simple neural network library for browser and Node.js. Work in Progress.

Resources

License

Stars

Watchers

Forks

Packages