Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

scoringfunctions (version 1.1)

serrlog_sf: 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(EF[log(Y)]) predictive functional.

The squared error log scoring function is defined in Houghton-Carr (1999).

Usage

serrlog_sf(x, y)

Value

Vector of squared errors of log-transformed variables.

Arguments

x

Predictive exp(EF[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 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)0,x,y>0

References

Houghton-Carr HA (1999) Assessment criteria for simple conceptual daily rainfall-runoff models. Hydrological Sciences Journal 44(2):237--261. tools:::Rd_expr_doi("10.1080/02626669909492220").

Tyralis H, Papacharalampous G (2025) Transformations of predictions and realizations in consistent scoring functions. tools:::Rd_expr_doi("10.48550/arXiv.2502.16542").

Examples

Run this code
# Compute the squarer 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)

Run the code above in your browser using DataLab