This project demonstrates how to build and deploy a machine learning model for predicting wine quality using the ElasticNet regression algorithm. The dataset used in this example is sourced from the UCI Machine Learning Repository and contains physicochemical properties of wines.
- Title: Wine Quality
- Publication: Decision Support Systems, Elsevier, 2009
- Dataset URL: Wine Quality Dataset
wine_quality_prediction.py
: Python script containing the machine learning code.requirements.txt
: A list of Python packages required to run the project.README.md
: This file, providing an overview of the project.LICENSE
: The license information for the project..gitignore
: Specifies files and directories to be ignored by Git.mlruns/
: MLflow tracking directory for storing experiment runs.data/
: Directory where the dataset is downloaded and stored.
Before running the project, make sure you have the following prerequisites installed:
- Python 3.x
- Required Python packages (install via
pip install -r requirements.txt
).
-
Clone this repository to your local machine:
git clone https://github.com/Mohshaikh23/Wine-Quality-Prediction-using-MLFlow.git cd wine-quality-prediction
for dagshub:
set MLFLOW_TRACKING_URI=https://dagshub.com/Mohshaikh23/Wine-Quality-Prediction-using-MLFlow.mlflow set MLFLOW_TRACKING_USERNAME=Mohshaikh23 set MLFLOW_TRACKING_PASSWORD=your_password
-
Install the required packages:
pip install -r requirements.txt
-
Run the machine learning script to train an ElasticNet regression model and log the results using MLflow:
python wine_quality_prediction.py <alpha> <l1_ratio>
Replace
<alpha>
and<l1_ratio>
with your desired values for model hyperparameters. If not provided, default values are used. -
MLflow will log the model and metrics, and you can view the results in the MLflow UI.
mlflow ui
models view
chart comparison
model information
model parameters and metrics
model prediction analogy
The trained ElasticNet model can be deployed using various platforms, such as MLflow's built-in model serving capabilities, cloud-based solutions, or other deployment options. For specific deployment instructions, refer to the documentation of your chosen deployment platform.
This project is licensed under the MIT License - see the LICENSE file for details.
- UCI Machine Learning Repository for providing the Wine Quality dataset.
- MLflow for model tracking and management.
- The authors of the Wine Quality dataset for their valuable contributions to the field of data mining.
Feel free to contribute to this project by opening issues or submitting pull requests. Happy modeling!