aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcsv_tool2
1 files changed, 1 insertions, 1 deletions
diff --git a/csv_tool b/csv_tool
index 96cd99e..17ad949 100755
--- a/csv_tool
+++ b/csv_tool
@@ -112,7 +112,7 @@ def numpy_lstsq(x, y):
112 return lstsq(A, b)[0] 112 return lstsq(A, b)[0]
113 113
114def max_delta(c0, c1, x, y): 114def 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
117def least_squares(rows, xy_pairs, upper_bound): 117def least_squares(rows, xy_pairs, upper_bound):
118 cols = [] 118 cols = []