Learn R Programming

SpatialVx (version 0.1-2)

wavePurifyVx: Apply traditional forecast verification after wavelet denoising

Description

Apply traditional forecast verification after wavelet denoising ala Briggs and Levine (1997).

Usage

wavePurifyVx(x, y, object = NULL, climate=NULL, which.stats = c("bias", "ts", "ets", "pod", "far", "f", "hk", "mse"), thresholds = NULL, return.fields = FALSE, verbose = FALSE, ...)
## S3 method for class 'wavePurifyVx':
plot(x, ...)
## S3 method for class 'wavePurifyVx':
summary(object, ...)

Arguments

x,y
For wavePurifyVx, m X n matrices giving the verification and forecast fields, resp. If either is not supplied, then object must be supplied, and the fields given by object are used instead (even if one of x
object
For wavePurifyVx, a list object as returned by hoods2dPrep. Not used if both x and y are given. For summary.wavePurifyVx, list object as returned by wavePurifyVx.
climate
m X n matrix defining a climatology field. If not NULL, then the anamoly correlation coefficient will be applied to the wavelet denoised fields.
which.stats
character describing which traditional verification statistics to calculate on the wavelet denoised fields. This is the argument passed to the argument of the same name in vxstats.
thresholds
If object is used, then this argument is ignored. Otherwise, it is used to define events for all of the verification statistics except MSE. However, if supplied or other statistics are to be computed, then MSE will be calculated for the fie
return.fields
logical, should the denoised fields be returned (e.g., for subsequent plotting)?
verbose
logical, should progress information (including total run time) be printed to the screen?
...
For wavePurifyVx, optional additional arguments to denoise.dwt.2d (or denoise.modwt.2d) from package waveslim. Note that if the argument J is not passed, then it will be determined as J=log2(

Value

  • A list object of class "wavePurifyVx" is returned with possible components (depending on what is supplied in the arguments, etc.):
  • X2,Y2m X n matrices of the denoised verification and forecast fields, resp. (only if 'return.fields' is TRUE).
  • thresholdsq X 2 matrix of thresholds applied to the forecast (first column) and verification (second column) fields, resp. If 'climate' is not NULL, then the same thresholds for the forecast field are applied to the climatology.
  • qsIf object and thresholds are NULL, and statistics other than MSE or ACC are desired, then this will be created along with the thresholds, and is just a character version of the trhesholds.
  • argslist object containing all the optional arguments passed into ..., and the value of J used (e.g., even if not passed into ...).
  • bias,ts,ets,pod,far,f,hk,mse,accnumeric vectors of length q (i.e., the number of thresholds) giving the associated verification statistics.

Details

If the fields are dyadic, then the denoise.dwt.2d function from package waveslim is applied to each field before calculating the chosen verification statistics. Otherwise denoise.modwt.2d from the same package is used. The result is that high-frequency fluctuations in the two fields are removed before calculating verification statistics so that the resulting statistics are less susceptible to small-scale errors (see Briggs and Levine, 1997). See Percival and Guttorp (1994) and Lindsay et al. (1996) for more on this type of wavelet analysis including maximal overlap DWT.

References

Briggs, W. M. and R. A. Levine, 1997. Wavelets and field forecast verification. Mon. Wea. Rev., 125, 1329--1341.

Lindsay, R. W., D. B. Percival, and D. A. Rothrock, 1996. The discrete wavelet transform and the scale analysis of the surface properties of sea ice. IEEE Transactions on Geoscience and Remote Sensing, 34 (3), 771--787.

Percival, D. B. and P. Guttorp, 1994. Long-memory processes, the Allan variance and wavelets. In Wavelets in Geophysics, E. Foufoula-Georgiou and P. Kumar, Eds., New York: Academic, pp. 325--343.

See Also

denoise.dwt.2d, denoise.modwt.2d, waverify2d, mowaverify2d, waveIS, hoods2dPrep, vxstats

Examples

Run this code
data(UKobs6)
data(UKfcst6)
data(UKloc)
hold <- surrogater2d(UKobs6, n=1, maxiter=50, verbose=TRUE)
hold <- matrix(hold, 256, 256)
UKobj <- hoods2dPrep("UKfcst6", "UKobs6", thresholds=c(0.1,2,5,10), loc=UKloc, units="mm/h")
look <- wavePurifyVx(object=UKobj, climate=hold, return.fields=TRUE, verbose=TRUE)
plot(look)
summary(look)

data(pert004)
data(pert000)
hold <- hoods2dPrep( "pert004", "pert000", thresholds=c(1,10,50), loc=ICPg240Locs, units="mm/h")
look <- wavePurifyVx(object=hold, return.fields=TRUE, verbose=TRUE)
summary( look)

Run the code above in your browser using DataLab