No project description provided
Project description
sEVML: Small Extracellular Vesicles Machine Learning Toolkit
A Python toolkit developed by the INSERM U1231 HSPpathies team for the analysis of ELISA-based datasets from small extracellular vesicles (sEVs).
Overview
sEVML is designed to facilitate the preprocessing, modeling, evaluation, and interpretation of machine learning pipelines based on ELISA data. It is optimized for the classification of biomarkers measured from sEVs.
Key features:
- Preprocess ELISA datasets (pivot, clean, normalize)
- Train XGBoost models with hyperparameter tuning
- Visualize learning and validation curves
- Evaluate model performance with ROC curves and confusion matrices
- Interpret feature importance using SHAP values
Installation
To install required dependencies:
pip install -r requirements.txt
Dependencies include:
- numpy
- pandas
- matplotlib
- scikit-learn
- xgboost
- shap
Usage
from sevml import (
preprocess_elisa_dataset,
train_xgb_with_gridsearch,
evaluate_model,
plot_model_curves,
plot_shap_explanations
)
# Load and preprocess dataset
label_mapping = {"S": 0, "PD": 1}
X_train, X_test, y_train, y_test = preprocess_elisa_dataset("path/to/data.csv", label_mapping)
# Train model
model, params = train_xgb_with_gridsearch(X_train, y_train)
# Evaluate model
evaluate_model(model, X_train, y_train, X_test, y_test)
# Visualize curves
plot_model_curves(model, X_train, y_train)
# SHAP explanations
plot_shap_explanations(X_test, model, df_features)
API Reference
preprocess_elisa_dataset(filepath, label_mapping, test_size=0.2, random_state=5)
- Loads a raw ELISA CSV dataset.
- Pivots biomarker data to wide format.
- Imputes missing values (median).
- Scales features using MinMax.
- Splits data into training and testing sets.
train_xgb_with_gridsearch(X, y, eval_metric='logloss', random_state=5, cv=3)
- Trains an XGBoost classifier.
- Performs grid search over hyperparameters.
- Returns best model and parameters.
evaluate_model(model, X_train, y_train, X_test, y_test)
- Plots ROC curves and confusion matrices.
- Computes AUC, accuracy, and F1 scores.
plot_model_curves(...)
- Plots learning and validation curves.
- Helpful for diagnosing under/overfitting.
plot_shap_explanations(X, model, df_features)
- Uses SHAP to explain model predictions.
- Generates multiple plots: heatmap, violin, beeswarm, bar, waterfall.
Context
This package is developed and maintained by the HSPpathies team within the INSERM U1231 research unit. It is used in clinical and translational studies focusing on:
- Small extracellular vesicles (sEVs)
- Biomarkers of neurological and rare diseases
- Circulating PD-L1 analysis
License
MIT License
Authors
- Naïkem Isen
- HSPpathies Team, INSERM U1231
Contact
For questions or collaborations: mail@isen-naiken.storga.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sEVML-0.3.0.tar.gz.
File metadata
- Download URL: sEVML-0.3.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00ab50c6d2671876dc7f26bb691481ae071bd308617d03bfd1285ca75ce387e6
|
|
| MD5 |
a830fb9e7967595732d61b801775a925
|
|
| BLAKE2b-256 |
41f968ef08c59ceed2f70f0f3c740b7e194ebf2522d9cae5670bb616a39e861f
|
File details
Details for the file sEVML-0.3.0-py3-none-any.whl.
File metadata
- Download URL: sEVML-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a6c3596f8bb552cae39de5374a1d4eaadd74e95abe71ae929b2c1a368497536
|
|
| MD5 |
eba00edaffdb2a1f9dbeb3793e0e43a9
|
|
| BLAKE2b-256 |
d30f6f9c365e985871cfce01c709150c415044c6ea26add8fbdea98f774b5d8b
|