|
@@ -19,10 +19,10 @@ def calc_chratios(data, pos_map, start, end):
|
|
|
y = y.ravel()
|
|
|
return int(all[0, -1]), int(all[0, -1] + all[1, -1]), y
|
|
|
|
|
|
-def calc_cov_chratios(data, pos_map, start, end, window, split_len):
|
|
|
+def calc_cov_chratios(data, pos_map, start, end, window, left_len,right_len):
|
|
|
view = data[[pos_map.succ_count, pos_map.fail_count, pos_map.commit_count], :]
|
|
|
|
|
|
- sum_view = view[:, start + split_len:end]
|
|
|
+ sum_view = view[:, start + left_len:end - right_len]
|
|
|
sums = np.sum(view, axis=1)
|
|
|
succs = sums[0]
|
|
|
fails = sums[1]
|
|
@@ -35,7 +35,7 @@ def calc_cov_chratios(data, pos_map, start, end, window, split_len):
|
|
|
fail = np.convolve(fail, window, 'same')
|
|
|
commit = succ + fail + 0.0000001
|
|
|
y = succ / commit
|
|
|
- y = y[start + split_len:]
|
|
|
+ y = y[left_len:end - start - right_len]
|
|
|
|
|
|
return int(succs), int(succs + fails), y
|
|
|
|