FeatureMatchAnalyzer {SpatialVx} | R Documentation |
Analyze Features of a Verification Set
Description
Analyze matched features of a verification set.
Usage
FeatureMatchAnalyzer(x, which.comps=c("cent.dist", "angle.diff", "area.ratio", "int.area",
"bdelta", "haus", "ph", "med", "msd", "fom", "minsep",
"bearing"), sizefac=1, alpha=0.1, k=4, p=2, c=Inf,
distfun="distmapfun", ...)
## S3 method for class 'matched.centmatch'
FeatureMatchAnalyzer(x, which.comps=c("cent.dist", "angle.diff",
"area.ratio", "int.area", "bdelta", "haus", "ph", "med",
"msd", "fom", "minsep", "bearing"), sizefac=1, alpha=0.1, k=4, p=2,
c=Inf, distfun="distmapfun", ...)
## S3 method for class 'matched.deltamm'
FeatureMatchAnalyzer(x, which.comps = c("cent.dist", "angle.diff",
"area.ratio", "int.area", "bdelta", "haus", "ph", "med", "msd",
"fom", "minsep", "bearing"), sizefac = 1, alpha = 0.1, k = 4, p = 2,
c = Inf, distfun = "distmapfun", ..., y = NULL, matches = NULL,
object = NULL)
## S3 method for class 'FeatureMatchAnalyzer'
summary(object, ...)
## S3 method for class 'FeatureMatchAnalyzer'
plot(x, ..., type = c("all", "ph", "med", "msd",
"fom", "minsep", "cent.dist", "angle.diff", "area.ratio",
"int.area", "bearing", "bdelta", "haus"))
## S3 method for class 'FeatureMatchAnalyzer'
print(x, ...)
FeatureComps(Y, X, which.comps=c("cent.dist", "angle.diff", "area.ratio", "int.area",
"bdelta", "haus", "ph", "med", "msd", "fom", "minsep", "bearing"),
sizefac=1, alpha=0.1, k=4, p=2, c=Inf, distfun="distmapfun", deg = TRUE,
aty = "compass", loc = NULL, ...)
## S3 method for class 'FeatureComps'
distill(x, ...)
Arguments
x , y , matches |
|
X , Y |
list object giving a pixel image as output from |
object |
list object returned of class “FeatureMatchAnalyzer”, this is the returned value from the self-same function. |
which.comps , type |
character vector indicating which properties of the features are to be analyzed ( |
sizefac |
single numeric by which area calculations should be multiplied in order to get the desired units. If unity (default) results are in terms of grid squares. |
alpha |
numeric value for the FOM measure (see the help file for |
k |
numeric indicating which quantile to use if the partial Hausdorff measure is to be used. |
p |
numeric giving the value of the parameter p for the Baddeley metric. |
c |
numeric giving the cut-off value for the Baddeley metric. |
distfun |
character naming a distance functions to use in calculating the various binary image measures. Default is Euclidean distance. |
deg , aty |
optional arguments to the |
loc |
two-column matrix giving location coordinates for centroid distance. If NULL, uses an indices based on the dimension of the field. |
... |
Additional arguments to Not used by |
Details
FeatureMatchAnalyzer
operates on objects of class “matched”. It is set up to calculate the values discussed in sec. 4 of Davis et al. (2006) for a single verification set (i.e., mean and standard deviation are not computed because it is only a single case). If criteria is 1, then features separated by a distance D < the sum of the sizes of the two features (size of a feature is defined as the square root of its area) are considered a match. If criteria is 2, then a match is made if D < the average of the sizes of the two features. Finally, criteria 3 decides a match as being anything less than a pre-determined constant.
FeatureComps
is the primary function called by FeatureMatchAnalyzer
, and is designed as a more stand-alone type of function. Several of the measures that can be calculated are simply the binary image measures/metrics available via, e.g., locperf
. It calculates comparisons between two matched features (i.e., between the verification and forecast fields).
distill
reduces a “FeatureComps” list object to a named numeric vector containing (in this order) the components that exist from "cent.dist", "angle.diff", "area.ratio", "int.area", "bdelta", "haus", "ph", "med", "msd", "fom", and "minsep". This is used, for example, by interester
, which is why the order is important.
The summary
method function for FeatureMatchAnalyzer
allows for passing a function, con, to determine confidence for each interest value. The idea being to set the interest to zero when the particular interest value does not make sense. For example, angle difference makes no sense if both objects are circles. Currently, no functions are included in this package for actually doing this, and so the functionality itself has not been tested.
The print
method function for FeatureMatchAnalyzer
first converts the object to a simple named matrix, then prints the matrix out. The resulting matrix is returned invisibly.
Value
FeatureMatchAnalyzer returns a list of list objects. The specific components depend on the 'which.comps' argument, and are the same as those returned by FeatureComps. These can be any of the following.
cent.dist |
numeric giving the centroid (Euclidean) distance. |
angle.diff |
numeric giving the orientation (major axis) angle difference. |
area.ratio |
numeric giving the area ratio, which is always between 0 and 1 because this is defined by Davis et al. (2006) to be the area of the smaller feature divided by that of the larger feature regardless of which field the feature belongs to. |
int.area |
numeric giving the intersection area of the features. |
bdelta |
numeric giving Baddeley's delta metric between the two features. |
haus , ph , med , msd , fom , minsep |
numeric, see locperf for specific information. |
bearing |
numeric giving the bearing from the forecast object centroid to the observed object centroid. |
The summary method for FeatureMatchAnalyzer invisibly returns a matrix with the same information, but where each matched object is a row and each column is the specific statistic. Or, if optional interest argument is passed, a list with components:
print
returns a named vector invisibly.
Author(s)
Eric Gilleland
References
Davis, C. A., Brown, B. G. and Bullock, R. G. (2006) Object-based verification of precipitation forecasts, Part I: Methodology and application to mesoscale rain areas. Mon. Wea. Rev., 134, 1772–1784.
See Also
Functions to identify features: FeatureFinder
Functions to merge and/or match objects: deltamm
, centmatch
, MergeForce
Functions to compute feature properties: locperf
, deltametric
, bearing
Function to calculate fuzzy logic interest values: interester
Examples
data( "ExampleSpatialVxSet" )
x <- ExampleSpatialVxSet$vx
xhat <- ExampleSpatialVxSet$fcst
hold <- make.SpatialVx( x, xhat, field.type="Example",
units = "units", data.name = "Example",
obs.name = "x", model.name = "xhat" )
look <- FeatureFinder(hold, smoothpar=1.5)
look2 <- centmatch(look)
tmp <- FeatureMatchAnalyzer(look2)
tmp
summary(tmp)
plot(tmp)