Skip to content

About

This project predicts wine quality (on a scale of 0–10) using physicochemical features like acidity, pH, and alcohol content. The model leverages Elastic Net regression to balance feature selection (L1 regularization) and multicollinearity handling (L2 regularization), achieving optimal performance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

End-to-end-Machine-Learning-Project

About

This project predicts wine quality (on a scale of 0–10) using physicochemical features like acidity, pH, and alcohol content. The model leverages Elastic Net regression to balance feature selection (L1 regularization) and multicollinearity handling (L2 regularization), achieving optimal performance. Python

Overview

This 'End-to-end-Machine-Learning-Project' serves as a comprehensive, production-ready template designed to predict wine quality based on various physicochemical features using an Elastic Net regression model. It encapsulates a full machine learning lifecycle, from initial data ingestion and feature engineering to robust model training and evaluation. The project is meticulously structured to demonstrate best practices in MLOps, ensuring that ML experiments can be reliably transitioned into scalable and maintainable production applications.

The core motivation behind this project is to bridge the gap between experimental machine learning development and operational deployment. It achieves this by leveraging industry-standard MLOps tools such as MLflow and Dagshub for diligent experiment tracking, artifact management, and remote model management. A key feature is its automated CI/CD pipeline, orchestrated via GitHub Actions, which facilitates seamless, containerized deployment of the trained model to AWS ECR and EC2 instances, guaranteeing reproducibility and efficiency in bringing models to a live environment. The modular workflow and declarative configurations further enhance its repeatability and scalability.

This template is ideally suited for machine learning engineers and data scientists seeking a practical, hands-on example for building, tracking, and deploying ML models with confidence and reliability. Whether you're aiming to deepen your understanding of MLOps principles, streamline your own ML project workflows, or simply need a robust starting point for a new data science initiative, this repository provides a clear, actionable blueprint for operationalizing machine learning solutions effectively.

✨ Features

  • ✅ Complete End-to-End ML Lifecycle: Covers everything from data ingestion, validation, transformation, model training, evaluation, to deployment.
  • 🚀 Production-Ready MLOps Practices: Leverages MLflow and Dagshub for robust experiment tracking and remote model management.
  • ⚙️ Automated CI/CD Pipeline: Integrates GitHub Actions for seamless, containerized deployment to AWS ECR and EC2 instances.
  • 🧩 Modular & Declarative Architecture: Ensures a highly organized, repeatable, and scalable machine learning workflow.
  • 🌐 Interactive Web Application for Inference: Provides a user-friendly interface via app.py and HTML templates for model predictions.
  • 🧪 Structured Research & Development: Organized Jupyter notebooks (research/) facilitate iterative experimentation and exploratory data analysis.

📦 Installation

git clone https://github.com/klan86at/End-to-end-Machine-Learning-Project.git
cd End-to-end-Machine-Learning-Project

🚀 Quick Start

To quickly get started with this project:

# Clone the repository
git clone https://github.com/your-username/End-to-end-Machine-Learning-Project.git
cd End-to-end-Machine-Learning-Project

# Setup Python environment and install dependencies
python -m venv env
source env/bin/activate
pip install -r requirements.txt

# Configure MLOps tracking (replace with your Dagshub details)
export MLFLOW_TRACKING_URI="https://dagshub.com/your-username/your-repo.mlflow"
export MLFLOW_TRACKING_USERNAME="your-dagshub-username"
export MLFLOW_TRACKING_PASSWORD="your-dagshub-token"

# Run the end-to-end ML pipeline (data ingestion, validation, training, evaluation)
python main.py

# Launch the local prediction web service
python app.py

📁 Project Structure

End-to-end-Machine-Learning-Project/
├── artifacts
│   └── data_ingestion
│       ├── data.zip
│       └── winequality-red.csv
├── config
│   └── config.yaml
├── research
│   ├── 01_data_ingestion.ipynb
│   ├── 02_data_validation.ipynb
│   ├── 03_data_transformation.ipynb
│   ├── 04_model_trainer.ipynb
│   ├── 05_model_evaluation.ipynb
│   └── trials.ipynb
├── src
│   └── mlProject
│       ├── components
│       │   ├── __init__.py
│       │   ├── data_ingestion.py
│       │   ├── data_transformation.py
│       │   ├── data_validation.py
│       │   ├── model_evaluation.py
│       │   └── model_trainer.py
│       ├── config
│       │   ├── __init__.py
│       │   └── configuration.py
│       ├── constants
│       │   └── __init__.py
│       ├── entity
│       │   ├── __init__.py
│       │   └── config_entity.py
│       ├── pipeline
│       │   ├── __init__.py
│       │   ├── prediction.py
│       │   ├── stage_01_data_ingestion.py
│       │   ├── stage_02_data_validation.py
│       │   ├── stage_03_data_transformation.py
│       │   ├── stage_04_model_trainer.py
│       │   └── stage_05_model_evaluation.py
│       ├── utils
│       │   ├── __init__.py
│       │   └── common.py
│       └── __init__.py
├── templates
│   ├── index.html
│   └── results.html
├── .dvcignore
├── .gitignore
├── Dockerfile
├── README.md
├── app.py
├── clean-joblib.sh
├── main.py
├── params.yaml
├── requirements.txt
├── requirements_backup.txt
├── schema.yaml
└── template.py

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request.

  1. Fork the repository at https://github.com/klan86at/End-to-end-Machine-Learning-Project.git
  2. Create your feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

📄 License

This project is open source. See the LICENSE file for details.

About

This project predicts wine quality (on a scale of 0–10) using physicochemical features like acidity, pH, and alcohol content. The model leverages Elastic Net regression to balance feature selection (L1 regularization) and multicollinearity handling (L2 regularization), achieving optimal performance.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages