Machine learning experiment manager and leakage detection toolkit
Project description
MLGuard
MLGuard is a lightweight machine learning experiment management and data validation toolkit designed to help detect potential data leakage and benchmark multiple models quickly.
๐ Features
-
๐ Data Leakage Detection Detects potential target leakage by analyzing correlations between features and the target.
-
โ๏ธ Experiment Manager Automatically runs multiple ML models and evaluates them.
-
๐ Model Comparison Compare model performance using appropriate metrics.
-
๐ง Automatic Problem Detection Detects whether the task is regression or classification.
๐ฆ Installation
pip install mlguard
or install locally:
pip install -e .
โก Quick Example
Regression Example
from sklearn.datasets import fetch_california_housing
from mlguard.experiments import ExperimentManager
data = fetch_california_housing(as_frame=True)
X = data.data
y = data.target
exp = ExperimentManager()
exp.fit(X, y)
print(exp.compare())
Example output:
Running leakage detection...
No leakage detected
Detected problem type: regression
[('rf', 0.50), ('ridge', 0.74)]
Classification Example
from sklearn.datasets import load_iris
from mlguard.experiments import ExperimentManager
data = load_iris(as_frame=True)
X = data.data
y = data.target
exp = ExperimentManager()
exp.fit(X, y)
print(exp.compare())
๐ Project Structure
mlguard/
โ
โโโ experiments
โ โโโ experiment_manager.py
โ
โโโ inspection
โ โโโ leakage_detector.py
โ
โโโ metrics
โ โโโ regression_metrics.py
โ โโโ classification_metrics.py
โ
โโโ utils
โ โโโ problem_type.py
โ
โโโ examples
โโโ tests
๐ง How MLGuard Works
MLGuard runs a lightweight validation and experimentation pipeline:
Dataset
โ
Leakage Detection
โ
Problem Type Detection
โ
Model Experiments
โ
Model Evaluation
โ
Model Comparison
This helps ML practitioners quickly answer:
Which model works best for my dataset?
๐ฃ Roadmap
Planned improvements:
- Cross-validation experiment engine
- Dataset inspector
- Automatic preprocessing pipelines
- Feature validation tools
- Experiment tracking
๐ค Contributing
Contributions are welcome!
- Fork the repository
- Create a new branch
- Submit a pull request
๐ License
MIT License ยฉ 2026 Tarun
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 mlguardlabs-0.1.0.tar.gz.
File metadata
- Download URL: mlguardlabs-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfbbf39fb99767fae13419a27f75e8365ef5b8faf78eedb53a72a54c2c1a23a9
|
|
| MD5 |
3fa6b58d96dad1048e4f32b2312502f5
|
|
| BLAKE2b-256 |
54da7403009504c4e31e62f3969e176ec0ba1930425b24cb23f4111c94052030
|
File details
Details for the file mlguardlabs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mlguardlabs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe0773c270f8fc0c23be0f16bc905e54ee17bc686854cad71755f98f6ff62a8a
|
|
| MD5 |
ea4fccc6aa49693a717bb3103ba42b82
|
|
| BLAKE2b-256 |
94ffac84b95586b4b821788e6511e44730a0070ec3059d2bad6577585a048650
|