Skip to content

Instantly share code, notes, and snippets.

@kmaher9
Created September 6, 2018 20:54
Show Gist options
  • Select an option

  • Save kmaher9/d17aa9d1b140e62d13ce4d9041eae218 to your computer and use it in GitHub Desktop.

Select an option

Save kmaher9/d17aa9d1b140e62d13ce4d9041eae218 to your computer and use it in GitHub Desktop.
var brain = require('brain.js')
var fs = require('fs')
// configuration to be used in the brain
const config = {
binaryThresh: 0.5, // arbitary value
hiddenLayers: [3], // the size of the hidden layers in the network
activation: 'sigmoid' // activation function
}
// array to hold the training data after formatting
var trainingData = []
// initialise a new backpropogating neural network
const net = new brain.NeuralNetwork(config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment