brain.retro.js
brain.retro.js copied to clipboard
empty object out of retro()
Started here: https://github.com/harthur-org/brain.js/issues/5#issuecomment-274994616
Following up from the linked issue, input data as an array of numbers seems to break the retro() function.
var net = new brain.NeuralNetwork();
net.train([
{input: [0, 0], output: [0]},
{input: [0, 1], output: [1]},
{input: [1, 0], output: [1]},
{input: [1, 1], output: [0]}
]);
var output = net.run([1, 0]);
console.log('out', output);// [0.933]
console.log('retro', retro(output, net));// {2: NaN}
oh nice, I see what you did there
In addition, my real world output is more like:{isIt:1}