wavePurifyVx | R Documentation |
Apply traditional forecast verification after wavelet denoising ala Briggs and Levine (1997).
wavePurifyVx( x, climate = NULL, which.stats = c("bias",
"ts", "ets", "pod", "far", "f", "hk", "mse"), thresholds = NULL,
rule = ">=", return.fields = FALSE, verbose = FALSE, ...)
## S3 method for class 'SpatialVx'
wavePurifyVx( x, climate = NULL, which.stats = c("bias",
"ts", "ets", "pod", "far", "f", "hk", "mse"), thresholds = NULL,
rule = ">=", return.fields = FALSE, verbose = FALSE, ...,
time.point = 1, obs = 1, model = 1 )
## Default S3 method:
wavePurifyVx( x, climate = NULL, which.stats = c("bias",
"ts", "ets", "pod", "far", "f", "hk", "mse"), thresholds = NULL,
rule = ">=", return.fields = FALSE, verbose = FALSE, ...)
## S3 method for class 'wavePurifyVx'
plot(x, ..., col = c("gray", tim.colors(64)), zlim, mfrow,
horizontal = TRUE, type = c("stats", "fields") )
## S3 method for class 'wavePurifyVx'
summary(object, ...)
x |
For For |
object |
list object as returned by |
climate |
m by 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 |
thresholds |
Either a numeric vector or a list with components named “X” and “Xhat” giving thresholds 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 fields at values >= |
rule |
character string giving the threshold rule to be applied. See help file for |
return.fields |
logical, should the denoised fields be returned (e.g., for subsequent plotting)? |
time.point |
numeric or character indicating which time point from the “SpatialVx” verification set to select for analysis. |
obs , model |
numeric indicating which observation/forecast model to select for the analysis. |
verbose |
logical, should progress information (including total run time) be printed to the screen? |
col , zlim , horizontal |
optional arguments to |
mfrow |
optionally set the plotting panel via |
type |
character string stating whether to plot the resulting statistics or the original fields along with their de-noised counter parts. |
... |
For |
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.
A list object of class “wavePurifyVx” is returned with possible components (depending on what is supplied in the arguments, etc.):
X2 , Y2 |
m by n matrices of the denoised verification and forecast fields, resp. (only if return.fields is TRUE). |
thresholds |
q by 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. |
qs |
If 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. |
args |
list 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 , acc |
numeric vectors of length q (i.e., the number of thresholds) giving the associated verification statistics. |
Eric Gilleland
Briggs, W. M. and Levine, R. A. (1997) Wavelets and field forecast verification. Mon. Wea. Rev., 125, 1329–1341.
Lindsay, R. W., Percival, D. B. and Rothrock, D. A. (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 Guttorp, P. (1994) Long-memory processes, the Allan variance and wavelets. In Wavelets in Geophysics, Foufoula-Georgiou, E. and Kumar, P., Eds., New York: Academic, pp. 325–343.
denoise.dwt.2d
, denoise.modwt.2d
, waverify2d
, mowaverify2d
, waveIS
, vxstats
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)
look3 <- sim.rf( obj)
look3[ look3 < 0] <- 0
look3 <- zapsmall( look3)
hold <- make.SpatialVx( look, look2, thresholds = c(0.1, 1),
field.type = "random", units = "units")
plot( hold )
res <- wavePurifyVx( hold, climate = look3, return.fields = TRUE, verbose = TRUE )
plot(res, type="fields")
plot(res, type="stats")
summary(res)
## Not run:
data( "UKobs6" )
data( "UKfcst6" )
data( "UKloc" )
hold <- surrogater2d( UKobs6, n=1, maxiter=50, verbose=TRUE)
hold <- matrix(hold, 256, 256)
UKobj <- make.SpatialVx( UKobs6, UKfcst6, thresholds = c(0.1, 2, 5, 10),
loc = UKloc, map = TRUE, field.type = "Rainfall", units = "mm/h",
data.name = "Nimrod", obs.name = "obs 6", model.name = "fcst 6" )
plot(UKobj )
look <- wavePurifyVx( object = UKobj, climate = hold,
return.fields = TRUE, verbose = TRUE)
plot(look, type = "fields" )
plot(look, type = "stats" )
summary( look )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.