This repository contains code and data for our comprehensive benchmarking study of machine learning (ML) pipelines (i.e., combinations of compound representation, dimension reduction, and ML model) on 52 hormone receptor activity assays from the ToxCast dataset.
Our repo contains our scripts for the following parts:
- To reproduce our splits, you have to run the
run_datasail.pyscript indata_processingfolder. You can set one value forepsilonanddeltavia the command line. We first ran datasail withepsilon = delta = 0.05, which is also the default of datasail. Then, we increased them to0.1,0.2, and0.3. Note that we only ran datasail with relaxed constraints for assays that were not feasible with lowerepsilonanddeltavalues. To run datasail, you need to create a conda environment using thedata_processing/datasail_env.ymlfile. - To generate a dummy dimension reduction (DR) file for the "no DR" experiments, you can run
generate_feature_name_list_no_DR.pyindata_processing. data_processingalso contains a script to generate the embeddings
- The dimension reduction (DR) methds are implemented in the
dr_methodsfolder. It contains amain_dimension_reduction.py, which can be called to run any of the implemented DR methods given a config file. To generate config files, we provide a bash script calledjson_config_generator.sh. - In
run_pipeline, we provide two python scriptsexecute_DR_on_ToxCast_Downloads.pyandexecute_DR_on_embeddings.py, that run the dimension reduction for all train test splits and all feature types considered in our study.
- In
run_pipeline, we provide two python scriptsrobust_ToxCast_predicitons_and_HT.pyandexecute_DR_on_embeddings.py, that run all models with all DR methods for a compound representation given via the command line. Notably, formorganandembeddings, we could not run TabPFN without DR, as we use the version that only supports 500 features. - For CheMeleon, we provide
fine_tune_chemeleon.pyinrun_pipelineandCheMeleon.pyinmodels. The pretrained checkpoint is not included in the repository. To run the model, download the CheMeleon checkpoint and save it aspretrained_models/chemeleon_mp.pt.
In the evaluation folder, we provide plotting scripts to generate the figures presented in the paper. The results of running all these scripts are, however, also lying in the plotting_results folder.
Note: For all scripts except the datasail script, we provide a conda environment file called benchmarking_environment.yml. Moreover, we use relative paths in our scripts, so, you have to run them in the folder, where they are located. If you want to run our scripts from somewhere else, you need to adjust the paths respectively.