Estimates macro-F1 and its standard error from a confusion matrix whose
rows are sampling strata. The variance includes covariance between
class-specific F1 estimates.
Usage
aa_macro_f1_stratified(n, w, f1)
Arguments
- n
Confusion matrix of sample counts, with map classes in rows and
reference classes in columns.
- w
Population weight for each row stratum, in row order.
- f1
Estimated class-specific F1 scores in matrix class order.
Value
A named numeric vector with the macro-F1 estimate (`macroF1`), its
standard error (`macroF1_se`, `NA` if any stratum has one sample) and an
approximate standard error (`macroF1_se_approx`) in which single-sample
strata borrow the mean variance of the other strata