Skip to content

Instantly share code, notes, and snippets.

@robinvanemden
Last active December 22, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robinvanemden/15b0a598af5db9ea7299 to your computer and use it in GitHub Desktop.
Save robinvanemden/15b0a598af5db9ea7299 to your computer and use it in GitHub Desktop.
for t in range(0,stream):
x = x0 + amplitude*np.cos(omega * t)
y = amplitude*np.cos(omega * t)*getobs(x,5,variance)
values = matrixpush(values, np.array([t,x,y]))
if np.all(np.isfinite(values[:,0])):
x0 = x0 + learnrate * sum( values[:,2] ) / inttime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment