jaccard: Calculate the Jaccard coefficient.

Description Usage Arguments Details Value Author(s)

View source: R/comparison.R

Description

The Jaccard coefficient measures similarity between sample sets, and is defined as the size of the intersection divided by the size of the union of the sample sets. The Jaccard coefficient can be calculated for a subset of rasters provided by using the threshold argument.

Usage

1
2
jaccard(x, y, x.min = 0, x.max = 1, y.min = 0, y.max = 1,
  warn.uneven = FALSE, limit.tolerance = 4, disable.checks = FALSE)

Arguments

x

raster object.

y

raster object.

x.min

Numeric minimum threshold value for x to be used (default 0.0).

x.max

Numeric maximum threshold value for x to be used (default 1.0).

y.min

Numeric minimum threshold value for y to be used (default 0.0).

y.max

Numeric maximum threshold value for y to be used (default 1.0).

warn.uneven

Logical indicating whether a warning is raised if the compared raster coverages are very (>20x) uneven.

limit.tolerance

integer values that defines to which precision x and y limits are rounded to. This helps e.g. with values that close to 0 but not quite 0 (default: 4, i.e. round(x, 4)).

disable.checks

logical indicating if the input limit values are checked against the actual raster values in x and y.

Details

Min and max values must be provided for both RasterLayer objects x and y. Method can be used with RasterLayers of any value range, but the defaults [0.0, 1.0] are geared towards comparing Zonation rank priority rasters. Limits provided are inclusive.

Value

A numeric value [0, 1]

Author(s)

Joona Lehtomaki <[email protected]>


zonator documentation built on Dec. 17, 2017, 5:03 p.m.