Skip to content

Commit

Permalink
Improved version
Browse files Browse the repository at this point in the history
  • Loading branch information
alimovabdulla committed Feb 1, 2025
1 parent 27aa3d2 commit aac66b8
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 1 deletion.
94 changes: 94 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# 📊 GridSearchHelper: Advanced Hyperparameter Tuning Library

Welcome to **GridSearchHelper**, a powerful and flexible hyperparameter tuning library designed to make model optimization effortless! 🚀

## ✨ Features

- 🔄 **Automated Hyperparameter Grid Generation** for supported models
- 📈 **Seamless Integration** with Scikit-Learn's GridSearchCV
-**Supports Classification & Regression Models**
- 🛠️ **Customizable Parameter Grids**
- 🎯 **Easy-to-Use API**

---

## 📌 Installation

```bash
pip install GridSearchHelper
```

---

## 🚀 Quick Start

### Import and Initialize

```python
from GridSearchHelper import perform_grid_search
from sklearn.linear_model import Ridge
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.datasets import load_diabetes

# Load dataset
data = load_diabetes()
X, y = data.data, data.target
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

# Scale features
scaler = StandardScaler()
X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)

# Run Hyperparameter Tuning
best_params, best_score, grid_search = perform_grid_search(
model_name='Ridge',
X_train=X_train_scaled,
y_train=y_train,
cv_folds=5,
scoring='neg_mean_squared_error'
)

print(f'Best Parameters: {best_params}')
```

---

## ⚙️ Supported Models

- RandomForestClassifier 🌲
- GradientBoostingClassifier 🔥
- SVC 🛡️
- LogisticRegression 📊
- Ridge 📏
- Many more...

---

## 🔧 Configuration

To add custom hyperparameters, simply pass them as a dictionary:

```python
custom_params = {
'alpha': [0.01, 0.1, 1, 10],
'solver': ['auto', 'svd', 'cholesky']
}
perform_grid_search('Ridge', X_train_scaled, y_train, additional_params=custom_params)
```

---

## 📜 License

MIT License © 2025 Abdulla Alimov

---

## 🤝 Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

🌟 **Star this repo if you find it useful!**

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="GridSearchHelper",
version="0.7.0",
version="0.8.0",
author="Abdulla Alimov",
author_email="[email protected]",
description="Advanced hyperparameter tuning using grid search for ML models",
Expand Down

0 comments on commit aac66b8

Please sign in to comment.