Skip to content

Instantly share code, notes, and snippets.

View DaveBben's full-sized avatar

Dave Bennett DaveBben

  • Philadelphia, PA
View GitHub Profile
const brain = require('brain.js');
var net = new brain.NeuralNetwork();
let ops = [
{ input: [.7], output: [.5] },
{ input: [.71], output: [.5] },
{ input: [.708], output: [.5] },
{ input: [.704], output: [.53] },
{ input: [.708], output: [.53] },
net.train(ops, { log: true, errorThresh: 0.0001, iterations: 50});