(self, predictions: np.ndarray, targets: np.ndarray)
| 125 | self.matrix = np.zeros((num_classes, num_classes), dtype=np.int64) |
| 126 | |
| 127 | def update(self, predictions: np.ndarray, targets: np.ndarray): |
| 128 | for pred, target in zip(predictions, targets): |
| 129 | self.matrix[target, pred] += 1 |
| 130 | |
| 131 | def reset(self): |
| 132 | self.matrix = np.zeros((self.num_classes, self.num_classes), dtype=np.int64) |
nothing calls this directly
no outgoing calls
no test coverage detected