This directory contains the analysis notebooks supporting Chapter 2 of the associated thesis, which examines machine-learning prediction of regioselectivity in electrophilic halogenation. The workflows prepare literature-derived reaction data, train fingerprint-to-fingerprint (FP-to-FP) models, and compare the resulting predictions with computational and human benchmarks.
| Notebook | Description |
|---|---|
02_clean_reaxys_exports.ipynb |
Processes Reaxys exports to identify suitable electrophilic aromatic substitution reactions, reactants, and reaction centres. The current example configuration uses a fluorination export. |
03_build_halogenation_superset.ipynb |
Combines fluorination, chlorination, bromination, and iodination datasets; generates products; examines dataset overlap; constructs the combined superset; and evaluates the effect of training-set size. |
04_train_fp2fp_models.ipynb |
Trains and compares FP-to-FP models for chlorination, including random cross-validation, fingerprint-size analysis, and hyperparameter screening. |
05_evaluate_benchmarks.ipynb |
Compares the internal model and RegioML predictions on the common test set. |
06_human_benchmark_stats.ipynb |
Analyses the human benchmark and related model performance. Supplementary sections parse RegioSQM20 output and calculate timing statistics. |
07_reagents_summary.ipynb |
Summarises halogenating-reagent frequencies across the cleaned halogenation datasets. |
The notebooks use Python with Jupyter, RDKit, pandas, NumPy, scikit-learn, matplotlib, seaborn, tqdm, natsort, ipywidgets, XGBoost, SciPy, UMAP, Plotly, and venn. Several notebooks refer to local paths under /Users/hmm/PhD/; these should be replaced with project-relative paths or a configuration file before reuse.
The analysis uses Reaxys-derived reaction records. Raw exports and molecule-level derivative datasets are not included because their redistribution may be restricted by the underlying data licence. The human-benchmark response spreadsheet also remains private because it contains response-level information. Public releases should include cleaned code, aggregate results, and anonymised human-benchmark summaries where appropriate.
The notebooks retain the analysis used for the thesis and include exploratory sections. A publication-ready release should clear notebook outputs, record package versions, use relative paths, and verify that benchmark predictions and reference products are aligned before calculating performance statistics. Distribution of fitted model files trained on Reaxys-derived data should be confirmed separately.