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

import polaris
from sklearn.model_selection import train_test_split
from qsarcons.cli import run_qsarcons

# Load Polaris benchmark
benchmark = polaris.load_benchmark("tdcommons/caco2-wang")
data_train, data_test = benchmark.get_train_test_split()

df_train, df_test = data_train.as_dataframe(), data_test.as_dataframe()
df_train, df_val = train_test_split(df_train, test_size=0.2, random_state=42)

# Run QSARcons
test_pred = run_qsarcons(df_train, df_val, df_test, task="regression", output_folder="results")

# Evaluate predictions
results = benchmark.evaluate(test_pred)

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.2.tar.gz (37.1 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.2-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qsarcons-1.1.2.tar.gz
  • Upload date:
  • Size: 37.1 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.2.tar.gz
Algorithm Hash digest
SHA256 507cf9fc5d005a3c2431dd2498023f55f3ec8c08a53d9ea214d2a94dcc932df0
MD5 0fef7b60dd9f0d75604836f6daf4d1fc
BLAKE2b-256 d80f45c274d85c6019f9030bf21cc9ee8453ae304f861c7e787974b24ea9e9a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qsarcons-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 43.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ebf72d63d6cbdfb76707e30d8f8550bb0cdad71b3c74704dddff31c4b3ddab9
MD5 39135dabbfb195fbf29d4823f4ac6910
BLAKE2b-256 8051309abb20a7ac749b1db7511720f01dee458b4c647f3c0092affac40f31ef

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