The predictions are cut into presence and absence, and the table of decisions against
observations is summarised. With H the hits, F the false alarms, M the misses and C the
correct negatives:
Arguments
- y
Observed presence-absence,
0/1or logical.- p
Predicted scores for the same units, in the same order. Higher means presence.
- metric
One of the names in the table.
- rule
Threshold rule:
"youden","kappa","prevalence"or"mpa".kappa_score()cuts at"prevalence"by default, the rule the registeredkappametric reads, and the other functions at"youden".- threshold
NULLfor the maximum over every cut, or one cut, presence being predicted atp >= threshold.- perc
For
rule = "mpa", the share of presences the cut must keep,0.9by default. Where a rule is named without a call todecision_threshold()it takes that default.
Details
metric | reads |
"pod" | probability of detection, H / (H + M) |
"pofd" | probability of false detection, F / (F + C) |
"far" | false alarm ratio, F / (H + F) |
"sr" | success ratio, H / (H + F) |
"accuracy" | (H + C) / n |
"bias" | (H + F) / (H + M), the presences called against the presences there are |
"or" | odds ratio, H C / (M F) |
"orss" | odds ratio skill score, (H C - M F) / (H C + M F) |
"csi" | critical success index, H / (H + M + F) |
"ets" | equitable threat score, (H - h) / (H + M + F - h) with h = (H + M)(H + F) / n |
These are biomod2's evaluation statistics. biomod2 reads each at the cut that brings that
statistic closest to its own optimum on a grid of 100 cuts; here the cut is the one rule of
decision_threshold() selects, "youden" by default, or a threshold learned elsewhere. Read
at the cut that optimises it, some of these are trivial, so the cut is a separate choice and
stays fixed while the statistic changes. Each is registered under its name at the default rule,
so grain_ladder(metric = "csi") reads it. A registration at another rule is one line:
register_metric("csi_kappa", function(y, p) table_metric(y, p, "csi", "kappa")).
A value the table does not define, a zero denominator, is NA, as is a cell of one class.