MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / print_curve

Function print_curve

examples/rbm.py:10–19  ·  view source on GitHub ↗
(rbm)

Source from the content-addressed store, hash-verified

8
9
10def print_curve(rbm):
11 from matplotlib import pyplot as plt
12
13 def moving_average(a, n=25):
14 ret = np.cumsum(a, dtype=float)
15 ret[n:] = ret[n:] - ret[:-n]
16 return ret[n - 1 :] / n
17
18 plt.plot(moving_average(rbm.errors))
19 plt.show()
20
21
22X = np.random.uniform(0, 1, (1500, 10))

Callers 1

rbm.pyFile · 0.85

Calls 2

moving_averageFunction · 0.85
plotMethod · 0.45

Tested by

no test coverage detected