Skip to main content

Intelligent AutoML Framework with comprehensive multi-metric evaluation and AI-driven optimization

Project description

Intelligent AutoML Framework

Python 3.8+ License: MIT Build Status Framework

A comprehensive automated machine learning framework with intelligent decision-making, multi-metric evaluation, and Pareto optimization capabilities.


Overview

The Intelligent AutoML Framework represents a significant advancement in automated machine learning technology. Unlike traditional AutoML tools that follow predetermined workflows, this framework employs artificial intelligence to make informed decisions at every stage of the machine learning pipeline, from data analysis to model deployment.

Key Differentiators

  • Intelligent Decision Making: AI-driven choices based on data characteristics and ML best practices
  • Comprehensive Evaluation: 35+ evaluation metrics with statistical validation
  • Multi-Objective Optimization: Pareto optimization for balanced model performance
  • Production Ready: Enterprise-grade deployment capabilities from day one
  • Zero Configuration: Intelligent defaults with extensive customization options

Quick Start

Installation

pip install intelligent-automl

Basic Usage

from intelligent_automl import IntelligentAutoMLFramework

framework = IntelligentAutoMLFramework()
results = framework.run_complete_pipeline('your_data.csv', 'target_column')

# Complete pipeline execution includes:
# - Automatic data analysis and profiling
# - Intelligent preprocessing pipeline construction
# - Multi-algorithm training and comparison
# - Comprehensive evaluation with 35+ metrics
# - Best model selection and validation

Advanced Multi-Objective Optimization

# Optimize multiple business metrics simultaneously
results = framework.run_complete_pipeline(
    'customer_data.csv',
    'churn',
    multi_objective=True,
    optimization_metrics=['f1_weighted', 'precision_weighted', 'recall_weighted'],
    metric_weights={'f1_weighted': 0.5, 'precision_weighted': 0.3, 'recall_weighted': 0.2}
)

# Access comprehensive analysis results
best_model = results['results']['model_training']['best_model']
pareto_analysis = results['multi_metric_analysis']
feature_importance = results['feature_analysis']

Core Features

Intelligent Data Analysis Engine

The framework performs comprehensive automated data analysis including:

  • Automatic Data Profiling: Analyzes 15+ data characteristics including missing patterns, outliers, and distributions
  • Pattern Recognition: Detects systematic missing data, seasonal trends, and feature relationships
  • Smart Feature Detection: Automatically identifies datetime, categorical, numerical, and text features
  • Quality Assessment: Provides comprehensive data quality scoring and recommendations
# Example of automatic data insights
data_insights = {
    'missing_pattern': 'systematic',
    'outlier_strategy': 'iqr_capping',
    'encoding_strategy': 'target_encoding',
    'scaling_method': 'robust',
    'feature_engineering': ['log_transform', 'interaction_terms']
}

Intelligent Pipeline Construction

  • Context-Aware Processing: Adapts preprocessing steps based on specific data characteristics
  • Priority-Based Recommendations: Suggests optimal preprocessing steps with confidence scores
  • Dynamic Parameter Selection: Customizes parameters based on dataset properties rather than using fixed templates
  • Adaptive Strategies: Modifies approach based on data size, quality, and domain characteristics

Comprehensive Multi-Metric Evaluation System

The framework evaluates models using 35+ metrics across multiple categories:

Classification Metrics (20+)

  • Accuracy Family: accuracy, balanced_accuracy
  • Precision/Recall: precision_macro, precision_weighted, recall_macro, recall_weighted
  • F-Scores: f1_weighted, f1_macro, f2_score, f0_5_score
  • Probabilistic: roc_auc, pr_auc, log_loss, brier_score
  • Advanced: matthews_corrcoef, cohen_kappa, jaccard_score

Regression Metrics (15+)

  • Error Metrics: mae, mse, rmse, median_absolute_error, max_error
  • Percentage Errors: mape, symmetric_mape
  • Correlation Metrics: r2, adjusted_r2
  • Advanced: explained_variance, mean_gamma_deviance, mean_poisson_deviance

Multi-Objective Optimization Engine

  • Pareto Optimization: Identifies optimal trade-offs between competing performance metrics
  • Weighted Optimization: Allows business-driven metric prioritization
  • Constraint Handling: Ensures solutions meet specified business requirements
  • Performance Tracking: Monitors optimization progress and convergence patterns

Installation and Setup

System Requirements

  • Python: 3.8 or higher (3.9+ recommended)
  • Memory: 4GB+ RAM (8GB+ recommended for large datasets)
  • Operating System: Windows, macOS, or Linux
  • Optional: CUDA-compatible GPU for enhanced performance

Installation Options

Basic Installation

pip install intelligent-automl

Full Installation (Recommended)

# Includes advanced algorithms: XGBoost, LightGBM, CatBoost, and Optuna
pip install intelligent-automl[full]

Development Installation

git clone https://github.com/AhmedMansour1070/intelligent-automl.git
cd intelligent-automl
pip install -e ".[dev]"

Installation Verification

import intelligent_automl
print(f"Successfully installed version {intelligent_automl.__version__}")

# Run framework test
from intelligent_automl.test_framework import test_basic_functionality
test_basic_functionality()

Use Cases and Examples

Financial Services: Fraud Detection

# Handles imbalanced datasets with intelligent preprocessing
framework = IntelligentAutoMLFramework(verbose=True)

results = framework.run_complete_pipeline(
    'transactions.csv',
    'is_fraud',
    multi_objective=True,
    optimization_metrics=['precision_weighted', 'recall_weighted', 'f1_weighted'],
    metric_weights={'precision_weighted': 0.5, 'recall_weighted': 0.4, 'f1_weighted': 0.1}
)

# Framework automatically applies:
# - SMOTE for class balancing
# - Velocity-based feature engineering
# - Outlier-aware scaling methods
# - Ensemble methods for improved robustness

E-commerce: Customer Churn Prediction

# Advanced customer behavior analysis
results = framework.run_complete_pipeline(
    'customer_data.csv',
    'will_churn',
    models_to_try=['random_forest', 'xgboost', 'logistic_regression'],
    optimization_metrics=['f1_weighted', 'precision_weighted', 'customer_lifetime_value']
)

# Automatic feature engineering includes:
# - RFM (Recency, Frequency, Monetary) analysis
# - Behavioral trend identification
# - Seasonal purchase pattern detection
# - Customer engagement scoring

Healthcare: Diagnostic Prediction

# Safety-focused configuration for medical applications
healthcare_config = AutoMLConfig.create_interpretable('classification')
framework = IntelligentAutoMLFramework(config=healthcare_config)

results = framework.run_complete_pipeline(
    'patient_data.csv',
    'diagnosis',
    models_to_try=['logistic_regression', 'decision_tree', 'random_forest'],
    optimization_metrics=['sensitivity', 'specificity', 'ppv', 'npv']
)

# Ensures:
# - Model interpretability for clinical decision support
# - High sensitivity to minimize false negatives
# - Calibrated probability outputs for risk assessment
# - Detailed feature importance for clinical insights

Advanced Configuration

Simple Configuration for Standard Use

# Zero configuration approach - framework handles all decisions
framework = IntelligentAutoMLFramework()
results = framework.run_complete_pipeline('data.csv', 'target')

Advanced Configuration for Expert Users

from intelligent_automl.core.config import AutoMLConfig, EvaluationConfig, OptimizationConfig

# Comprehensive custom configuration
config = AutoMLConfig(
    evaluation=EvaluationConfig(
        primary_metric='f1_weighted',
        cross_validation=True,
        cv_folds=10,
        metrics=['accuracy', 'precision', 'recall', 'f1_weighted', 'roc_auc'],
        enable_comprehensive_metrics=True,
        statistical_validation=True
    ),
    optimization=OptimizationConfig(
        multi_objective=True,
        optimization_metrics=['f1_weighted', 'precision_weighted'],
        metric_weights={'f1_weighted': 0.6, 'precision_weighted': 0.4},
        n_trials=200,
        early_stopping=True,
        parallel_trials=4
    )
)

framework = IntelligentAutoMLFramework(config=config)

Custom Business Metrics Integration

# Define custom business-specific evaluation metrics
def customer_lifetime_value_impact(y_true, y_pred, customer_values):
    """Custom metric for measuring business impact of predictions."""
    correct_predictions = (y_true == y_pred)
    return np.sum(customer_values[correct_predictions])

# Register custom metric with the framework
framework.metric_evaluator.add_custom_metric('clv_impact', customer_lifetime_value_impact)

Architecture Overview

Framework Structure

intelligent_automl/
├── core/                       # Core framework components
│   ├── base.py                 # Base classes and interfaces
│   ├── config.py               # Configuration management system
│   ├── exceptions.py           # Custom exception handling
│   └── types.py                # Type definitions and protocols
├── data/                       # Data processing pipeline
│   ├── loaders.py              # Intelligent data loading utilities
│   ├── preprocessors.py        # Advanced preprocessing components
│   └── pipeline.py             # Pipeline orchestration system
├── intelligence/               # AI decision-making layer
│   ├── pipeline_selector.py    # Smart preprocessing selection
│   └── auto_optimizer.py       # Intelligent optimization algorithms
├── models/                     # Model training and evaluation
│   └── auto_trainer.py         # Enhanced AutoML trainer with multi-objective support
├── evaluation/                 # Comprehensive evaluation system
│   └── multi_metric_evaluator.py # 35+ metrics with statistical validation
├── utils/                      # Utilities and helper functions
│   ├── logging.py              # Advanced logging system
│   └── validation.py           # Data validation utilities
└── cli.py                      # Command-line interface

Supported Algorithms

The framework includes support for a comprehensive range of machine learning algorithms:

available_models = {
    'tree_based': ['random_forest', 'extra_trees', 'gradient_boosting'],
    'linear': ['logistic_regression', 'ridge', 'lasso', 'elastic_net'],
    'ensemble': ['voting_classifier', 'stacking_classifier', 'ada_boost'],
    'probabilistic': ['naive_bayes', 'gaussian_nb'],
    'svm': ['svm_classifier', 'svm_regressor'],
    'advanced': ['xgboost', 'lightgbm', 'catboost']  # Requires full installation
}

Documentation and Resources

Comprehensive Documentation

  • Quick Start Guide: Step-by-step introduction for new users
  • Advanced Features: Deep dive into multi-objective optimization and custom metrics
  • Configuration Reference: Complete guide to framework configuration options
  • API Documentation: Detailed API reference for all components
  • Use Case Library: Industry-specific examples and best practices
  • Troubleshooting Guide: Common issues and their solutions

Example Resources

  • Jupyter Notebooks: Interactive tutorials and demonstrations
  • Production Examples: Real-world deployment scenarios and configurations
  • Industry Applications: Domain-specific use cases and implementations
  • Research Applications: Academic and scientific research examples

Contributing and Community

Development Setup

# Fork and clone the repository
git clone https://github.com/yourusername/intelligent-automl.git
cd intelligent-automl

# Create development environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run test suite
pytest tests/ -v

# Run code quality checks
black intelligent_automl/
flake8 intelligent_automl/
mypy intelligent_automl/

Areas for Contribution

  • Intelligence Algorithms: New data analysis and decision-making algorithms
  • Evaluation Metrics: Additional metrics for specialized domains and applications
  • Model Integration: Support for new machine learning algorithms and frameworks
  • Performance Optimization: Improvements in speed and memory efficiency
  • Documentation: Tutorials, examples, and comprehensive guides
  • Testing: Expanded test coverage and edge case handling
  • Integration: Cloud platforms, databases, and deployment tools

Community Resources

  • GitHub Discussions: Ideas, questions, and project showcase
  • Issue Tracking: Bug reports and feature requests
  • Stack Overflow: Technical questions and community support
  • Documentation Wiki: Community-contributed examples and tutorials

Roadmap and Future Development

Version 1.2 (Upcoming Release)

  • Neural Architecture Search: Automated deep learning architecture optimization
  • Advanced Feature Selection: SHAP-based feature importance and selection algorithms
  • Real-time Monitoring: Live model performance tracking and alert systems
  • Cloud Integration: Native support for AWS, Azure, and Google Cloud Platform
  • Enhanced Time Series: Specialized forecasting algorithms and evaluation metrics

Version 1.3 (Future Development)

  • Automated Deep Learning: Complete neural network automation and optimization
  • Continuous Learning: Automated model retraining and adaptation systems
  • A/B Testing Integration: Built-in experimentation and statistical testing framework
  • Mobile Deployment: Edge AI optimization and mobile device support
  • Distributed Computing: Multi-node and multi-GPU training capabilities

Research Directions

  • Meta-Learning: Learning from previous projects to improve future recommendations
  • Active Learning: Intelligent data collection and labeling strategies
  • Explainable AI: Advanced model interpretability and explanation capabilities
  • Quantum Computing: Preparation for quantum machine learning integration

License and Legal Information

This project is licensed under the MIT License. See the LICENSE file for complete details.

Acknowledgments

  • Developed for the global data science and machine learning community
  • Built upon the foundations of scikit-learn, pandas, and the Python ecosystem
  • Thanks to all contributors and the open-source machine learning community
  • Special recognition to the developers of supporting libraries and frameworks

Academic Citation

For academic research and publications, please cite:

@software{intelligent_automl_2024,
  title={Intelligent AutoML Framework: AI-Driven Automated Machine Learning with Multi-Metric Evaluation},
  author={Ahmed Mansour},
  year={2024},
  url={https://github.com/AhmedMansour1070/intelligent-automl},
  version={1.1.0},
  license={MIT}
}

Why Choose Intelligent AutoML Framework

For Data Scientists

  • Accelerated Workflows: Focus on domain expertise rather than implementation details
  • Comprehensive Analysis: Access to 35+ evaluation metrics reveals hidden insights
  • Consistent Quality: Expert-level results with reduced human error
  • Rapid Iteration: Test multiple approaches efficiently

For Business Leaders

  • Faster Time-to-Market: Deploy machine learning solutions in hours rather than months
  • Cost Reduction: Automate routine data science tasks and reduce resource requirements
  • Improved Decision Making: Multi-objective optimization ensures balanced business outcomes
  • Risk Mitigation: Built-in validation and testing reduce deployment risks

For Software Developers

  • Easy Integration: Production-ready APIs and standardized model interfaces
  • Scalable Architecture: Efficient handling of datasets from megabytes to gigabytes
  • Reliable Performance: Consistent and reproducible results across environments
  • Future-Proof Design: Regular updates incorporating latest machine learning advances

For Researchers

  • Advanced Evaluation: Comprehensive metric coverage for thorough analysis
  • Statistical Rigor: Built-in significance testing and confidence intervals
  • Extensible Framework: Easy integration of custom metrics and algorithms
  • Reproducible Research: Complete experiment tracking and version control

Getting Started

The Intelligent AutoML Framework represents the next generation of automated machine learning technology. By combining artificial intelligence with comprehensive evaluation capabilities, it delivers expert-level results while maintaining ease of use.

Installation and First Steps

# Install the framework
pip install intelligent-automl

# Verify installation and run basic test
python -c "
from intelligent_automl import IntelligentAutoMLFramework
framework = IntelligentAutoMLFramework()
print('Framework successfully installed and ready for use!')
"

Support and Resources

  • Documentation: Comprehensive guides and API reference
  • Community: Active discussions and support channels
  • Examples: Real-world use cases and implementation patterns
  • Updates: Regular releases with new features and improvements

The Intelligent AutoML Framework - Where Artificial Intelligence Meets Data Science Excellence

Made by Ahmed Mansour | GitHub Profile

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

intelligent_automl-1.1.2.tar.gz (123.0 kB view details)

Uploaded Source

Built Distribution

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

intelligent_automl-1.1.2-py3-none-any.whl (102.0 kB view details)

Uploaded Python 3

File details

Details for the file intelligent_automl-1.1.2.tar.gz.

File metadata

  • Download URL: intelligent_automl-1.1.2.tar.gz
  • Upload date:
  • Size: 123.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.0

File hashes

Hashes for intelligent_automl-1.1.2.tar.gz
Algorithm Hash digest
SHA256 06d1de3279304523e365423a85a5ceedbd8c41e368a96a3dd12d5f4a11ac4ae6
MD5 c2b5159a1acbebc827d852fc3f225cb3
BLAKE2b-256 bb8d66131b40833fbff6a29ace56f88a32a068804e48750caae3f0430e2dda2f

See more details on using hashes here.

File details

Details for the file intelligent_automl-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for intelligent_automl-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ead2f753e15253a4dd2ee4dc2b06d7327c777786660832cd164340f953964b91
MD5 70c8d9c78503f83168496a034ded9f13
BLAKE2b-256 a141faea9af3f71525ee5978245557890c2b9886fabf9dcda3764bcbce106659

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