Metadata-Version: 2.4
Name: balens
Version: 0.0.2
Summary: A universal Python toolkit for detecting and fixing data imbalance.
Author: Raktim Kalita
Author-email: Raktim Kalita <raktimkalita.ai@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Raktim Kalita
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE. 
Project-URL: Homepage, https://github.com/Rktim/balens
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: scikit-learn
Requires-Dist: imbalanced-learn
Requires-Dist: typer[all]
Dynamic: author
Dynamic: license-file
Dynamic: requires-python

# balens

A universal Python toolkit for detecting and fixing data imbalance with support for SMOTE, ADASYN, class weighting, intelligent binning, and auto export. Ideal for ML pipelines, AutoML, and data science workflows.

## Features
- Automatic imbalance detection
- Smart binning for regression targets
- Resampling (SMOTE, ADASYN, etc.)
- Class weights computation
- Export balanced datasets and reports
- CLI and Python SDK

## Installation
```bash
pip install .
```

## CLI Usage
```bash
balens fix --file data.csv --target Outcome --method smote --auto-bin --export
```

## Python SDK Usage
```python
from balens import auto_balance
X_res, y_res = auto_balance(df, target="Outcome", method="smote")
``` 
