(p, t)
| 160 | |
| 161 | # calculate accuracy |
| 162 | def mse(p, t): |
| 163 | p = np.array(p) |
| 164 | t = np.array(t) |
| 165 | return np.mean((p - t)**2) |
| 166 | |
| 167 | print('train mse:', mse(train_predictions, train_targets)) |
| 168 | print('test mse:', mse(test_predictions, test_targets)) |