geetools.classification.binaryMetrics#

geetools.classification.binaryMetrics(truth, classified, scale, region=None)#

Get accuracy from a truth image and a classified image.

names from: https://en.wikipedia.org/wiki/Evaluation_of_binary_classifiers

Parameters:
  • truth (ee.Image) – binary truth image. Only the first band will be used

  • classified (ee.Image) – the classification results. Only the first band will be used

  • scale (int) – the scale for the analysis

  • region (ee.Geometry) – the region for the analysis.

Returns:

a dictionary with the following

TPR = True Positive Rate, recall or sensitivity TNR = True Negative Rate, selectivity or specificity PPV = Positive Predictive Value or precision NPV = Negative Predictive Value FNR = False Negative Rate or miss rate FPR = False Positive Rate or fall-out FDR = False Discovery Rate FOR = False Omission Rate TS = Threat score ACC = Accuracy BA = Balanced Accuracy F1 = F1 score :rtype: ee.ConfusionMatrix