Skip to main content

Smart consensus QSAR

Project description

QSARcons - smart search for consensus of QSAR models

The motivation behind this project is that there are many available chemical descriptors and machine learning methods, and usually, it is not obvious which combination to prefer for modelling the target property of the molecule. Therefore, the idea is just to build multiple (>100) simple individual QSAR models with diverse descriptors and algorithms, and then a genetic algorithm to smartly optimize the subset of models delivering the best performance on the validation dataset.

Motivation

1. Simple design: QSARcons focuses on simplicity of use. The default pipeline just requires training and test data.

2. Traditional QSAR: QSARcons includes a wide range of traditional molecular descriptors and machine learning algorithms, providing a transparent baseline for comparison with more advanced approaches like deep learning-based or complex QSAR workflows.

3. Universal workflow - QSARcons can be applied to any type of chemical property modelling.

Overview

QSARcons provides a two-layer workflow.

1. Model generation

Build multiple QSAR models (>100) using 2D chemical descriptors and traditional machine learning algorithms. The individual model building pipeline is kept simple, without advanced data preprocessing. Optional in-house stepwise hyperparameter optimization is available for all ML methods.

2. Consensus search

Identify the optimal subset of QSAR models using several search strategies:

  • Random search

  • Systematic search

  • Genetic search

Installation

pip install qsarcons

QSARcons benchmarking

QSARcons can be easily benchmarked against alternative approaches. For that, just call the default pipeline function below. Input data are dataframes where the first column is molecule SMILES and the second column is molecule property (regression or binary classification).

from datasets import load_dataset
from qsarcons.meta import ConsensusModel

train_df = load_dataset("openadmet/openadmet-expansionrx-challenge-data", split="train").to_pandas()
test_df = load_dataset("openadmet/openadmet-expansionrx-challenge-data", split="test").to_pandas()

prop_name = "Caco-2 Permeability Efflux"
train_df = train_df[["SMILES", prop_name]].dropna()
test_df = test_df[["SMILES", prop_name]].dropna()

output_folder = f"{prop_name}_qsarcons"

model = ConsensusModel(hopt=False, output_folder=output_folder, verbose=True)
test_df_pred = model.run_predict(train_df, test_df)

print(model.best_cons)

Colab

See an example in QSARcons pipeline .

QSARcons Basic vs. QSARcons Pro

The QSARcons idea is that diverse and strong individual models can be combined to even stronger consensus. Currently, two versions are under development:

  • QSARcons Basic: includes RDKit descriptors + scikit-learn ML methods

  • QSARcons Pro: will include QSARcons Basic + other workflows for building individual models (e.g. chemprop and QSARmil) to combine traditional and advanced modelling approaches into stronger consensuses

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

qsarcons-1.1.3.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qsarcons-1.1.3-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file qsarcons-1.1.3.tar.gz.

File metadata

  • Download URL: qsarcons-1.1.3.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for qsarcons-1.1.3.tar.gz
Algorithm Hash digest
SHA256 ee94148c87f40a57af9a72aea145052ee1c877476ad8725081d5dd0a0fa8ce6e
MD5 5908b554a4a407a9841fb0517dd00489
BLAKE2b-256 1bac339bb6dea04d8c09a40c3b6b6b98605f698ade054fd5af4f5b842a4fadbf

See more details on using hashes here.

File details

Details for the file qsarcons-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: qsarcons-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for qsarcons-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8049f30c95a8db2466fdb6f3e1df1178e39677ef810b0954d1263dfea597edb8
MD5 41ceb758edfbc32cfd46d7d741ad5643
BLAKE2b-256 3ec39ed2ffa05027e1d35a94a73181751e8529f012d7e4effed11aa8610146f1

See more details on using hashes here.

Supported by

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