Downloads · 30 days
0
prime7781/drug-bioactivity-predictor
drug-bioactivity-predictor is a tabular classification model from prime7781. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for scikit-learn. The card lists the license as mit.
A machine-learning model for predicting whether a chemical compound is likely to be active or inactive against EGFR based on its molecular structure represented as a SMILES string.
Downloads · 30 days
0
Access
Public
Updated Aug 24, 2026
Repo size
27.2 MB
Likes
0
Public
Click a slice to open those files.
.joblib27.2 MB · 100%
From the Hugging Face model README
A machine-learning model for predicting whether a chemical compound is likely to be active or inactive against EGFR based on its molecular structure represented as a SMILES string.
The model uses RDKit molecular descriptors and Morgan molecular fingerprints as input features and a Random Forest classifier for binary classification.
Research use only: This model is intended for educational, research, and compound-prioritization purposes. It is not a clinical diagnostic tool and must not be used to make medical, therapeutic, regulatory, or patient-care decisions.
| Property | Value |
|---|---|
| Target | EGFR |
| ChEMBL Target ID | CHEMBL203 |
| Assay endpoint | IC50 |
| Activity unit | nM |
| Task | Binary classification |
| Active threshold | IC50 ≤ 1000 nM |
| Inactive threshold | IC50 > 1000 nM |
| Model | Random Forest Classifier |
| Molecular descriptors | 8 |
| Morgan fingerprint | 2048 bits |
| Total features | 2056 |
The objective of this project is to develop an end-to-end machine-learning pipeline that takes a compound SMILES string and predicts:
against the EGFR target.
The project combines:
The model accepts a valid chemical SMILES representation.
Example:
CCO
or:
CCOC1=CC=CC=C1
The SMILES is converted into an RDKit molecular representation before feature generation.
Each molecule is represented using two feature groups.
The following eight descriptors are calculated using RDKit:
A Morgan circular fingerprint is generated using:
Radius: 2
Fingerprint size: 2048 bits
Therefore:
8 descriptors
+
2048 Morgan fingerprint bits
=
2056 features
The curated dataset uses an IC50 threshold of:
1000 nM
Classification:
IC50 ≤ 1000 nM
↓
ACTIVE
IC50 > 1000 nM
↓
INACTIVE
This threshold is a project-level classification rule and should not be interpreted as a universal biological definition of EGFR activity.
The final curated dataset contains:
13,577 compounds
Class distribution:
| Class | Compounds | Fraction |
|---|---|---|
| ACTIVE | 9,142 | 67.33% |
| INACTIVE | 4,435 | 32.67% |
| Total | 13,577 | 100% |
The data curation pipeline includes:
Three machine-learning models were evaluated.
| Model | Accuracy | Precision | Recall | F1 | ROC-AUC | PR-AUC |
|---|---|---|---|---|---|---|
| Logistic Regression | 0.8384 | 0.8913 | 0.8655 | 0.8782 | 0.8776 | 0.9193 |
| Random Forest | 0.8921 | 0.9364 | 0.9010 | 0.9184 | 0.9512 | 0.9743 |
| XGBoost | 0.8840 | 0.9079 | 0.9213 | 0.9145 | 0.9410 | 0.9690 |
The Random Forest model was selected based primarily on ROC-AUC.
The selected Random Forest model achieved:
| Metric | Score |
|---|---|
| Accuracy | 0.8921 |
| Precision | 0.9364 |
| Recall | 0.9010 |
| F1 | 0.9184 |
| ROC-AUC | 0.9512 |
| PR-AUC | 0.9743 |
Five-fold cross-validation produced:
Mean ROC-AUC: 0.9478
Std ROC-AUC : 0.0054
A Bemis-Murcko scaffold split was additionally performed to evaluate generalization to chemically different molecular scaffolds.
Results:
| Metric | Score |
|---|---|
| Accuracy | 0.8401 |
| Precision | 0.8760 |
| Recall | 0.8884 |
| F1 | 0.8822 |
| ROC-AUC | 0.9118 |
| PR-AUC | 0.9551 |
The scaffold split is more challenging than a conventional random split because structurally related compounds are less likely to appear across both training and test sets.
The difference between random-split and scaffold-split ROC-AUC was:
Random split ROC-AUC = 0.9512
Scaffold split ROC-AUC = 0.9118
Generalization gap = 0.0394
The scaffold evaluation provides a more conservative estimate of how the model may perform on chemically distinct compounds.
This repository contains:
bioactivity_model.joblib
model_metadata.json
README.md
bioactivity_model.joblibSerialized scikit-learn Random Forest model.
model_metadata.jsonContains model configuration and reproducibility metadata including:
A compound can be processed using the project's prediction wrapper.
Example:
from src.predict import BioactivityPredictor
predictor = BioactivityPredictor(
"models/bioactivity_model.joblib"
)
result = predictor.predict(
"CCOC1=CC=CC=C1"
)
print(result["prediction"])
print(result["active_probability"])
Example output:
ACTIVE
0.874
The probability represents the model's estimated probability for the predicted class and should not be interpreted as a calibrated probability of biological efficacy.
The model is integrated into an interactive Streamlit application.
The application supports:
SMILES
│
▼
RDKit Molecular Parsing
│
├───────────────┐
│ │
▼ ▼
Molecular Morgan
Descriptors Fingerprint
│ │
└───────┬───────┘
▼
2056 Features
│
▼
Random Forest
│
▼
┌─────────┴─────────┐
│ │
▼ ▼
ACTIVE INACTIVE
│
▼
Probability
This model has several important limitations.
The model was trained for:
EGFR / CHEMBL203
It should not automatically be assumed to generalize to other biological targets.
The training endpoint is:
IC50
The model should not be interpreted as a predictor for other assay endpoints such as:
without appropriate retraining and validation.
Bioactivity databases contain heterogeneous experimental measurements generated using different:
Therefore, the model may inherit biases present in the underlying data.
Performance can decrease for molecules substantially different from the training distribution.
The scaffold-split ROC-AUC of approximately 0.912 demonstrates that performance is lower under a more challenging chemical split than under a random split.
The predicted probability is a machine-learning model output and has not been established as a clinically calibrated probability of biological activity.
The model does not predict:
Appropriate uses include:
This model should not be used as the sole basis for:
Predictions should be experimentally validated before drawing biological conclusions.
The project includes:
The software environment is documented in the project requirements files.
Source code:
https://github.com/sintu7781/drug-bioactivity-predictor
Hugging Face model:
https://huggingface.co/prime7781/drug-bioactivity-predictor
This project is a research and educational machine-learning application.
Predictions are computational estimates and do not constitute experimental evidence of biological activity, medical advice, or clinical recommendations.
Any compound prioritization based on this model should be followed by appropriate experimental validation.
Potential future improvements include: