Framework for machine and deep learning, with regression, classification and time series analysis
Project description
LeCrapaud is a high-level Python library for end-to-end machine learning on tabular and time series data. It handles feature engineering, model selection, training, and prediction in one command.
Key Features
- 🔄 End-to-end ML pipeline — feature engineering, preprocessing, feature selection, hyperparameter optimization, and training in a single
fit()call - 🤖 11+ models — from Linear Regression to XGBoost, LightGBM, CatBoost, and deep learning architectures (LSTM, GRU, TCN, Transformer)
- 🎯 Automated feature selection — ensemble of 10+ methods (Chi2, ANOVA, Mutual Information, SHAP, RFE, etc.)
- ⚡ Hyperparameter optimization — Optuna-based search with cross-validation support
- 🔍 Explainability — built-in SHAP, LIME, feature importance, and tree visualization
- 🗄️ Experiment tracking — every experiment is stored in the database (PostgreSQL or MySQL) with full reproducibility
- 🧩 Modular — use the full pipeline or individual components (FeatureEngineer, FeaturePreprocessor, FeatureSelector) in sklearn-compatible pipelines
Prerequisites
- Python 3.12 (strictly required)
- macOS only — libomp for LightGBM/XGBoost:
brew install libomp
Installation
pip install lecrapaud
Quick Start
from lecrapaud import LeCrapaud
LeCrapaud.set_uri("mysql+pymysql://user:password@host:port/dbname")
lc = LeCrapaud(
experiment_name="my_experiment",
target_numbers=[1],
target_clf=[1],
models_idx=["lgb", "xgb"],
)
lc.fit(data)
predictions, scores_reg, scores_clf = lc.predict(new_data)
Documentation
Full documentation available at lecrapaud.pierregallet.com
Contributing
Contributions are welcome! Here's how to get started.
Development Setup
git clone https://github.com/PierreGallet/lecrapaud.git
cd lecrapaud
python3.12 -m venv .venv
source .venv/bin/activate
make install
Workflow
- Open an issue first to discuss the change you'd like to make
- Fork the repo and create a branch from
main:feat/your-featurefor new featuresfix/your-bugfixfor bug fixesdocs/your-changefor documentation
- Write or update tests when changing behavior
- Run the test suite before submitting:
make test
- Open a Pull Request against
mainwith a clear description
Commit Convention
We use Conventional Commits. Every commit message and PR title must follow this format:
type: short description
| Type | Usage |
|---|---|
feat: |
New feature |
fix: |
Bug fix |
docs: |
Documentation only |
refactor: |
Code change that neither fixes a bug nor adds a feature |
test: |
Adding or updating tests |
perf: |
Performance improvement |
ci: |
CI/CD changes |
chore: |
Maintenance tasks |
Examples:
feat: add catboost model support
fix: handle missing target column in predict
docs: update getting started guide
Guidelines
- Keep PRs focused and small — one concern per PR
- Update documentation when APIs change
- Follow the existing code style
- All tests must pass before merging
License
LeCrapaud is licensed under the Apache License 2.0. You are free to use, modify, and distribute this software in compliance with the license terms.
Pierre Gallet 2025
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 lecrapaud-0.31.2.tar.gz.
File metadata
- Download URL: lecrapaud-0.31.2.tar.gz
- Upload date:
- Size: 172.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3925028157a48aab54764a26754b94c6cb13349886b3339a5ac4aeb2296f801e
|
|
| MD5 |
cef1e59055c6b7533b0d8b4c6c007f6f
|
|
| BLAKE2b-256 |
212f4a81f085756a4e7965721452786b1091f41bfc2ac8c6da17f2b810184478
|
File details
Details for the file lecrapaud-0.31.2-py3-none-any.whl.
File metadata
- Download URL: lecrapaud-0.31.2-py3-none-any.whl
- Upload date:
- Size: 208.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b675a3738e9f1613e5c94062e2cda48c47e71612faeb617b02d3fc3a0558730
|
|
| MD5 |
e354df7e53e0cd7d2742ef48a5fc7e82
|
|
| BLAKE2b-256 |
dd8e10f2dda19cfcfd58416c9ef5b5832a2bbf0e467bba768ffccf1839d17b70
|