GeoDosocores: Computation of drop-one predictive scores

GeoDoScoresR Documentation

Computation of drop-one predictive scores

Description

The function computes RMSE, MAE, MAD, logarithmic score and CRPS from exact drop-one linear-prediction identities based on a GeoCovmatrix object.

Usage

GeoDoScores(data, method="cholesky", matrix)

Arguments

data

A d-dimensional vector (a single spatial realisation) or a a(t \times d)-matrix (a single spatio-temporal realisation). or a a(2 \times d)-matrix (a single bivariate realisation).

method

String; matrix decomposition used for dense covariance matrices. Possible values are "cholesky" (default) and "svd". Sparse covariance matrices use the sparse Cholesky path and therefore require "cholesky".

matrix

An object returned by GeoCovmatrix.

Details

Let Q=\Sigma^{-1} and let r denote the data after subtraction of the model mean. The drop-one residual and conditional variance are computed without repeatedly refitting the model:

e_i^{(-i)} = (Qr)_i/Q_{ii}, \qquad v_i^{(-i)}=1/Q_{ii}.

The standardized residual is z_i=(Qr)_i/\sqrt{Q_{ii}}. The logarithmic score uses \frac{1}{2}\{\log(2\pi v_i^{(-i)})+z_i^2\}, and the Gaussian CRPS uses its standard closed-form expression with the normal density \phi and distribution function \Phi. The SVD path solves the linear system through the SVD itself rather than passing an SVD object to triangular solvers.

Value

Returns a list containing the following information:

RMSE

Root-mean-square error predictive score

MAE

Mean absolute drop-one prediction error.

MAD

Median absolute drop-one prediction error.

LSCORE

Mean Gaussian negative log predictive density for the drop-one predictions.

CRPS

Mean Gaussian continuous ranked probability score for the drop-one predictions.

Author(s)

Moreno Bevilacqua, moreno.bevilacqua89@gmail.com,https://sites.google.com/view/moreno-bevilacqua/home, Víctor Morales Oñate, victor.morales@uv.cl, https://sites.google.com/site/moralesonatevictor/, Christian Caamaño-Carrillo, chcaaman@ubiobio.cl,https://www.researchgate.net/profile/Christian-Caamano

References

Zhang H. and Wang Y. (2010). Kriging and cross-validation for massive spatial data. Environmetrics, 21, 290–304. Gneiting T. and Raftery A. Strictly Proper Scoring Rules, Prediction, and Estimation. Journal of the American Statistical Association, 102

See Also

GeoCovmatrix

Examples


library(GeoModels)

################################################################
######### Examples of predictive score computation ############
################################################################
set.seed(8)
 # Define the spatial-coordinates of the points:
x <- runif(500, 0, 2)
y <- runif(500, 0, 2)
coords=cbind(x,y)
matrix1 <- GeoCovmatrix(coordx=coords, corrmodel="Matern", param=list(smooth=0.5,
 sill=1,scale=0.2,nugget=0))
 
data <- GeoSim(coordx=coords, corrmodel="Matern", param=list(mean=0,smooth=0.5,
 sill=1,scale=0.2,nugget=0))$data

Pr_scores <- GeoDoScores(data,matrix=matrix1)

Pr_scores


GeoModels documentation built on Sept. 23, 2026, 5:07 p.m.