threshold: Find a threshold

Description Usage Arguments Value Author(s) See Also Examples

Description

Find a threshold (cut-off) to transform model predictions (probabilities, distances, or similar values) to a binary score (presence or absence).

Usage

1
2
## S4 method for signature 'ModelEvaluation'
threshold(x, stat='', sensitivity=0.9, ...)

Arguments

x

A ModelEvaluation object (see evaluate

stat

character. To select a particular threshold (see section 'value' for possible values)

sensitivity

numeric between 0 and 1. For the fixed sensitivity threshold

...

Additional arguments. None implemented

Value

data.frame with the following columns:

kappa: the threshold at which kappa is highest ("max kappa")

spec_sens: the threshold at which the sum of the sensitivity (true positive rate) and specificity (true negative rate) is highest

no_omission: the highest threshold at which there is no omission

prevalence: modeled prevalence is closest to observed prevalence

equal_sens_spec: equal sensitivity and specificity

sensitivty: fixed (specified) sensitivity

Author(s)

Robert J. Hijmans and Diego Nieto-Lugilde

See Also

evaluate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## See ?maxent for an example with real data.
# this is a contrived example:
# p has the predicted values for 50 known cases (locations)
# with presence of the phenomenon (species)
p <- rnorm(50, mean=0.7, sd=0.3)
# b has the predicted values for 50 background locations (or absence)
a <- rnorm(50, mean=0.4, sd=0.4)
e <- evaluate(p=p, a=a)

threshold(e)

Example output

Loading required package: raster
Loading required package: sp
               kappa spec_sens no_omission prevalence equal_sens_spec
thresholds 0.6123099 0.6123099   0.1590457  0.5056294       0.5329869
           sensitivity
thresholds   0.2833957

dismo documentation built on May 2, 2019, 6:07 p.m.