Skip to content

farshidhesami/machine_learning_01

Repository files navigation

Wine Quality Prediction: End-to-End Machine Learning Project

Overview

This project is a sophisticated end-to-end machine learning pipeline designed for predicting wine quality from physicochemical attributes. Bridging the gap between traditional wine quality assessment and modern data science, this pipeline encompasses all stages from data processing to model deployment.

Data Description

The dataset, hosted on my GitHub profile, features red wine samples each characterized by a range of chemical attributes. The primary goal is to predict the quality of wine, quantified on a scale from 0 to 10, using these attributes.

Pipeline and Configuration Updates

Pipeline Stages

  1. Data Ingestion (01_data_ingestion.ipynb): Ingesting the dataset for preliminary exploration.
  2. Data Validation (02_data_validation.ipynb): Verifying data quality and integrity.
  3. Data Transformation (03_data_transformation.ipynb): Preprocessing data for effective model training.
  4. Model Training (04_model_trainer.ipynb): Training the machine learning model.
  5. Model Evaluation (05_model_evaluation.ipynb): Assessing the model's performance.
  6. Prediction (prediction.py): Implementing the model for predictions.
  7. Web Application (app.py): Creating a Flask web application for interactive model utilization.

Configuration and Deployment

  1. Update config.yaml : Setting configurations for the project.
  2. Update schema.yaml : Defining data schema for accurate validation.
  3. Update params.yaml : Specifying parameters for the model training process.
  4. Update the Entity : Adjusting data model entities as required.
  5. Update the Configuration Manager in src/config : Managing configurations for the project.
  6. Update the Components : Refining modular components of the project.
  7. Update the Pipeline : Enhancing the data processing and ML pipeline.
  8. Update main.py : Finalizing the main execution script.
  9. Update app.py : Improving the Flask web application for enhanced user engagement.

Getting Started

Prerequisites

  • Python 3.8
  • Pip (Python package manager)
  • Visual Studio Code or any IDE/Code Editor

Installation and Setup

  1. Clone the Repository :
git clone https://github.com/farshidhesami/machine_learning_01.git
  1. Navigate to the Project Directory :
cd machine_learning_01
  1. Install Dependencies :
pip install -r requirements.txt
  1. Initialize the Project Structure :
python template.py

Usage

  1. Run the Main Pipeline :
python main.py
  1. Web Application :
python app.py

Web Application Input Interface

Web Application Input Data

Web Application Prediction Interface

Web Application Predict

File Structure

  • src/: Core source code.
  • data/: Wine quality dataset.
  • artifacts/: Generated models and reports.
  • research/: Jupyter notebooks for analysis.
  • template.py: Initial project setup script.
  • requirements.txt: Project dependencies.
  • main.py: Main script for the ML pipeline.
  • app.py: Flask application for model deployment.

Contact

Acknowledgments

This project is a showcase of how machine learning can bring a new level of precision and objectivity to traditional industries like wine making, demonstrating the potential for data-driven decision-making in enhancing quality assessment processes.