Learn R Programming

SpatialVx (version 0.1-2)

FQI: Functions for calculating the Forecast Quality Index

Description

Functions for calculating the Forecast Quality Index (FQI) and its components.

Usage

FQI(object, surr = NULL, ...)
UIQI(Fcst, Vx, ...)
ampstats(Fcst, Vx, only.nonzero = FALSE)
## S3 method for class 'fqi':
summary(object, ...)

Arguments

object
list object as returned by locmeasures2dPrep. In the case of summary.fqi, object is the list object returned by FQI.
Fcst,Vx
numeric matrices giving the fields for the verification set.
surr
three-dimesnional array containing surrogate fields for Vx, e.g. as returned by surrogater2d. If NULL, these will be calculated using surrogater2d.
only.nonzero
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)?
...
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

Value

  • FQI returns a list with components:
  • prep.objectcharacter naming the locmeasures2dPrep object used in the call.
  • phd.normmatrix of normalized partial Hausdorff distances for each value of k (rows) and each threshold (columns).
  • uiqi.normnumeric vector of modified UIQI values for each threshold.
  • fqimatrix of FQI values for each value of k (rows) and each threshold (columns).
  • UIQI returns a list with components:
  • Fcst.name,Vx.namecharacters giving the names of the two fields.
  • corsingle numeric giving the correlation between the two fields.
  • brightness.biassingle numeric giving the brightness (bias) value.
  • distortion.variabilitysingle numeric giving the distortion (variability) value.
  • UIQIsingle numeric giving the UIQI (or modified UIQI if only.nonzero is set to TRUE) value.
  • ampstats returns a list object with components:
  • mean.fcst,mean.vxsingle numerics giving the mean of Fcst and Vx, resp.
  • var.fcst,var.vxsingle numerics giving the variance of Fcst and Vx, resp.
  • covsingle numeric giving the covariance between Fcst and Vx (if only.nonzero is TRUE, this will be NA).

Details

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(Vx, Fcst)/mean( PHD_k(Vx, 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 Vx (Fcst), and the distortion term is given by 2*(sig1*sig2)/(sig1^2+sig2^2), where sig1^2 (sig2^2) is the variance of Vx (Fcst) values. The denominator is a modified UIQI (Universal Image Quality Index; Wang and Bovik, 2002), which itself is given by

UIQI = cor(Vx,Fcst)*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).

References

Venugopal, V., S. Basu, and E. Foufoula-Georgiou, 2005: A new metric for comparing precipitation patterns with an application to ensemble forecasts. J. Geophys. Res., 110, D08111, doi:10.1029/2004JD005395, 11pp.

Wang, Z. and A. C. Bovik, 2002: A universal image quality index. IEEE Signal Process. Lett., 9, 81--84.

See Also

locperf, link{surrogater2d}, locmeasures2d, locmeasures2dPrep

Examples

Run this code
# Simulate a precip-like field.
grid<- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj<-Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look<- sim.rf( obj)
look[ look < 0] <- 0
look <- zapsmall( look)

look2 <- sim.rf( obj)
look2[ look2 < 0] <- 0
look2 <- zapsmall( look2)

# Now, find surrogates of the simulated field.
look3 <- surrogater2d( look, zero.down=TRUE, n=10)

u <- cbind( quantile( c(look2), c(0.75, 0.9)), quantile( c(look), c(0.75, 0.9)))
hold <- locmeasures2dPrep("look2", "look", thresholds=u, k=c(4, 0.75))
FQI( hold, surr=look3)

Run the code above in your browser using DataLab