Metadata-Version: 2.4
Name: intelligent-automl
Version: 1.1.2
Summary: Intelligent AutoML Framework with comprehensive multi-metric evaluation and AI-driven optimization
Home-page: https://github.com/AhmedMansour1070/intelligent-automl
Author: Ahmed Mansour
Author-email: your.email@example.com
License: MIT
Project-URL: Bug Tracker, https://github.com/AhmedMansour1070/intelligent-automl/issues
Project-URL: Documentation, https://github.com/AhmedMansour1070/intelligent-automl/docs
Project-URL: Source Code, https://github.com/AhmedMansour1070/intelligent-automl
Keywords: automl,machine-learning,artificial-intelligence,data-science,automated-ml,hyperparameter-optimization,feature-engineering,model-selection,multi-objective-optimization,pareto-optimization
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: scikit-learn>=1.1.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: seaborn>=0.11.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: joblib>=1.1.0
Requires-Dist: click>=8.0.0
Requires-Dist: tqdm>=4.62.0
Requires-Dist: pydantic>=1.9.0
Requires-Dist: python-json-logger>=2.0.0
Requires-Dist: colorlog>=6.6.0
Requires-Dist: python-dotenv>=0.19.0
Provides-Extra: full
Requires-Dist: xgboost>=1.6.0; extra == "full"
Requires-Dist: lightgbm>=3.3.0; extra == "full"
Requires-Dist: catboost>=1.0.0; extra == "full"
Requires-Dist: optuna>=2.10.0; extra == "full"
Requires-Dist: scikit-optimize>=0.9.0; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov>=2.0; extra == "dev"
Requires-Dist: black>=21.0; extra == "dev"
Requires-Dist: flake8>=3.8; extra == "dev"
Requires-Dist: mypy>=0.910; extra == "dev"
Requires-Dist: sphinx>=4.0.0; extra == "dev"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
Requires-Dist: twine>=3.0.0; extra == "dev"
Requires-Dist: wheel>=0.37.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: myst-parser>=0.16.0; extra == "docs"
Requires-Dist: sphinx-autoapi>=1.8.0; extra == "docs"
Provides-Extra: all
Requires-Dist: optuna>=2.10.0; extra == "all"
Requires-Dist: sphinx-autoapi>=1.8.0; extra == "all"
Requires-Dist: pytest>=6.0; extra == "all"
Requires-Dist: catboost>=1.0.0; extra == "all"
Requires-Dist: black>=21.0; extra == "all"
Requires-Dist: lightgbm>=3.3.0; extra == "all"
Requires-Dist: sphinx>=4.0.0; extra == "all"
Requires-Dist: wheel>=0.37.0; extra == "all"
Requires-Dist: pytest-cov>=2.0; extra == "all"
Requires-Dist: twine>=3.0.0; extra == "all"
Requires-Dist: xgboost>=1.6.0; extra == "all"
Requires-Dist: flake8>=3.8; extra == "all"
Requires-Dist: scikit-optimize>=0.9.0; extra == "all"
Requires-Dist: mypy>=0.910; extra == "all"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "all"
Requires-Dist: myst-parser>=0.16.0; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Intelligent AutoML Framework

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)](https://github.com/AhmedMansour1070/intelligent-automl)
[![Framework](https://img.shields.io/badge/framework-production--ready-brightgreen.svg)](https://github.com/AhmedMansour1070/intelligent-automl)

> **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

```bash
pip install intelligent-automl
```

### Basic Usage

```python
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

```python
# 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

```python
# 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
```bash
pip install intelligent-automl
```

#### Full Installation (Recommended)
```bash
# Includes advanced algorithms: XGBoost, LightGBM, CatBoost, and Optuna
pip install intelligent-automl[full]
```

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

#### Installation Verification
```python
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

```python
# 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

```python
# 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

```python
# 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

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

### Advanced Configuration for Expert Users

```python
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

```python
# 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:

```python
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

```bash
# 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](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:

```bibtex
@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

```bash
# 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](https://github.com/AhmedMansour1070)
