synaptic icon indicating copy to clipboard operation
synaptic copied to clipboard

Cannot Replicate Hopfield Wiki Example

Open NHQ opened this issue 8 years ago • 4 comments

I cannot replicate this example: https://github.com/cazala/synaptic/wiki/Architect#hopfield

This is the output in a REPL

> hopfield = new tic.Architect.Hopfield(10)
> hopfield.learn([
...     [0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
...     [1, 1, 1, 1, 1, 0, 0, 0, 0, 0]
... ])
> hopfield.feed([0,1,0,1,0,1,0,1,1,1])
[ 0, 1, 0, 0, 1, 0, 0, 1, 0, 1 ]
> hopfield.feed([1,1,1,1,1,0,0,1,0,0])
[ 0, 1, 0, 0, 1, 1, 0, 1, 0, 1 ]
> 

NHQ avatar Aug 13 '16 17:08 NHQ

I also noticed this issue. I tried to run hopfield learning multiple times, but feed often misses result. That is probably some mistake, because in my case minimum error after training is less then 0.00005, so feed data can not be that wrong.

zorantodorovic avatar May 18 '17 21:05 zorantodorovic

Seems to be working fine for me. JSFiddle

wagenaartje avatar May 19 '17 10:05 wagenaartje

Maybe you will have some more success with Neataptic, the front-end is very similar to Synaptic but the back-end is rather different.

wagenaartje avatar May 19 '17 11:05 wagenaartje

@wagenaartje i see you added hopfield in Neataptic. Thank you for that!

zorantodorovic avatar May 20 '17 19:05 zorantodorovic