@@ -108,7 +108,9 @@ def hist_classified_stable_vs_hull_dist(
108
108
df .groupby (kwargs ["facet_col" ]) if "facet_col" in kwargs else [(None , df )]
109
109
):
110
110
true_pos , false_neg , false_pos , true_neg = classify_stable (
111
- df_group [each_true_col ], df_group [each_pred_col ], stability_threshold
111
+ df_group [each_true_col ],
112
+ df_group [each_pred_col ],
113
+ stability_threshold = stability_threshold ,
112
114
)
113
115
114
116
# switch between hist of DFT-computed and model-predicted convex hull distance
@@ -264,6 +266,7 @@ def hist_classified_stable_vs_hull_dist(
264
266
def rolling_mae_vs_hull_dist (
265
267
e_above_hull_true : pd .Series ,
266
268
e_above_hull_preds : pd .DataFrame | dict [str , pd .Series ],
269
+ * ,
267
270
df_rolling_err : pd .DataFrame | None = None ,
268
271
df_err_std : pd .DataFrame | None = None ,
269
272
window : float = 0.04 ,
@@ -567,6 +570,7 @@ def rolling_mae_vs_hull_dist(
567
570
def cumulative_metrics (
568
571
e_above_hull_true : pd .Series ,
569
572
df_preds : pd .DataFrame ,
573
+ * ,
570
574
metrics : Sequence [str ] = ("Precision" , "Recall" ),
571
575
stability_threshold : float = 0 , # set stability threshold as distance to convex
572
576
# hull in eV / atom, usually 0 or 0.1 eV
@@ -635,7 +639,10 @@ def cumulative_metrics(
635
639
each_true = e_above_hull_true .loc [each_pred .index ]
636
640
637
641
true_pos_cum , false_neg_cum , false_pos_cum , _true_neg_cum = map (
638
- np .cumsum , classify_stable (each_true , each_pred , stability_threshold )
642
+ np .cumsum ,
643
+ classify_stable (
644
+ each_true , each_pred , stability_threshold = stability_threshold
645
+ ),
639
646
)
640
647
641
648
# precision aka positive predictive value (PPV)
0 commit comments