(rbm)
| 8 | |
| 9 | |
| 10 | def 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 | |
| 22 | X = np.random.uniform(0, 1, (1500, 10)) |
no test coverage detected