Created
July 1, 2017 23:59
-
-
Save DaveBben/c701958eaa50d3173befa2a5711d8d06 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] }, | |
{ input: [.68], output: [.55] }, | |
{ input: [.58], output: [.46] }, | |
{ input: [.7], output: [.55] }, | |
] | |
net.train(ops, { log: true, errorThresh: 0.0001, iterations: 50}); | |
console.log(net.run([.62])); // 3.1 miles -- 30.6 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment