Learn R Programming

scoringfunctions (version 1.1)

serrpower_sf: Squared error of power transformations scoring function

Description

The function serrpower_sf computes the squared error of power transformations scoring function when \(y\) materialises and \(x\) is the \((\textnormal{E}_F[Y^a])^{(1/a)}\) predictive functional.

The squared error of power transformations scoring function is defined in Tyralis and Papacharalampous (2025).

Usage

serrpower_sf(x, y, a)

Value

Vector of squared errors of power-transformed variables.

Arguments

x

Predictive \((\textnormal{E}_F[Y^a])^{(1/a)}\) 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\)).

a

It can be a vector of length \(n\) (must have the same length as \(y\)).

Details

The squared error of power transformations scoring function is defined by:

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

Domain of function:

Case #1

$$a > 0$$

$$x \geq 0$$

$$y \geq 0$$

Case #2

$$a \neq 0$$

$$x > 0$$

$$y > 0$$

Range of function:

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

References

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 of power tranformations scoring function.

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

df$squaredpower_error <- serrpower_sf(x = df$x, y = df$y, a = df$a)

print(df)

Run the code above in your browser using DataLab