Connectivity Index

Description

Calculate the connectivity index of an image.

Usage

1
2
3
4
5
6
7
8
Cindex(x, thresh = NULL, connect.method = "C", ...)

## Default S3 method:
Cindex(x, thresh = NULL, connect.method = "C", ...)

## S3 method for class 'SpatialVx'
Cindex(x, thresh = NULL, connect.method = "C", ...,
    time.point = 1, model = 1)

Arguments

x

Default: m by n numeric matrix giving the field for which the shape index is to be calculated.

Sindex.SpatialVx: list object of class “SpatialVx”.

thresh

Set values under (strictly less than) this threshold to zero, and calculate the connectivity index for the resulting image. If NULL, no threshold is applied.

connect.method

character string giving the method argument for the connected function of package spatstat. This must be one of “C” or “interpreted”. See the help file for connected for more details.

time.point

numeric or character indicating which time point from the “SpatialVx” verification set to select for analysis.

model

numeric indicating which forecast model to select for the analysis.

...

Not used.

Details

The connectivity index is introduced in AghaKouchak et al. (2011), and is designed to automaticlaly determine how connected an image is. It is defined by

Cindex = 1 - (NC - 1)/(sqrt(NP) + NC),

where 0 <= Cindex <= 1 is the connectivity index (values close to zero are less connected, and values close to 1 are more connected), NP is the number of nonzero pixels, and NC is the number of isolated clusters.

The function connected from package spatstat is used to identify the number of isolated clusters.

Value

numeric giving the connectivity index.

Author(s)

Eric Gilleland

References

AghaKouchak, A., Nasrollahi, N., Li, J., Imam, B. and Sorooshian, S. (2011) Geometrical characterization of precipitation patterns. J. Hydrometerology, 12, 274–285, doi:10.1175/2010JHM1298.1.

See Also

connected, as.im, Sindex, Aindex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(geom000)
Cindex(geom000)

data(pert000)
Cindex(pert000)

## Not run: 
# Two separate areas with highly structured shapes, but far away from each other.
data(pert006)
data(ICPg240Locs)

hold <- make.SpatialVx(pert000, pert006, loc=ICPg240Locs,
    projection=TRUE, map=TRUE, loc.byrow = TRUE,
    field.type="Precipitation", units="mm/h",
    data.name=c("ICP Perturbed Cases", "pert000", "pert006"))

plot(hold, set.pw=TRUE)

Cindex(hold)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.