Flash Sale | 50% off

Last chance! 50% off unlimited learning

Sale ends in


bamm (version 0.5.0)

jaccard: jaccard: Estimates the Jaccard index for comparing two binary maps

Description

Estimates the Jaccard index for comparing two binary maps

Usage

jaccard(m1, m2)

Value

Returns a data.frame with three values: 1) jaccard (Jaccard index), 2) percentage_m1 (the percentage of m1 that the intersection |AB| represents), and 3) percentage_m2

Arguments

m1

A binary raster A or an object of class setA returned by the function model2sparse.

m2

A binary raster A or an object of class setA returned by the function model2sparse.

Author

Luis Osorio-Olvera & Jorge Soberón

Details

The Jaccard index is computed as follows J(A,B)=|AB||AB|=|AB||A|+|B||AB|.

Examples

Run this code
m1_path <- system.file("extdata/conejos/Lepus_othus_cont.tif",
                       package = "bamm")
m2_path <- system.file("extdata/conejos/Brachylagus_idahoensis_cont.tif",
                       package = "bamm")
m1 <- raster::raster(m1_path) > 0.01
m2 <- raster::raster(m2_path) >0.01
jcc <- bamm::jaccard(m1,m2)
print(jcc)

Run the code above in your browser using DataLab