Functions for calculating the Forecast Quality Index (FQI) and its components.
FQI(object, surr = NULL, k = 4, time.point = 1, obs = 1, model = 1, ...)UIQI(X, Xhat, ...)
ampstats(X, Xhat, only.nonzero = FALSE)
# S3 method for fqi
print(x, ...)
# S3 method for fqi
summary(object, ...)
FQI returns a list with with the following components:
matrix of normalized partial Hausdorff distances for each value of k (rows) and each threshold (columns).
numeric vector of modified UIQI values for each threshold.
matrix of FQI values for each value of k (rows) and each threshold (columns).
It will also have the same attributes as the “SpatialVx” object with additional attributes defining the arguments specific to parameters used by the function.
UIQI returns a list with components:
character vector giving the names of the two fields.
single numeric giving the correlation between the two fields.
single numeric giving the brightness (bias) value.
single numeric giving the distortion (variability) value.
single numeric giving the UIQI (or modified UIQI if only.nonzero is set to TRUE) value.
ampstats returns a list object with components:
single numerics giving the mean of Xhat and X, resp.
single numerics giving the variance of Xhat and X, resp.
single numeric giving the covariance between Xhat and X (if only.nonzero is TRUE, this will be NA).
list object of class “SpatialVx”. In the case of the summary
method, object
is the list object returned by FQI
.
numeric matrices giving the fields for the verification set.
list object of class “fqi” as returned by FQI
.
three-dimesnional array containing surrogate fields for X
, e.g. as returned by surrogater2d
. If NULL, these will be calculated using surrogater2d
.
logical, should the means and variances of only the non-zero values of the fields be calculated (if so, the covariance is returned as NA)?
numeric vector for use with the partial Hausdorff distance. For k that are whole numerics or integers >= 1, then the k-th highest value is returned by locmeasures2d
. If 0 <= k < 1, then the corresponding quantile is returned.
numeric or character indicating which time point from the “SpatialVx” verification set to select for analysis.
numeric indicating which forecast model to select for the analysis.
In the case of FQI
, additional arguments to surrogater2d
. Only used if surr
is NULL. In the case of UIQI
, additional arguments to ampstats
. In the case of summary.fqi
, these are not used.
Eric Gilleland
The FQI was proposed as a spatial verification metric (a true metric in the mathematical sense) by Venugopal et al. (2005) to combine amplitude and displacement error information in a single summary statistic. It is given by
FQI = (PHD_k(X, Xhat)/mean( PHD_k(X, surr_i); i in 1 to number of surrogates)) / (brightness * distortion)
where the numerator is a normalized partial Hausdorff distance (see help file for locperf), brightness (also called bias) is given by 2*(mu1*mu2)/(mu1^2+mu2^2), where mu1 (mu2) is the mean value of X (Xhat), and the distortion term is given by 2*(sig1*sig2)/(sig1^2+sig2^2), where sig1^2 (sig2^2) is the variance of X (Xhat) values. The denominator is a modified UIQI (Universal Image Quality Index; Wang and Bovik, 2002), which itself is given by
UIQI = cor(X,Xhat)*brightness*distortion.
Note that if only.nonzero
is TRUE
in the call to UIQI
, then the modified UIQI used in the FQI formulation is returned (i.e., without multiplying by the correlation term).
The print
method so far just calls the summary
method.
Venugopal, V., Basu, S. and Foufoula-Georgiou, E. (2005) A new metric for comparing precipitation patterns with an application to ensemble forecasts. J. Geophys. Res., 110, D08111, 11 pp., doi:10.1029/2004JD005395.
Wang, Z. and Bovik, A. C. (2002) A universal image quality index. IEEE Signal Process. Lett., 9, 81--84.
locperf
, surrogater2d
, locmeasures2d
data( "ExampleSpatialVxSet" )
x <- ExampleSpatialVxSet$vx
xhat <- ExampleSpatialVxSet$fcst
# Now, find surrogates of the simulated field.
z <- surrogater2d(x, zero.down=TRUE, n=10)
u <- list( X = cbind( quantile( c(x), c(0.75, 0.9)) ),
Xhat = cbind( quantile( c(xhat), c(0.75, 0.9) ) ) )
hold <- make.SpatialVx(x, xhat, thresholds = u,
field.type = "Example", units = "none",
data.name = "ExampleSpatialVxSet",
obs.name = "X", model.name = "Xhat" )
FQI(hold, surr = z, k = c(4, 0.75) )
Run the code above in your browser using DataLab