A complete machine learning pipeline framework for any dataset
Project description
๐ Universal ML Framework
A complete, automated machine learning pipeline framework that works with any dataset. Build, compare, and deploy ML models with minimal code.
๐ Key Features
- ๐ค Automated Pipeline - Complete ML workflow from data to deployment
- ๐ Auto Feature Detection - Automatically detects numeric, categorical, and binary features
- ๐ Model Comparison - Compares multiple algorithms with cross-validation
- โ๏ธ Hyperparameter Tuning - Automatic parameter optimization
- ๐ฏ Multi-Problem Support - Classification and regression tasks
- ๐ฆ Production Ready - Model persistence and metadata tracking
๐ฆ Installation
# Install from PyPI
pip install universal-ml-framework
# Or install from source
git clone https://github.com/FathanAkram-App/universal-ml-framework.git
cd universal-ml-framework
pip install -e .
๐ฏ Quick Start
Basic Usage
from universal_ml_framework import UniversalMLPipeline
# Classification
pipeline = UniversalMLPipeline(problem_type='classification')
pipeline.run_pipeline(
train_path='data.csv',
target_column='target',
test_path='test.csv'
)
# Regression
pipeline = UniversalMLPipeline(problem_type='regression')
pipeline.run_pipeline(
train_path='data.csv',
target_column='price'
)
Quick Setup Functions
from universal_ml_framework import quick_classification_pipeline
# One-liner for classification
result = quick_classification_pipeline('data.csv', 'target_column')
Generate Sample Data
from universal_ml_framework import DataGenerator
# Generate synthetic datasets for testing
DataGenerator.generate_customer_churn()
DataGenerator.generate_house_prices()
DataGenerator.generate_sales_forecasting()
๐ง Supported Algorithms
Classification
- Random Forest Classifier
- Logistic Regression
- Support Vector Machine
Regression
- Random Forest Regressor
- Linear Regression
- Support Vector Regression
๐ What It Does
- Data Loading - Reads CSV files automatically
- Feature Detection - Identifies feature types (numeric/categorical/binary)
- Preprocessing - Handles missing values, encoding, scaling
- Model Training - Trains multiple algorithms with cross-validation
- Hyperparameter Tuning - Optimizes best performing model
- Prediction - Generates predictions on test data
- Model Saving - Persists trained model and metadata
๐ Output Files
predictions.csv- Test set predictionsbest_model.pkl- Trained model (joblib format)model_info.json- Model metadata and performance
๐๏ธ Customization
Custom Feature Types
pipeline.feature_types = {
'numeric': ['age', 'income'],
'categorical': ['city', 'category'],
'binary': ['has_feature']
}
Exclude Columns
pipeline.run_pipeline(
train_path='data.csv',
target_column='target',
exclude_columns=['id', 'timestamp']
)
๐งช Demo
# Run complete demo with synthetic data
python -c "from universal_ml_framework import DataGenerator; DataGenerator.generate_all_datasets()"
๐ Project Structure
universal_ml_framework/
โโโ core/
โ โโโ pipeline.py # Main pipeline class
โโโ utils/
โ โโโ helpers.py # Helper functions
โ โโโ data_generator.py # Synthetic data generation
โโโ configs/
โ โโโ dataset_configs.py # Predefined configurations
โโโ examples/
โโโ basic_usage.py # Basic examples
โโโ advanced_usage.py # Advanced examples
๐ฏ Use Cases
- Business Analytics - Customer churn, sales forecasting
- Finance - Credit risk, fraud detection
- Healthcare - Medical diagnosis, treatment prediction
- Marketing - Campaign response, customer segmentation
- Real Estate - Price prediction, market analysis
- HR - Employee performance, retention prediction
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built with scikit-learn
- Powered by pandas and numpy
Project details
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 universal_ml_framework-1.1.0.tar.gz.
File metadata
- Download URL: universal_ml_framework-1.1.0.tar.gz
- Upload date:
- Size: 107.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ca61e57a115d2364479401f6a90ffc2f49b1a46d30cf4a926db77176f6e6b2c
|
|
| MD5 |
56d9adf3a937cce525e79b31a17ba345
|
|
| BLAKE2b-256 |
4d0b1459ac4bcb0fed3cee6bee79c9cf3510ea55a65457feacd3362646ce6721
|
File details
Details for the file universal_ml_framework-1.1.0-py3-none-any.whl.
File metadata
- Download URL: universal_ml_framework-1.1.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffee4606beb5165f7aaeef02b2d5fb293eb368a1acfe00e401448efb73cb9e76
|
|
| MD5 |
8d4a55d9bf8e7c8769d8877a1ef1fd44
|
|
| BLAKE2b-256 |
a3ea5f2647921e574c8fec4803c94278e89feb49bb5cc5e3a3ffbc0ce60e9d56
|