terra_jaccard | R Documentation |
Jaccard coefficient among two SpatRaster objects
terra_jaccard(x, y)
x |
SpatRaster object with binary values. |
y |
SpatRaster object with binary values. |
Jaccard similarity coefficient evaluates the percentage number equal to the intersection between two sets, divided by the size of the union of these sets.
A numeric value [0,1]
.
set.seed(42)
x <- terra::rast(matrix(rbinom(100, 1, 0.2), nrow=10))
y <- terra::rast(matrix(rbinom(100, 1, 0.8), nrow=10))
terra_jaccard(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.