code: def calc_metric(self, is_correct: bool, actual_output: bool, threshold=0.5) -> int:
          
          return int(
              ((((self.outputs > threshold) == self.targets.astype(bool)) == is_correct) &
               ((self.outputs > threshold) == actual_output)).sum()
          )
docs: For example, calc_metric(False, True) calculates false positives