This project is a machine learning-based web application that predicts whether the wine is of good or bad quality based on 11 physicochemical features (without including 'quality'). The model is trained using a RandomForestClassifier
and deployed using Streamlit
.
- Predicts the quality of red wine as either good or bad.
- Takes 11 input features and provides a prediction.
- The machine learning model is built using the
RandomForestClassifier
fromscikit-learn
. - The web interface is created using
Streamlit
.
The dataset used for this project is the Wine Quality Dataset, which contains the following features:
- Fixed Acidity
- Volatile Acidity
- Citric Acid
- Residual Sugar
- Chlorides
- Free Sulfur Dioxide
- Total Sulfur Dioxide
- Density
- pH
- Sulphates
- Alcohol
- Quality (Target variable)
The target variable (quality
) is categorized into:
- Good Quality: Wine with a quality score of 7 or above.
- Bad Quality: Wine with a quality score of less than 7.
The model will use the other 11 features (excluding 'quality') to predict if the wine is good or bad.
Ensure you have Python installed. You can download it from here.
git clone https://github.com/FahithKRM/ML_Wine-Quality-Prediction.git
cd wine-quality-prediction
python -m venv env
.\env\Scripts\activate
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
streamlit run app.py
On the web interface, you'll need to input the 11 physicochemical features (excluding 'quality') as a comma-separated string. For example:
7.4,0.7,0,1.9,0.076,11,34,0.9978,3.51,0.56,9.4
- Fixed Acidity
- Volatile Acidity
- Citric Acid
- Residual Sugar
- Chlorides
- Free Sulfur Dioxide
- Total Sulfur Dioxide
- Density
- pH
- Sulphates
- Alcohol
- Good Quality Wine if the wine's predicted quality is 7 or more.
- Bad Quality Wine otherwise.
11.2,0.28,0.56,1.9,0.075,17.0,60.0,0.998,3.16,0.58,9.8
7.5,0.52,0.16,1.9,0.085,12.0,35.0,0.9968,3.38,0.62,9.5
This project is licensed under the MIT License - see the LICENSE file for details.