cazala / synaptic

architecture-free neural network library for node.js and the browser
http://caza.la/synaptic
Other
6.91k stars 666 forks source link

Train using fitness function? #162

Closed Skeen closed 7 years ago

Skeen commented 7 years ago

Hello,

Is it possible to train using a 'fitness' function instead of a training set?

I.e. have the network receive random input, generate an output, and then be 'rewarded' for the accuracy of it's output? This is how I've usually been working within the field of evolutionary algorithms, but I'm not sure how it maps directly to utilizing neural networks.

Jabher commented 7 years ago

You can use your own cost function in trainer, but it should by sync - no async requests. See more in docs: https://github.com/cazala/synaptic/wiki/Trainer predefined cost functions can be viewed here, as an example: https://github.com/cazala/synaptic/blob/a5fbefea5a69700384e2fe4c9fd82b2c50146c5f/src/trainer.js#L654-L676

Skeen commented 7 years ago

Thanks, what about randomized trainingsets?

Jabher commented 7 years ago

Can you please explain meaning of it? You mean shuffled set?