Four main metrics are calculated to report on the performance of the model for coordinates. These are
Accuracy, \(\frac{TP}{TP + FP + FN}\), here defined as such in a system without True Negatives.
Recall, \(\frac{TP}{TP + FN}\), Kent et al. (1955)
Precision, \(\frac{TP}{TP + FP}\), Kent et al. (1955)
F1 score, \(\frac{2}{\frac{1}{Precision} + \frac{1}{Sensitivity}}\), van Rijsbergen(1979).
Additional metrics are calculated, including: 1) a distance-weighed confusion matrix where the sum of each type of error (False Negatives and False Positives)
is done by weights, calculated to be inverse to the mean euclidean distance of that data point to all others. This way errors that are close to existing data
for that species will count less than those further way, i.e. a data point was hallucinated that was close to existing data or, a data point was missed that
is already represented in the data. This adjusted confusion matrix is also presented along with versions of the four main metrics calculated with these values.
To report on the performance of locations, by default the minimum Levenshtein distance (Levenshtein, 1966) between a term and all other terms is calculated. Which is defined as:
$$
lev(a,b) = \begin{cases}
|a| & if |b|=0, \\
|b| & if |a|=0, \\
lev(tail(a),tail(b)) & if head(a) = head(b), \\
1 + min
\begin{cases}
lev (tail(a),b) \\
lev (a,tail(b)) \\
lev (tail(a),tail(b)) \\
\end{cases}
& otherwise
\end{cases}
$$
In short, the number of edits needed to turn one string a into string b.