🧰 mltune
mltune
Flexible ML hyperparameter tuning and feature selection toolkit
Supports scikit-learn models and optionally XGBoost / LightGBM.
✨ Features
- Auto-tune hyperparameters (GridSearch)
- Optional greedy backward feature elimination
- Modular
Wrapperclasses for scikit-learn, XGBoost, LightGBM - Unit & integration tested, Python 3.12+
- Lightweight, simple API
📦 Installation
Install base (requires Python ≥3.8):
pip install mltune
For optional XGBoost / LightGBM support:
pip install mltune[xgboost,lgbm]
🚀 Example usage
from mltune.wrappers import RandomForestModelWrapper
# Load or prepare data
X, y, X_test = load_data()
# Initialize wrapper with all features
wrapper = RandomForestModelWrapper(features=list(X.columns))
# Auto-tune hyperparameters & feature set
wrapper.autotune(
X, y,
hyperparam_initial_info={
'n_estimators': [90, 95, 100, 105, 110],
'max_depth': [9, 10, 11]
},
feature_selection_strategy="greedy_backward",
verbose=True,
plot=True
)
# Wrapper will use calculated hyperparameters & feature set
predictions = wrapper.predict(X_test)
✅ Implemented
- Wrappers:
- RandomForestModelWrapper
- XGBoostModelWrapper
- LightGBMModelWrapper
- Auto hyperparameter tuning:
- grid_search
- Feature selection strategy:
- none (skip feature elimination)
- greedy_backward
🧭 Planned / Roadmap
- Add other feature selection strategies (e.g. forward, recursive)
- Add other hyperparameter tuning strategies (e.g. Bayesian optimization)
- Voting strategies
📦 Development
Clone repo, install dev deps:
uv pip install -e .[dev] --system
Run tests:
pytest -v
📚 Documentation
📜 License
Released under the MIT License.
📌 Status
Beta: Work in progress. Contributions and ideas welcome!
Metadata
Release files for mltune 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mltune-0.2.1.tar.gz | 13.2 kB | Without provenance | Details for mltune-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mltune-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for mltune-0.2.1-py3-none-any.whl |
Total release size: 28.9 kB
Release files / mltune-0.2.1.tar.gz
| Download URL | mltune-0.2.1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a7ae8844d669b44ef5f7a6896ba49ec00846eae831373cdfe34791d0be476d5
|
|
BLAKE2b-256 checksum How to use checksums |
94b132b4af87ca8ff39d94d638819f07fb0af9107e273215325079462a2fedac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Release files / mltune-0.2.1-py3-none-any.whl
| Download URL | mltune-0.2.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56ed49892d10ef4fea5a74aae82c37ea9fae1dc9aea4d25ba2f6871908216921
|
|
BLAKE2b-256 checksum How to use checksums |
6d6017ba22750f31b044279f588392047a889e2697e4a3c594460ba0ade2ba32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.11
|
Security for mltune 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.