Skip to content

Commit 9a62d3d

Browse files
committed
add simple thresholding script
1 parent 670c39a commit 9a62d3d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/ej/thresholding.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from create_ej_dump import load_json_file, create_cmr_dict, update_cmr_with_classifications
2+
3+
inferences = load_json_file("cmr-inference.json")
4+
cmr = load_json_file("cmr_collections_umm_20240807_142146.json")
5+
6+
cmr_dict = create_cmr_dict(cmr)
7+
8+
for threshold in [0.5, 0.6, 0.7, 0.8, 0.9]:
9+
predicted_cmr = update_cmr_with_classifications(inferences=inferences, cmr_dict=cmr_dict, threshold=threshold)
10+
print(f"Threshold: {int(threshold*100)}%, EJ datasets: {len(predicted_cmr)}")

0 commit comments

Comments
 (0)