import {random, multiply, dotMultiply, mean, abs, subtract, transpose, add} from 'mathjs' import * as activation from './activations' export class NeuralNetwork { constructor(...args) { this.input_nodes = args[0]; //number of input neurons this.hidden_nodes = args[1]; //number of hidden neurons this.output_nodes = args[2]; //number of output neurons this.epochs = 50000; this.activation = activation.sigmoid; this.lr = .5; //learning rate this.output = 0; this.synapse0 = random([this.input_nodes, this.hidden_nodes], -1.0, 1.0); //connections from input layer to hiden this.synapse1 = random([this.hidden_nodes, this.output_nodes], -1.0, 1.0); //connections from hidden layer to output } }