pphindcast2d: Practically Perfect Hindcast Neighborhood Verification Method

View source: R/Hoods2d.R

pphindcast2dR Documentation

Practically Perfect Hindcast Neighborhood Verification Method

Description

Function to perform the practically perfect hindcast neighborhood verification method. Finds the optimal threhsold, Pthresh, and calculates the desired statistic for that threshold.

Usage

pphindcast2d(object, which.score = "ets", time.point = 1, obs = 1,
                 model = 1, levels = NULL, max.n = NULL, smooth.fun =
                 "hoods2dsmooth", smooth.params = NULL, rule = ">=",
                 verbose = FALSE, ...)

## S3 method for class 'pphindcast2d'
plot(x, ..., mfrow = NULL,
    type = c("quilt", "line"), 
    col = heat.colors(12), horizontal = FALSE)

## S3 method for class 'pphindcast2d'
print(x, ...)

Arguments

object

A list object returned by the make.SpatialVx function.

which.score

character stating which verification score is to be used. Must be one that is accepted by vxstats.

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.

levels

numeric vector giving the successive values of the smoothing parameter. For example, for the default method, these are the neighborhood lengths over which the levels^2 nearest neighbors are averaged for each point. Values should make sense for the specific smoothing function. For example, for the default method, these should be odd integers.

max.n

(optional) single numeric giving the maximum neighborhood length to use. Only used if levels are NULL.

smooth.fun

character giving the name of a smoothing function to be applied. Default is an average over the n^2 nearest neighbors, where n is taken to be each value of the levels argument.

smooth.params

list object containing any optional arguments to smooth.fun. Use NULL if none.

rule

character string giving the threshold rule to be applied. See help file for thresholder function for more information.

verbose

logical, should progress information be printed to the screen?

x

An object of class “pphindcast2d” as returned by the self-same function.

mfrow

mfrow parameter (see help file for par). If NULL, then the parameter is not re-set.

type

character specifying whether two quilt plots (one for the score and one for Pthresh) should be made, or one line plot incorporating both the score and the Pthresh values; the latter's values being displayed on the right axis.

col, horizontal

arguments used in the calls by image and image.plot.

...

pphindcast2d: optional arguments to the optim function. May not include lower, upper or method as these are hard coded into the function.

plot method function: optional arguments to the image function.

print method function: not used.

Details

The practically perfect hindcast method is described in Ebert (2008). Using a similar notation as that described therein (and in the help page for hoods2d), the method is a SO-NF approach that first compares the observed binary field (obtained from the trheshold(s) provided by object), Ix, with the smoothed binary field, <Px>s. This smoothed binary field is thresholded by Pthresh to obtain a new binary field. The value of Pthresh that maximizes the verification score (provided by the which.score argument) is then used to compare Ix with <Iy>s, the binary forecast field obtained by thresholding the smoothed binary forecast field Iy using the value of Pthresh found above. The verification statistic determined by which.score is calculated between Ix and <Iy>s.

Value

A list object is returned with components:

which.score

value of which.score, same as the argument passed in.

Pthresh

l by q matrix giving the value of Pthresh applied at each level (rows) and threshold (columns).

values

l by q matrix giving the value of which.score found for each level (rows) and threshold (columns).

Warning

The value Pthresh is optimized under the assumption that larger values of which.score are better.

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

See Also

hoods2d, kernel2dsmooth, vxstats, hoods2dPlot, optim

Examples

x <- y <- matrix( 0, 50, 50)
x[ sample(1:50,10), sample(1:50,10)] <- rexp( 100, 0.25)
y[ sample(1:50,20), sample(1:50,20)] <- rexp( 400)

hold <- make.SpatialVx( x, y, thresholds=c(0.1, 0.5), field.type = "random")
look <- pphindcast2d(hold, levels=c(1, 3))
look
## Not run: 
data( "geom001" )
data( "geom000" )
data( "ICPg240Locs" )

hold <- make.SpatialVx( geom000, geom001, thresholds = c(0.01, 50.01),
    loc = ICPg240Locs, projection = TRUE, map = TRUE, loc.byrow = TRUE,
    data.name = "Geometric", obs.name = "geom000", model.name = "geom001",
    field.type = "Precipitation", units = "mm/h")

look <- pphindcast2d( hold, levels=c(1, 3, 65), verbose=TRUE)

plot(look, mfrow = c(1, 2) )
plot(look, mfrow = c(1, 2), type = "line")

# Alternatively:
par( mfrow = c(1, 2) )
hoods2dPlot( look$values, args = attributes( look ),
    main="Gilbert Skill Score")

## End(Not run)

SpatialVx documentation built on May 29, 2024, 9:31 a.m.