Metadata-Version: 2.4
Name: mlhelper-ai
Version: 0.1.0
Summary: A Python library for machine learning preprocessing and utilities.
Author: Gautam
License: MIT License
        
        Copyright (c) 2026 Gautam
        
        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 above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        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.
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mlhelper

A lightweight Python library for Machine Learning preprocessing, feature engineering, visualization, model evaluation, and utilities.

---

## Features

- Data preprocessing
- Missing value handling
- Outlier detection
- Feature engineering
- Encoding
- Feature scaling
- Model evaluation metrics
- Data visualization
- Model selection utilities
- Dataset loaders
- General utility functions

---

## Installation

### From PyPI

```bash
pip install mlhelper
```

### From Source

```bash
git clone https://github.com/YOUR_USERNAME/mlhelper.git

cd mlhelper

pip install -e .
```

---

## Requirements

- Python 3.10+
- NumPy
- Pandas
- Scikit-learn
- SciPy
- Matplotlib
- Seaborn
- Joblib

---

# Quick Start

```python
import pandas as pd
import mlhelper as ml

df = pd.read_csv("data.csv")

df = ml.clean_column_names(df)

df = ml.fill_mean(df)

df = ml.remove_iqr(df, "Age")

print(df.head())
```

---

# Modules

## preprocessing

```python
ml.clean_column_names()

ml.remove_duplicates()

ml.drop_constant_columns()

ml.remove_whitespace()

ml.change_dtype()
```

---

## missing_values

```python
ml.fill_mean()

ml.fill_median()

ml.fill_mode()

ml.fill_constant()

ml.missing_report()
```

---

## outlier

```python
ml.detect_iqr()

ml.remove_iqr()

ml.cap_iqr()

ml.detect_zscore()

ml.remove_zscore()
```

---

## feature_engineering

```python
ml.extract_numbers()

ml.extract_text()

ml.split_unit()

ml.log_transform()

ml.sqrt_transform()

ml.frequency_encode()
```

---

## encoding

```python
ml.one_hot_encode()

ml.label_encode()

ml.ordinal_encode()

ml.binary_encode()

ml.target_encode()
```

---

## scaling

```python
ml.standard_scale()

ml.minmax_scale()

ml.robust_scale()

ml.normalize()

ml.quantile_transform()
```

---

## metrics

```python
ml.accuracy()

ml.precision()

ml.recall()

ml.f1()

ml.rmse()

ml.r2()
```

---

## visualization

```python
ml.histogram()

ml.boxplot()

ml.correlation_heatmap()

ml.scatter()

ml.learning_curve_plot()
```

---

## model_selection

```python
ml.split()

ml.cross_validation()

ml.grid_search()

ml.randomized_search()

ml.best_estimator()
```

---

## datasets

```python
iris = ml.load_iris()

wine = ml.load_wine()

digits = ml.load_digits()

housing = ml.load_california_housing()

df = ml.load_csv("train.csv")
```

---

## utils

```python
ml.data_summary()

ml.memory_usage()

ml.set_seed()

ml.save_pickle()

ml.load_pickle()
```

---

# Example

```python
import mlhelper as ml

iris = ml.load_iris()

print(iris.head())

X = iris.drop("target", axis=1)

y = iris["target"]

X_train, X_test, y_train, y_test = ml.split(X, y)

print(X_train.shape)
```

---

# Testing

Install pytest

```bash
pip install pytest
```

Run all tests

```bash
python -m pytest -v
```

Coverage

```bash
python -m pytest --cov=mlhelper
```

---

# Project Structure

```
mlhelper/
│
├── mlhelper/
│   ├── preprocessing.py
│   ├── missing_values.py
│   ├── outlier.py
│   ├── feature_engineering.py
│   ├── encoding.py
│   ├── scaling.py
│   ├── metrics.py
│   ├── visualization.py
│   ├── model_selection.py
│   ├── datasets.py
│   └── utils.py
│
├── tests/
├── examples/
├── docs/
├── README.md
├── LICENSE
├── pyproject.toml
└── requirements.txt
```

---

# Roadmap

- [x] Preprocessing
- [x] Missing Values
- [x] Outlier Detection
- [x] Feature Engineering
- [x] Encoding
- [x] Scaling
- [x] Metrics
- [x] Visualization
- [x] Model Selection
- [x] Dataset Loader
- [ ] Documentation Improvements
- [ ] More Datasets
- [ ] More Visualizations
- [ ] Deep Learning Utilities

---

# Contributing

Contributions are welcome.

1. Fork the repository
2. Create a new branch
3. Commit your changes
4. Open a Pull Request

---

# License

MIT License

---

# Author

**Gautam**

Computer Science Engineering (AI & ML)

Python • Machine Learning • Deep Learning • Open Source

---

If you find this project useful, consider giving it a ⭐ on GitHub.
