MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/utils/metrics.py:123–125  ·  view source on GitHub ↗
(self, num_classes: int)

Source from the content-addressed store, hash-verified

121
122class ConfusionMatrix:
123 def __init__(self, num_classes: int):
124 self.num_classes = num_classes
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):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected