campa.tl.thresholded_median
- thresholded_median(df, threshold=0.9)[source]
Calculate median area of large CSL objects per cell.
Sort objects by area (largest areas first) and compute the median area of all objects that are below cumulative sum of threshold. This is essentially a small object invariant way of computing median. Can be used as aggregation function in
FeatureExtractor.get_object_stats().- Parameters
threshold – Only consider large objects up to the cumulative sum of 90% of the total area.
- Return type
median