Skip to content

Commit e6f4863

Browse files
committed
Refactored Lengthy analyze_experiment.py codes
Moved plotting functions to separate file, moved shareable constants to a shareable file, added unit test (with pytest) to check sanity.
1 parent 7d9a428 commit e6f4863

6 files changed

Lines changed: 940 additions & 573 deletions

File tree

constants.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Exponential smoothing parameters
2+
SMOOTHING_SLIDER_BEST_FITNESS = 0.05
3+
SMOOTHING_SLIDER_CURRENT_FITNESS = 0.75
4+
SMOOTHING_SLIDER_INDIVIDUAL_METRICS = 0.3
5+
6+
# Metric weights from our composite fitness
7+
METRIC_WEIGHTS = {
8+
"f1_macro": 0.30,
9+
"recall_macro": 0.20,
10+
"roc_auc": 0.20,
11+
"precision_macro": 0.15,
12+
"accuracy": 0.10,
13+
"f1_micro": 0.05,
14+
}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ dependencies = [
2020
[dependency-groups]
2121
dev = [
2222
"ruff>=0.14.1",
23+
"pytest>=8.3.0",
2324
]

0 commit comments

Comments
 (0)