Skip to content

ivan-pikulin/molgraphX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Molgraph Explainer

Setup

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 setup

or, manually

make install_all
make download_dataset
mkdir Output

This process prepares the virtual environment, installs all necessary dependencies, and populates the Data folder with the required datasets.

Hyperparameter Optimization

To initiate the search for optimal hyperparameters, use:

make optimize_hparams

To 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.

Model Training

Execute the following to commence training:

make run_training

Upon completion, the performance metrics will be accessible in Output/trained_model/metrics.json.

Prediction

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 predictions

Explanation

Generate 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.

Computational Time Analysis

To assess the computational efficiency of various methods, follow this two-step procedure:

  1. Record the times:
make comp_time
  1. 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published