Skip to content

Commit 24cab3d

Browse files
committed
rename hist_classified_stable_as_func_of_hull_dist() to hist_classified_stable_vs_hull_dist()
1 parent 9c6d61c commit 24cab3d

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

matbench_discovery/plot_scripts/hist_classified_stable_as_func_of_hull_dist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from matbench_discovery.plots import (
99
StabilityCriterion,
1010
WhichEnergy,
11-
hist_classified_stable_as_func_of_hull_dist,
11+
hist_classified_stable_vs_hull_dist,
1212
)
1313

1414
__author__ = "Rhys Goodall, Janosh Riebesell"
@@ -59,7 +59,7 @@
5959
pred_cols = df.filter(regex=r"_pred_\d").columns
6060
assert len(pred_cols) == 10
6161

62-
ax, metrics = hist_classified_stable_as_func_of_hull_dist(
62+
ax, metrics = hist_classified_stable_vs_hull_dist(
6363
e_above_hull_pred=df[pred_cols].mean(axis=1) - df[target_col],
6464
e_above_hull_true=df.e_above_hull,
6565
which_energy=which_energy,

matbench_discovery/plot_scripts/hist_classified_stable_as_func_of_hull_dist_batches.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from matbench_discovery.plots import (
1010
StabilityCriterion,
1111
WhichEnergy,
12-
hist_classified_stable_as_func_of_hull_dist,
12+
hist_classified_stable_vs_hull_dist,
1313
plt,
1414
)
1515

@@ -77,7 +77,7 @@
7777
batch_df = df[df.index.str.startswith(f"wbm-step-{batch_idx}-")]
7878
assert 1e4 < len(batch_df) < 1e5, print(f"{len(batch_df) = :,}")
7979

80-
ax, metrics = hist_classified_stable_as_func_of_hull_dist(
80+
ax, metrics = hist_classified_stable_vs_hull_dist(
8181
e_above_hull_pred=batch_df.e_form_per_atom_pred - batch_df.e_form_per_atom,
8282
e_above_hull_true=batch_df.e_above_hull_mp,
8383
which_energy=which_energy,
@@ -92,7 +92,7 @@
9292
ax.set(title=title)
9393

9494

95-
ax, metrics = hist_classified_stable_as_func_of_hull_dist(
95+
ax, metrics = hist_classified_stable_vs_hull_dist(
9696
e_above_hull_pred=df.e_form_per_atom_pred - df.e_form_per_atom,
9797
e_above_hull_true=df.e_above_hull_mp,
9898
which_energy=which_energy,

matbench_discovery/plots.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
# --- end global plot settings
6464

6565

66-
def hist_classified_stable_as_func_of_hull_dist(
66+
def hist_classified_stable_vs_hull_dist(
6767
e_above_hull_pred: pd.Series,
6868
e_above_hull_true: pd.Series,
6969
std_pred: pd.Series = None,
File renamed without changes.

tests/test_plots.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
AxLine,
1313
StabilityCriterion,
1414
cumulative_clf_metric,
15-
hist_classified_stable_as_func_of_hull_dist,
15+
hist_classified_stable_vs_hull_dist,
1616
rolling_mae_vs_hull_dist,
1717
)
1818

@@ -130,7 +130,7 @@ def test_rolling_mae_vs_hull_dist(
130130
@pytest.mark.parametrize("stability_threshold", (0.1, 0.01))
131131
@pytest.mark.parametrize("stability_crit", ("energy", "energy+std", "energy-std"))
132132
@pytest.mark.parametrize("x_lim", ((0, 0.6), (-0.2, 0.8)))
133-
def test_hist_classified_stable_as_func_of_hull_dist(
133+
def test_hist_classified_stable_vs_hull_dist(
134134
stability_threshold: float,
135135
stability_crit: StabilityCriterion,
136136
x_lim: tuple[float, float],
@@ -146,7 +146,7 @@ def test_hist_classified_stable_as_func_of_hull_dist(
146146
else:
147147
std_total = None
148148

149-
ax, metrics = hist_classified_stable_as_func_of_hull_dist(
149+
ax, metrics = hist_classified_stable_vs_hull_dist(
150150
e_above_hull_pred=df.e_above_hull_pred,
151151
e_above_hull_true=df.e_above_hull_mp,
152152
ax=ax,

0 commit comments

Comments
 (0)