confuseMatrix: Calculates the confusion matrix

Description Usage Arguments Details Value See Also Examples

View source: R/confuseMatrix.R

Description

confuseMatrix Returns the confusion matrix containing the sensitivity and specificity of the best model subset of a GARP run.

Usage

1

Arguments

n

a numeric value specifying the number of models in the best subset output from GARP

x

a raster object of the summated raster of the best models output from GARP

points

a spatial object of presence data to use for testing locations

Details

For discrete cutpoints (n), represents the number of models that agree on a predicted presence location.

The raster object (x) should be a raster representing the number of models that agree on a predicted presence location per pixel and that outtput by sumRasters.

The shapefile points should presence locations that were not used by GARP for model training and those output by splitData

Value

A data.frame object containing:

See Also

aucGARP

Examples

1
2
3
4
5
6
  set.seed(0)
  library(raster)
  r   <- raster(ncols = 100, nrows = 100)
  r[] <- rbinom(5, 10, 0.3)
  hs  <- data.frame("Latitude" = c(-89, 72, 63, 42, 54), "Longitude" = c(-12, 13, 24, 26, 87), "Species" = rep("Homo_sapiens", 5))
  confuseMatrix(n = 10, x = r, points = SpatialPoints(hs[,1:2]))

cghaase/GARPTools documentation built on Aug. 6, 2021, 6:38 a.m.