Learn R Programming

biomod2 (version 3.5.1)

calculate.stat: Calculate evaluation metrics based on a misclassification table

Description

calculate.stat is an internal biomod2 function to get scores, based on a misclassification table, of some referenced evaluation metrics.

Usage

calculate.stat( Misc,
                  stat='TSS')

Value

The stat score for the Misc table.

Arguments

Misc

a misclassification table

stat

either 'TSS', 'KAPPA', 'ACCURACY', 'BIAS', 'POD', 'FAR', 'POFD', 'SR', 'CSI', 'ETS', 'HK', 'HSS', 'OR' or 'ORSS'

Author

Damien Georges

Details

Please refer to BIOMOD_Modeling to get more information about this metrics.

See Also

BIOMOD_Modeling, getStatOptimValue, Find.Optim.Stat

Examples

Run this code
  a <- sample(c(0,1),100, replace=TRUE)
  b <- sample(c(0,1),100, replace=TRUE)
  
  miscTab_aa <- table(a,a)
  miscTab_ab <- table(a,b)
  
  # perfect score
  calculate.stat( miscTab_aa, stat='TSS')
  # random score
  calculate.stat( miscTab_ab, stat='TSS')
  

Run the code above in your browser using DataLab