1.0.3 • Published 2 years ago

neural-sense v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

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);
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago