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.2.0.tar.gz (107.2 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.2.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: universal_ml_framework-1.2.0.tar.gz
  • Upload date:
  • Size: 107.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 b2d660b0a42fae9a94a18b8e9800d11faf59522a79982a36dfc645cbe146c6e5
MD5 96762cbf3eac8042fdf6e9a09b93354c
BLAKE2b-256 a9080b8d0d4cacdb4af81557a2ddf51ca26ee896f893bfc7a855d6d1d845b6c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_ml_framework-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 982a0248590a6707c42829e53a284233081babaabaf07e28879941b9bf5d9642
MD5 6bfdde0417d198bef184c531d743240a
BLAKE2b-256 d984f194bc75c6fce3c1c0b51d90883eb19e1c8c986d03cebda8f6a25da68c37

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