diff options
| -rwxr-xr-x | csv_tool | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -112,7 +112,7 @@ def numpy_lstsq(x, y): | |||
| 112 | return lstsq(A, b)[0] | 112 | return lstsq(A, b)[0] |
| 113 | 113 | ||
| 114 | def max_delta(c0, c1, x, y): | 114 | def max_delta(c0, c1, x, y): |
| 115 | return max([abs(c0 + c1 * float(x) - float(y)) for (x,y) in izip(x, y)]) | 115 | return max([float(y) - (c0 + c1 * float(x)) for (x,y) in izip(x, y)]) |
| 116 | 116 | ||
| 117 | def least_squares(rows, xy_pairs, upper_bound): | 117 | def least_squares(rows, xy_pairs, upper_bound): |
| 118 | cols = [] | 118 | cols = [] |
