Skip to content

Commit

Permalink
Fix rule of 3 and update version
Browse files Browse the repository at this point in the history
  • Loading branch information
mwlkhoo committed Apr 11, 2024
1 parent 0e18600 commit a5f3d7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_data_files(parent_dir):

setup(
name="stats_utils",
version="0.0.8",
version="0.0.9",
description="Statistics utilities for remoscope and corresponding paper",
long_description=readme(),
url="https://github.com/czbiohub-sf/remo-stats-utils",
Expand Down
6 changes: 2 additions & 4 deletions stats_utils/corrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,12 @@ def _get_res_from_counts(

# Use rule of 3 if there are no parasites
if parasites == 0:
rel_bound = 3 / corrected_counts[YOGO_CLASS_IDX_MAP["healthy"]]
abs_bound = 100 * 3 / corrected_counts[YOGO_CLASS_IDX_MAP["healthy"]]
else:
rel_bound = 1.69 * self._calc_parasitemia_rel_err(
corrected_counts, count_vars, parasites=parasites
)

# Convert relative error into absolute error
abs_bound = rel_bound * parasitemia
abs_bound = rel_bound * parasitemia

if units_ul_out:
return (
Expand Down

0 comments on commit a5f3d7a

Please sign in to comment.