These are chat archives for harthur/brain

Mar 2015
Andrew Bridge
Mar 06 2015 00:24

Hi all, I feel like I'm doing something wrong. I'm testing out brain.js, but I can't seem to get it to learn the pattern I'm training it with. This is my code:

var test = new brain.NeuralNetwork();
test.train([{input: [0, 0.25, 0.5, 0.75, 1, 0.70, 0.40, 0.1], output: {pattern: 1}}]);
// Object {error: 0.0049931054240952, iterations: 173}[0,0,0,0,0,0,0,0]);
// Object {pattern: 0.9193936382743066}

I'm aware that training with just one item isn't going to be great. I embellished on this code, looping and adding slightly randomised data with this same pattern in order to give the neural network more to train from, but I still get output which is above 0.9, even just running an array full of 0s against the network.

Would really appreciate any help anyone could give me! I'm really interested in this project!

Many thanks in advance!