serrlog_sf: Squared error log scoring function

View source: R/serrlog_sf.R

serrlog_sfR Documentation

Squared error log scoring function

Description

The function serrlog_sf computes the squared error log scoring function when y materialises and x is the \exp(\textnormal{E}_F[\log(Y)]) predictive functional, i.e. the geometric mean of F (Yeh et al. 2008).

The squared error log scoring function is described by eq. (2) in Houghton-Carr (1999).

Usage

serrlog_sf(x, y)

Arguments

x

Predictive \exp(\textnormal{E}_F[\log(Y)]) functional (prediction). It can be a vector of length n (must have the same length as y).

y

Realisation (true value) of process. It can be a vector of length n (must have the same length as x).

Details

The squared error log scoring function is defined by:

S(x, y) := (\log(x) - \log(y))^2

Domain of function:

x > 0

y > 0

Range of function:

S(x, y) \geq 0, \forall x, y > 0

Value

Vector of squared errors of log-transformed variables.

Note

For details on the squared error log scoring function, see Houghton-Carr (1999).

The \exp(\textnormal{E}_F[\log(Y)]) functional is the geometric mean of the probability distribution F of Y, i.e. the r = 0 case of the generalized (power) mean of order r defined by eq. (2.1) in Yeh et al. (2008).

The squared error log scoring function is negatively oriented (i.e. the smaller, the better).

The squared error log scoring function is strictly \mathbb{F}-consistent for the \exp(\textnormal{E}_F[\log(Y)]) functional. \mathbb{F} is the family of probability distributions F for which \textnormal{E}_F[(\log(Y))^2] exists and is finite (Tyralis and Papacharalampous 2026).

References

Houghton-Carr HA (1999) Assessment criteria for simple conceptual daily rainfall-runoff models. Hydrological Sciences Journal 44(2):237–261. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/02626669909492220")}.

Tyralis H, Papacharalampous G (2026) Variable transformations in consistent loss functions. Knowledge-Based Systems 336:115202. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.knosys.2025.115202")}.

Yeh C-C, Yeh H-W, Chan W (2008) Some equivalent forms of the arithematic-geometric mean inequality in probability: A survey. Journal of Inequalities and Applications 2008:386715. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1155/2008/386715")}.

See Also

serrlog_rs, meanlog_if

Examples

# Compute the squared error log scoring function.

df <- data.frame(
    y = rep(x = 2, times = 3),
    x = 1:3
)

df$squaredlog_error <- serrlog_sf(x = df$x, y = df$y)

print(df)

scoringfunctions documentation built on Aug. 30, 2026, 5:07 p.m.