(self, ys: np.ndarray, ts: np.ndarray)
| 34 | self.flash_filter = flash_filter |
| 35 | |
| 36 | def push(self, ys: np.ndarray, ts: np.ndarray): |
| 37 | predictions = (ys > self.threshold).astype(np.uint8) |
| 38 | |
| 39 | cuts = [] |
| 40 | for y, t in zip(predictions, ts, strict=True): |
| 41 | if self.y_prev == 0 and y == 1 and self.i > 0: |
| 42 | cuts.append(t) |
| 43 | self.y_prev = y |
| 44 | self.i += 1 |
| 45 | |
| 46 | return cuts |
| 47 | |
| 48 | |
| 49 | class Predictor: |
no outgoing calls
no test coverage detected