lazyslide.metrics.segmentation.precision#
- precision(stats)#
Compute precision from segmentation statistics.
Precision measures the proportion of predicted positive instances that are actually positive. It answers the question: “Of all the instances we predicted as positive, how many were actually positive?”
- Parameters:
- statsSegmentationStats
Segmentation statistics containing true positives (tp) and false positives (fp).
- Returns:
- float
Precision score in the range [0, 1], where 1 is perfect precision. A small epsilon (1e-8) is added to the denominator to avoid division by zero.
Notes
Precision = TP / (TP + FP)