Skip to content

Commit 8757ada

Browse files
committed
Make extrapolation figure reproducible across platforms
1 parent 5c084ea commit 8757ada

9 files changed

Lines changed: 157 additions & 142 deletions
-13 Bytes
Binary file not shown.
521 Bytes
Loading

‎figures/extended_data/ED_Fig6_extrapolation.svg‎

Lines changed: 68 additions & 68 deletions
Loading
-13 Bytes
Binary file not shown.
521 Bytes
Loading

‎paper/extended_data/ED_Fig6_extrapolation.svg‎

Lines changed: 68 additions & 68 deletions
Loading

‎paper/review_combined.pdf‎

-13 Bytes
Binary file not shown.

‎release_manifest.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@
170170
"sha256": "641e6c295dbafaca5686a969829bf90ace78a446af932641d64280b63ee3fe64"
171171
},
172172
"paper/extended_data/ED_Fig6_extrapolation.pdf": {
173-
"bytes": 31616,
174-
"sha256": "48de44dae207556e775484afab50cfd47c3ae4bc90fa2cfc18f736b2b7d3fb23"
173+
"bytes": 31603,
174+
"sha256": "45739c11293a16208099222cd73130943e55c8c2c32791740e686a1c24ceb599"
175175
},
176176
"paper/extended_data/ED_Table1.pdf": {
177177
"bytes": 32271,
178178
"sha256": "9b206a1e94c7c1974a9136b018b58436735804d2171846d7656f2c484cbbbe04"
179179
},
180180
"paper/review_combined.pdf": {
181-
"bytes": 705874,
182-
"sha256": "6d5bf45b42054721d4477e1830a206ed0269375386ef55855411048d75adc050"
181+
"bytes": 705861,
182+
"sha256": "23c1c207aec91b5f6b53c90a242f539dafdb4306160eca31916441c7b30bc09c"
183183
},
184184
"paper/supplementary_data/Supplementary_Data_1_experiment_ledger.csv": {
185185
"bytes": 5373,

‎scripts/make_figures.py‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,11 +819,26 @@ def ed_fig5_lambda(metrics: dict) -> None:
819819

820820
def ed_fig6_extrapolation(primary: pd.DataFrame, separation: pd.DataFrame) -> None:
821821
full = primary.loc[primary.method.eq("F_full_solvai")].copy()
822-
families = full.groupby("functional_group_family").size().sort_values(ascending=False).index
822+
family_counts = (
823+
full.groupby("functional_group_family", sort=True)
824+
.size()
825+
.rename("count")
826+
.reset_index()
827+
.sort_values(
828+
["count", "functional_group_family"],
829+
ascending=[False, True],
830+
kind="mergesort",
831+
)
832+
)
833+
families = family_counts["functional_group_family"].to_list()
823834
fig, axes = plt.subplots(1, 2, figsize=(7.2, 3.35), gridspec_kw={"width_ratios": [1.25, 1.0]})
824835
rng = np.random.default_rng(20260828)
825836
for position, family in enumerate(families):
826-
values = full.loc[full.functional_group_family.eq(family), "absolute_error"].to_numpy()
837+
values = (
838+
full.loc[full.functional_group_family.eq(family)]
839+
.sort_values("molecule_id", kind="mergesort")["absolute_error"]
840+
.to_numpy()
841+
)
827842
jitter = rng.uniform(-0.12, 0.12, len(values))
828843
axes[0].scatter(values, position + jitter, s=12, color=DEPLOY, alpha=0.8)
829844
axes[0].plot(

0 commit comments

Comments
 (0)