Skip to main content

A complete machine learning pipeline framework for any dataset

Project description

๐ŸŒŸ Universal ML Framework

Python 3.7+ License: MIT scikit-learn

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

  1. Data Loading - Reads CSV files automatically
  2. Feature Detection - Identifies feature types (numeric/categorical/binary)
  3. Preprocessing - Handles missing values, encoding, scaling
  4. Model Training - Trains multiple algorithms with cross-validation
  5. Hyperparameter Tuning - Optimizes best performing model
  6. Prediction - Generates predictions on test data
  7. Model Saving - Persists trained model and metadata

๐Ÿ“ˆ Output Files

  • predictions.csv - Test set predictions
  • best_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

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

universal_ml_framework-1.0.1.tar.gz (106.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

universal_ml_framework-1.0.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file universal_ml_framework-1.0.1.tar.gz.

File metadata

  • Download URL: universal_ml_framework-1.0.1.tar.gz
  • Upload date:
  • Size: 106.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for universal_ml_framework-1.0.1.tar.gz
Algorithm Hash digest
SHA256 387c2a15df1f4ecbfe66802d0fb0652fe6b7cf87c6d7ce2e3b3d1e5eb2c7d0ff
MD5 901676a1253af22ecf2f2e57edcf1ba5
BLAKE2b-256 9aad7b4cbc369316dc305128b9b91e49873983bdc15cad3762ce89c9455414d1

See more details on using hashes here.

File details

Details for the file universal_ml_framework-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for universal_ml_framework-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4119cbcfe034e7398f23c22de82471e36e6f2ff4e53cf7533b4e4699c7406402
MD5 2d3f24bfbdb154c079f92aaa17b513bf
BLAKE2b-256 e5955a68401d1e04dfdbc7851bea0f8e1462a65d5fa1b18f38738c6ffa341f0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page