serrsq_sf: Squared error of squares scoring function

View source: R/serrsq_sf.R

serrsq_sfR Documentation

Squared error of squares scoring function

Description

The function serrsq_sf computes the squared error of squares scoring function when y materialises and x is the \sqrt{\textnormal{E}_F[Y^2]} predictive functional.

The squared error of squares scoring function is defined in Thirel et al. (2024).

Usage

serrsq_sf(x, y)

Arguments

x

Predictive \sqrt{\textnormal{E}_F[Y^2]} 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 of squares scoring function is defined by:

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

Domain of function:

x \geq 0

y \geq 0

Range of function:

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

Value

Vector of squared errors of squared-transformed variables.

Note

For details on the squared error of squares scoring function, see Thirel et al. (2024).

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

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

References

Thirel G, Santos L, Delaigue O, Perrin C (2024) On the use of streamflow transformations for hydrological model calibration. Hydrology and Earth System Sciences 28(21):4837–4860. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.5194/hess-28-4837-2024")}.

Tyralis H, Papacharalampous G (2025) Transformations of predictions and realizations in consistent scoring functions. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2502.16542")}.

Examples

# Compute the squarer error of squares scoring function.

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

df$squaredsq_error <- serrsq_sf(x = df$x, y = df$y)

print(df)

scoringfunctions documentation built on April 4, 2025, 12:28 a.m.