Skip to content

Metrics gammadeviance

github-actions[bot] edited this page Aug 26, 2026 · 24 revisions

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

GammaDeviance

The deviance for a strictly positive quantity with no natural unit — a duration, a cost, a claim size. TweedieDeviance at power = 2.

It is scale-invariant, and the Poisson is not. Multiplying both the truth and the prediction by the same factor leaves this number exactly where it was, because the deviance depends on the two only through their ratio. That is what makes it the deviance to reach for when "out by 10%" means the same thing at every magnitude, and PoissonDeviance the one to reach for when a count is a count.

Both operands must be strictly positive. Unlike the Poisson, a zero truth is refused here too: the term carries log(ŷ / y), which has no value at y = 0, and the reference refuses rather than returning an infinity.

Members

Member What it does
GammaDeviance.Score The mean deviance for a positive, scale-free target.

Lodestar

Project

Clone this wiki locally