fss2dfun {SpatialVx} | R Documentation |
Various Verification Statistics on Possibly Neighborhood-Smoothed Fields.
Description
Functions to calculate various verification statistics on possibly neighborhood smoothed fields. Used by hoods2d, but can be called on their own.
Usage
fss2dfun(sPy, sPx, subset = NULL, verbose = FALSE)
fuzzyjoint2dfun(sPy, sPx, subset = NULL)
MinCvg2dfun(sIy, sIx, subset = NULL)
multicon2dfun(sIy, Ix, subset = NULL)
pragmatic2dfun(sPy, Ix, mIx = NULL, subset = NULL)
upscale2dfun(sYy, sYx, threshold = NULL, which.stats = c("rmse",
"bias", "ts", "ets"), rule = ">=", subset = NULL)
Arguments
sPy |
n by m matrix giving a smoothed binary forecast field. |
sPx |
n by m matrix giving a smoothed binary observed field. |
sIy |
n by m matrix giving a binary forecast field. |
sIx |
n by m matrix giving a binary observed field (the s indicates that the binary field is obtained from a smoothed field). |
Ix |
n by m matrix giving a binary observed field. |
mIx |
(optional) single numeric giving the base rate. If NULL, this will be calculated by the function. Simply a computation saving step if this has already been calculated. |
sYy |
n by m matrix giving a smoothed forecast field. |
sYx |
n by m matrix giving a smoothed observed field. |
threshold |
(optional) numeric vector of length 2 giving the threshold over which to calculate the verification statistics: bias, ts and ets. If NULL, only the rmse will be calculated. |
which.stats |
character vector naming which statistic(s) should be caluclated for |
subset |
(optional) numeric indicating over which points the summary scores should be calculated. If NULL, all of the points are used. |
rule |
character string giving the sort of thresholding process desired. See the help file for |
verbose |
logical, should progress information be printed to the screen? |
Details
These are modular functions that calculate the neighborhood smoothing method statistics in spatial forecast verification (see, e.g., Ebert, 2008, 2009; Gilleland et al., 2009, 2010; Roberts and Lean,2008). These functions take fields that have already had the neighborhood smoothing applied (e.g., using kernele2d
) when appropriate. They are called by hoods2d
, so need not be called by the user, but they can be.
Value
In the case of fss2dfun
, a single numeric giving the FSS value is returned. In the other cases, list objects are returned with one or more of the following components, depending on the particular function.
fuzzy |
|
joint |
|
pod |
numeric giving the probability of detection, or hit rate. |
far |
numeric giving the false alarm ratio. |
ets |
numeric giving the equitable threat score, or Gilbert Skill Score. |
f |
numeric giving the false alarm rate. |
hk |
numeric giving the Hanssen-Kuipers statistic. |
bs |
Brier Score |
bss |
Brier Skill Score. The |
ts |
numeric giving the threat score. |
bias |
numeric giving the frequency bias. |
Author(s)
Eric Gilleland
References
Ebert, E. E. (2008) Fuzzy verification of high resolution gridded forecasts: A review and proposed framework. Meteorol. Appl., 15, 51–64. doi:10.1002/met.25
Ebert, E. E. (2009) Neighborhood verification: A strategy for rewarding close forecasts. Wea. Forecasting, 24, 1498–1510, doi:10.1175/2009WAF2222251.1.
Gilleland, E., Ahijevych, D., Brown, B. G., Casati, B. and Ebert, E. E. (2009) Intercomparison of Spatial Forecast Verification Methods. Wea. Forecasting, 24, 1416–1430, doi:10.1175/2009WAF2222269.1.
Gilleland, E., Ahijevych, D. A., Brown, B. G. and Ebert, E. E. (2010) Verifying Forecasts Spatially. Bull. Amer. Meteor. Soc., October, 1365–1373.
Roberts, N. M. and Lean, H. W. (2008) Scale-selective verification of rainfall accumulations from high-resolution forecasts of convective events. Mon. Wea. Rev., 136, 78–97. doi:10.1175/2007MWR2123.1.
See Also
hoods2d
,kernel2dsmooth
,vxstats
, thresholder
Examples
x <- y <- matrix( 0, 100, 100)
x[ sample(1:100, 10), sample(1:100, 10)] <- 1
y[ sample(1:100, 20), sample(1:100, 20)] <- 1
Px <- kernel2dsmooth( x, kernel.type="boxcar", n=9, xdim=c(100, 100))
Py <- kernel2dsmooth( y, kernel.type="boxcar", n=9, xdim=c(100, 100))
par( mfrow=c(2,2))
image( x, col=c("grey", "darkblue"), main="Simulated Observed Events")
image( y, col=c("grey", "darkblue"), main="Simulated Forecast Events")
image( Px, col=c("grey", tim.colors(256)), main="Forecast Event Frequencies (9 nearest neighbors)")
image( Py, col=c("grey", tim.colors(256)), main="Smoothed Observed Events (9 nearest neighbors)")
fss2dfun( Py, Px)