neural-sense
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

NeuralSense

Installation

With NPM:

npm i neural-sense

Usage

import NeuralSense from 'neural-sense';

Examples

XOR:

import NeuralSense from 'neural-sense';

const networkSettings = {
	inputNeurons: 2,
	hiddenLayers: [2],
	bias: false,
};

const trainingSettings = {
	dataset: [ // XOR
		[1, 1, 0],
		[0, 1, 1],
		[1, 0, 1],
		[0, 0, 0],
	],
	hyperParams: {
		optimizer: 'Adam',
		learningRate: 0.001,
	},
	error: {
		threshold: 0.001,
		correctPredicts: 1,
	},
	logs: {
		period: 1,
	},
	epochs: Infinity,
};

const network = new NeuralSense(networkSettings);

network.Train(trainingSettings);

network.Predict([1, 1], true);
network.Predict([0, 1], true);
network.Predict([1, 0], true);
network.Predict([0, 0], true);

Package Sidebar

Install

npm i neural-sense

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

59.7 kB

Total Files

17

Last publish

Collaborators

  • nerq1337