Socket
Socket
Sign inDemoInstall

@00f100/neuralnetworkjs

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@00f100/neuralnetworkjs

Neural network in JS


Version published
Maintainers
1
Weekly downloads
3
increased by200%

Weekly downloads

Readme

Source

NeuralNetworkJS

Netural network in JS

How to install

$ npm install @00f100/neuralnetworkjs

in HTML file, include script

<script type="text/javascript" src="node_modules/@00f100/neuralnetworkjs/src/neural-network.js"></script>

How to use

in this example, imagine this:

neural network example

// weightSeq are the weights to apply. If null is generated.
var context = {
    weightSeq: null
};

// "matrix" is a list of weights to apply. If the length of the "matrix" list is different from the total "matrix weights", it will be ignored and "context.weightSeq" will be used.
var matrix = [];

// "input" data to input
var input = [1, 5, 20, 4, 204, 43];

// "hiddenColumn" hidden columns of neurons
var hiddenColumn = 3;

// "hiddenRow" hidden rows of neurons
var hiddenRow = 4;

// "outputColumns" output options. Return array integer 0 or 1, ex: [1, 0, 1]
var outputColumns = 3;

// "outputData" is a callback function to see output result
var outputData = function(output) {
    console.log(output); // ex: [1, 0, 1]
}

// Execute neural network
NeuralNetwork.exec(context, matrix, input, hiddenColumn, hiddenRow, outputColumns, outputData);

FAQs

Last updated on 10 Oct 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc