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 source
git clone https://github.com/yourusername/universal-ml-framework.git
cd universal-ml-framework
pip install -e .

# Or install dependencies manually
pip install pandas scikit-learn numpy joblib

๐ŸŽฏ 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 demo.py

๐Ÿ“ 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.0.tar.gz (106.1 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.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: universal_ml_framework-1.0.0.tar.gz
  • Upload date:
  • Size: 106.1 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.0.tar.gz
Algorithm Hash digest
SHA256 9b196d0803b467bdd72f04ad137f760604f164253185302dc66b3e1e342f919d
MD5 c8942c7742385bb80be5126f9b3c0a33
BLAKE2b-256 628db4e5fa4800ce6cb572d75723becbbf6b5ecfa04887638abb91e67860a989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_ml_framework-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e942a51227e7c5a47740e86c374dd1bc2dda6c2e41b171eb5d02c0876d04017
MD5 464d77d8fad8cec4029f7daabbf03c53
BLAKE2b-256 518a233d49d52a610adff247d1c3f3a24ad6f8292eb8aafca5c8ec093eaf6296

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