Skip to main content

MolALKit: A Toolkit for Active Learning in Molecular Data.

Project description

# MolALKit: A Toolkit for Active Learning in Molecular Data. This software package serves as a robust toolkit designed for the active learning of molecular data.

## Installation ` pip install numpy==1.22.3 git+https://gitlab.com/Xiangyan93/graphdot.git@feature/xy git+https://github.com/bp-kelley/descriptastorus git+https://github.com/Xiangyan93/chemprop.git@molalkit pip install mgktools molalkit `

## Data MolALKit currently supports active learning exclusively for single-task datasets, which can be either classification or regression tasks.

### Custom Dataset The data file must be in CSV format with a header row, structured as follows: ` smiles,p_np [Cl].CC(C)NCC(O)COc1cccc2ccccc12,1 C(=O)(OC(C)(C)C)CCCc1ccc(cc1)N(CCCl)CCCl,1 ... ` The following arguments are required to run the active learning ` --data_path <dataset.csv> --pure_columns <smiles> --target_columns <target> --dataset_type <classification/regression> `

### Public Dataset The toolkit incorporates several popular public datasets, such as MoleculeNet and TDC, which can be used directly –data_public <dataset name>.

Here is the list of available datasets: ` from molalkit.data.datasets import AVAILABLE_DATASETS print(AVAILABLE_DATASETS) `

### ActiveLearning/Validation Split Our code supports several methods of splitting data into an active learning set and a validation set. The active learning is used for active learning and the validation set is used for evaluating the performance of the active learning model. * random The data will be split randomly. * scaffold_order With this approach, the data is split based on molecular scaffolds, ensuring that the same scaffold never appears in both the active learning and validation sets. The scaffold containing the most molecules is placed in the active learning set. This method aligns with the implementation in DeepChem and is independent of random seeds. * scaffold_random In this method, the placement of scaffolds in either the active learning set or the validation set is done randomly. This split is dependent on random seeds and introduces an element of randomness into the scaffold split.

The following arguments are required for data split: ` --split_type <random/scaffold_order/scaffold_random> --split_sizes <active learning set ratio> <validation set ratio> --seed <random seed> `

## Surrogate Model The surrogate model used in this package is described in a json config file. Here is the list of built-in surrogate models: ` from molalkit.models.configs import AVAILABLE_MODELS print(AVAILABLE_MODELS) ` The model config files are placed in [molalkit/models/configs](https://github.com/RekerLab/MolALKit/tree/main/molalkit/models/configs). The following arguments are required for choosing a surrogate model: ` --model_config_selector <model_config_file> `

## First Example Here’s an example of running active learning using MolALKit with the BACE dataset, a 50:50 scaffold split, and Random Forest as the surrogate model: ` molalkit_run --data_public bace --metrics roc-auc mcc accuracy precision recall f1_score --learning_type explorative --model_config_selector RandomForest_Morgan_Config --split_type scaffold_order --split_sizes 0.5 0.5 --evaluate_stride 10 --seed 0 --save_dir bace `

## Usage More examples can be found at [examples](https://github.com/RekerLab/MolAlKit/tree/main/examples).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molalkit-0.5.2.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

molalkit-0.5.2-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file molalkit-0.5.2.tar.gz.

File metadata

  • Download URL: molalkit-0.5.2.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for molalkit-0.5.2.tar.gz
Algorithm Hash digest
SHA256 bc93ca387c738a15a245953dda99ec7290689bbbee0ae4b2e42c0e9d7bafa88a
MD5 b24d8e1474a308663c3cfa344c7adab3
BLAKE2b-256 3838b69fc84fd7b1e37f45a53722ad600d3eabc8ce5e98a26b2fc942503cceef

See more details on using hashes here.

File details

Details for the file molalkit-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: molalkit-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for molalkit-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65609cb2a4cce9a9039ee1c55215c54b4b880e0100e5d37a6d5e48853b7edb79
MD5 ab8ae8c080ba2c3de4a44cb100c4e3af
BLAKE2b-256 b2d1b8364d9ccabe9dc355f2f04a479a5ace1f5efb7748da25be2f6ad0103bd5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page