Creates a string description of a polynomial.
(W, b)
| 22 | |
| 23 | |
| 24 | def poly_desc(W, b): |
| 25 | """Creates a string description of a polynomial.""" |
| 26 | result = 'y = ' |
| 27 | for i, w in enumerate(W): |
| 28 | result += '{:+.2f} x^{} '.format(w, i + 1) |
| 29 | result += '{:+.2f}'.format(b[0]) |
| 30 | return result |
| 31 | |
| 32 | |
| 33 | def get_batch(batch_size=32): |