Skip to content

Metrics zerooneloss

github-actions[bot] edited this page Aug 29, 2026 · 30 revisions

Development build. This page describes main, not a released package. The latest published Lodestar.Metrics is 0.3.0 — read its documentation.

ZeroOneLoss

The fraction of samples predicted wrongly — one minus Accuracy on single-label input, and something else entirely on a label matrix.

There, a row counts as wrong if any of its labels differs. One wrong label out of three costs a whole sample, where HammingLoss charges a third of one. Measured on two samples over three labels with two labels wrong, one in each row: 1 here and 0.3333… there.

normalize follows Accuracy.Score's: pass false and the answer is the weight of the wrong samples rather than their share — a count when every weight is 1.

Members

Member What it does
ZeroOneLoss.Score The share of samples that disagree, from labels or from a matrix.

Lodestar

Project

Clone this wiki locally