To accommodate dependencies that are specific to either GPU or CPU, you must define the target device. To do this,
modify the DEVICE variable in the Makefile. Proceed with the setup by executing:
make setupor, manually
make install_all
make download_dataset
mkdir OutputThis process prepares the virtual environment, installs all necessary dependencies, and populates the Data folder with
the required datasets.
To initiate the search for optimal hyperparameters, use:
make optimize_hparamsTo tailor the search space, adjust the settings in the objective function within the Experiments/optimize_hparams.py
script.
Subsequently, incorporate the optimized hyperparameters into the Experiments/train.py script.
Execute the following to commence training:
make run_trainingUpon completion, the performance metrics will be accessible in Output/trained_model/metrics.json.
For predictions on new data, ensure you have a trained model and a .csv file featuring a smiles column.
To predict dipole moments for all molecules in the QM9 dataset, execute:
make predictionsGenerate explanations for model predictions with the command:
venv/bin/python3 -m Experiments.demonstrations.subgraphX \
--smiles "CCC(=O)" \
--model-folder "Output/trained_model" \
--output-file "Output/subgraphX_explanation.png"Examples demonstrating the usage of other explainers
are available within the test_explainers function in the Makefile.
To assess the computational efficiency of various methods, follow this two-step procedure:
- Record the times:
make comp_time- Evaluate the findings:
Start the Jupyter Notebook server with /venv/bin/jupyter notebook, navigate
to Experiments/analyse_computational_time.ipynb, and select the molgraphx kernel for analysis.