https://github.com/keyyard/cart-wine-prediction
A Python-based project using a Classification and Regression Tree (CART) model to predict wine quality based on given features.
https://github.com/keyyard/cart-wine-prediction
algorithm-visualisation python
Last synced: 11 months ago
JSON representation
A Python-based project using a Classification and Regression Tree (CART) model to predict wine quality based on given features.
- Host: GitHub
- URL: https://github.com/keyyard/cart-wine-prediction
- Owner: Keyyard
- Created: 2025-04-20T11:46:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-11T15:34:05.000Z (about 1 year ago)
- Last Synced: 2025-05-11T16:35:03.442Z (about 1 year ago)
- Topics: algorithm-visualisation, python
- Language: Python
- Homepage: https://cart.udai.topic8.keyyard.xyz/
- Size: 3.23 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[](https://www.codefactor.io/repository/github/keyyard/cart-wine-prediction)
Đề tài 8: Nghiên cứu và cài đặt chương trình phần mềm sử dụng kỹ thuật cây quyết định **CART** để dự đoán chất lượng (quality) của các loại rượu theo các biến còn lại. Từ kết quả phân lớp và dữ liệu trong tập test, hãy đánh giá hiệu quả của mô hình dự đoán.
# How CART Algorithm Works
**CART (Classification and Regression Trees)** is a decision tree algorithm used for both classification and regression tasks. It works by splitting the dataset into subsets based on feature values, creating a tree structure where each node represents a decision rule.
---
# Workflow
1. load data: Import the dataset containing wine quality and its physicochemical properties.
2. Visualize: Display feature distributions and correlations to understand the dataset.
3. Train model: Use the training set to train the CART model.
4. Predict: Predict wine quality using the trained model.
5. Compare Result: Check predictions against actual values and display a detailed comparison table.
6. Evaluate: Display accuracy and other evaluation metrics to assess model performance.
7. User prediction: Allow users to input their own data and predict wine quality using the trained model.
# TechSack:
Language: Python
Libs:
Scikit-learn: For implementing CART and evaluating the model.
Pandas: For data manipulation.
Matplotlib/Seaborn: For visualizations.
StreamLit: For creating a web app interface.
Target variable: quality (1-10)
Features: fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide, total sulfur dioxide, density, pH, sulphates, alcohol.
# ScreenShots:






# Usage:
1. Clone the repository.
2. Install the required libraries using `pip install -r requirements.txt`.
3. Run
```
streamlit run main.py
```
# References:
- [Streamlit Documentation](https://docs.streamlit.io/)
- [Pandas Documentation](https://pandas.pydata.org/)
- [Matplotlib Documentation](https://matplotlib.org/)
- [Seaborn Documentation](https://seaborn.pydata.org/)
- [Scikit-learn Documentation](https://scikit-learn.org/stable/)
- [CART Algorithm](https://scikit-learn.org/stable/modules/tree.html)
- Wine Quality Dataset from NEU LMS