I started working with this network. And I wrote some code, but I am not sure whether I am doing it right or not. here is what I do:
HopefieldNetwork net = new HopefieldNetwork(50)
.net.addPattern(aPattern)
where aPattern
is of type BasicMLData
and changes in a loop to add all patterns.net.runUntilStable(5000)
for training with 5000 iterations max. Is this right?out = (BasicMLData) net.compute(input)
So is everything OK?
I found the solution.
You have to call setCurrentState
then runUntilStable
then getCurrentState
to get output.