Calculate the F1 score
aa_f1.RdCalculates the F1 score as the harmonic mean of user's accuracy (UA) and producer's accuracy (PA). If standard errors of UA and PA are provided, the standard error of the F1 score is calculated using first-order uncertainty propagation.
Value
A data.frame containing two numeric vectors:
f1: The F1 score.f1_se: The standard error of the F1 score. This isNULLifua_seorpa_seis not provided.
Details
$$F_1 = \frac{2 \times UA \times PA}{UA + PA}$$
The standard error is calculated as:
$$SE(F_1) = \sqrt{\frac{4 \times \left(SE(UA)^2 \times PA^4 + SE(PA)^2 \times UA^4\right)}{(UA + PA)^4}}$$
This calculation assumes that UA and PA are statistically independent and therefore does not include a covariance term.