Description Usage Arguments Value Author(s) See Also Examples
accuracy
estimates six measures of accuracy for
presence-absence or presence-psuedoabsence data. These
include AUC, ommission rates, sensitivity, specificity,
proportion correctly identified and Kappa.
Note: this method will exclude any missing data.
1 | accuracy(obs, pred, threshold = 0.5)
|
obs |
a vector of observed values which must be 0 for absences and 1 for occurrences |
pred |
a vector of the same length as |
threshold |
this can be: |
a data.frame with seven columns:
threshold |
the threshold values representing each row of data |
AUC |
the AUC given the defined threshold value |
ommission.rate |
the ommission rate as a proportion of true occurrences misidentified given the defined threshold value |
sensitivity |
the sensitivity given the defined threshold value |
specificity |
the specificity given the defined threshold value |
prop.correct |
the proportion of the presence and absence records correctly identified given the defined threshold value |
Kappa |
the Kappa statistic of the model given the defined threshold value |
Jeremy VanDerWal jjvanderwal@gmail.com
auc
, Kappa
,
omission
, sensitivity
,
specificity
, prop.correct
,
confusion.matrix
1 2 3 4 5 6 7 8 9 10 11 12 | #create some data
obs = c(sample(c(0,1),20,replace=TRUE),NA); obs = obs[order(obs)]
pred = runif(length(obs),0,1); pred = pred[order(pred)]
#calculate accuracy of the model with a single threshold value
accuracy(obs,pred,threshold=0.5)
#calculate accuracy given several defined thresholds
accuracy(obs,pred,threshold=c(0.33,0.5,0.66))
#calculate accuracy given a number of equal interval thresholds
accuracy(obs,pred,threshold=20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.