Monday, February 16, 2015

He ain't Heavi (side)

...he's my neural network...

From Sprott's book (page 162), we have the four dimensional (minimal conservative) artificial (!) neural network:

dx/dt = tanh(y)

dy/dt = tanh(z - x)

dz/dt = tanh(w)

dw/dt = tanh(-z) .

Here the hyperbolic tangent function seems to have little to do with trigonometry, let alone relativity.

Apparently, tanh(x) is popular with neural network modelling because of the shape of its graph - it runs smoothly from between -1 and +1. Other functions are available.

After not too much effort I ended up with the following patching arrangement, for the above equations, on my computer (which just happens to have the four hyperbolic tangent functions needed):


And here's a plot of y (vertical) vs. x (horizontal) (both 1 V / division):- if nothing else it does show that the road is indeed long / with many a winding turn...


(Initial conditions were as per Figure 6.31(b) of the book - note that the figure caption has 'v' for the vertical axis - I only got the similar looking plot when I plotted y vertically - rather than v (which I tried interpreting as dx/dt).)


No comments:

Post a Comment