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

Method __init__

ML/src/python/neuralforge/utils/metrics.py:94–100  ·  view source on GitHub ↗
(self, patience: int = 10, min_delta: float = 0.0, mode: str = 'min')

Source from the content-addressed store, hash-verified

92
93class EarlyStopping:
94 def __init__(self, patience: int = 10, min_delta: float = 0.0, mode: str = 'min'):
95 self.patience = patience
96 self.min_delta = min_delta
97 self.mode = mode
98 self.counter = 0
99 self.best_score = None
100 self.early_stop = False
101
102 def __call__(self, score: float) -> bool:
103 if self.best_score is None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected