sparx.metrics
Metrics over a spiking objective’s evaluation, which dew’s Trainer.fit(metrics=...) takes.
Accuracy reports under accuracy, so a run logs val/accuracy (or
<split>/accuracy), and a run’s record names it by import path,
sparx.metrics:Accuracy.
Contents
Section titled “Contents”| Name | |
|---|---|
Accuracy | The share of examples whose predicted class is their label, over a whole pass. |
Accuracy
Section titled “Accuracy”class AccuracyThe share of examples whose predicted class is their label, over a whole pass.
It reads the TokenScores that SpikingClassifierObjective.evaluate
returns, one row per example, each counted by its weight. Dew’s
validation pass hands a metric the real rows alone, so the repeats that
fill a split’s last batch count for nothing.
Accuracy.__call__
Section titled “Accuracy.__call__”def __call__(scores: Artifact, batch: Batch) -> tuple[float, float]Accuracy.finalize
Section titled “Accuracy.finalize”def finalize(accumulated: tuple[float, float]) -> float