View full-text article in PMC Sensors (Basel). 2024 Sep 26;24(19):6244. doi: 10.3390/s24196244 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 3 Calculate mean threshold Require: DataFrame df_counts Ensure: Mean Threshold mean_threshold 1:all_counts←df_counts.values.flatten() 2:non_zero_counts←all_counts[all_counts>0] 3:mean_threshold←1n∑i=1nxiforxi∈non_zero_counts 4:return mean_threshold