fwd-ann is a Feedforward Artificial Neural Network Library developed with TypeScript.
This project was started as experiment to explore TypeScript abilities to be used in
data processing tasks. You can use this library for experimental data processing on Node.js
server or in a browser. Very early version of this library was successfully used in AMAKids
company as core for building browser games results analyzer platform.
npm i --save fwd-ann
Go to the
src/examples to explore examples. To run example run
your console. Better way to understand how this library works is to explore these examples.
Another good way to understand this library — explore
src library and create
small projects. Feel free to create anything you want using this library!
Below you can find short introduction to the API. It will help you to get
enum represents possible types of ANN's layers. There are three possible types:
These types are used to create ANN's instance with aim architecture.
Activation function determines how signals will be modified in
neurons. There are lots of
available activation functions:
- ...and so on
Signals class represents numbers vector that can be used as input for
ANN (Artificial Neural Network). To create
Signals you simply should pass numbers array
Signals.create static method:
You can also create
Signals by passing
Signal's class constructor.
Matrix is a
special class that you can import from
You can pass second (optional) parameter to the
Signals's constructor that
represents names for every passed signal. In some cases it is useful to have signals' names.
ANN object you can use
ANN class or
createANN utility. Prefer second one.
ANN instance represents Artificial Neural Network that can be taught by
and used to process some input
Signals and respond with some output
First parameter represents
data of the Neural Network. Second parameter (optional) represents
parameters such as
Teacher is that core thing that teaches your Neural Network to perform
some actions you need.
Teacher's API is vary simple and allows you concentrate on
data and behavior but not on the teaching process implementation.
Teacher mutates your
Pull requests are welcome. You can use this code freely for your own projects and/or experiments. If you have some questions or proposals feel free to message me.