{"id":15105287,"url":"https://github.com/yuweaec/wine_quality_prediction","last_synced_at":"2025-04-11T15:04:23.540Z","repository":{"id":256808214,"uuid":"856475252","full_name":"YuweAEC/wine_quality_prediction","owner":"YuweAEC","description":"The Wine Quality Prediction project aims to predict the quality of wine based on its chemical properties using machine learning algorithms.","archived":false,"fork":false,"pushed_at":"2024-11-23T05:41:39.000Z","size":318,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T11:11:21.986Z","etag":null,"topics":["flask","jupyter-notebook","machine-learning","python","scikit-learn"],"latest_commit_sha":null,"homepage":"https://yuweaec.github.io/wine_quality_prediction/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YuweAEC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-12T16:28:56.000Z","updated_at":"2024-11-23T05:41:43.000Z","dependencies_parsed_at":"2024-09-13T06:23:28.901Z","dependency_job_id":"7b88dbd5-8c07-4f51-9492-1acf582b7d3b","html_url":"https://github.com/YuweAEC/wine_quality_prediction","commit_stats":{"total_commits":48,"total_committers":4,"mean_commits":12.0,"dds":0.5416666666666667,"last_synced_commit":"1b00900facca3c181be68d43741c96dd89f9d9a7"},"previous_names":["yuweaec/wine_quality_prediction"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuweAEC%2Fwine_quality_prediction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuweAEC%2Fwine_quality_prediction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuweAEC%2Fwine_quality_prediction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YuweAEC%2Fwine_quality_prediction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YuweAEC","download_url":"https://codeload.github.com/YuweAEC/wine_quality_prediction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429062,"owners_count":21101780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","jupyter-notebook","machine-learning","python","scikit-learn"],"created_at":"2024-09-25T20:22:51.288Z","updated_at":"2025-04-11T15:04:23.506Z","avatar_url":"https://github.com/YuweAEC.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Wine Quality Prediction**\n\n## **Overview**\nThe **Wine Quality Prediction** project aims to predict the quality of red and white wines based on their chemical properties. Using a machine learning model, this project analyzes various features, such as acidity, alcohol content, and residual sugar, to predict a wine's quality on a scale from 0 to 10.\n\nThe dataset used for this project is the **Wine Quality Dataset**, which can be found on the [UCI Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets/Wine+Quality).\n\n---\n\n## **Project Structure**\n```\nwine_quality_prediction/\n│\n├── data/\n│   ├── winequality-red.csv            # Wine dataset (red wine)\n│\n├── notebooks/\n│   ├── data_analysis.ipynb             # Jupyter notebook for EDA\n│\n├── src/\n│   ├── __init__.py                     # Init file for the src module\n│   ├── data_preprocessing.py           # Script for data preprocessing and cleaning\n│   ├── model_training.py               # Script for training the model\n│   ├── evaluate_model.py               # Script for evaluating the model\n│   ├── prediction.py                   # Script for making predictions\n│\n├── model/\n│   ├── wine_quality_model.pkl          # Trained model saved as a pickle file\n│\n├── static/                             # Static folder for UI (optional)\n│   └── css/\n│\n├── templates/                          # HTML templates for web UI (optional)\n│   └── index.html\n│\n├── app.py                              # Flask application for deploying the project\n├── requirements.txt                    # Project dependencies\n├── Dockerfile                          # Docker file for containerization (optional)\n└── README.md                           # Documentation file\n```\n\n---\n\n## **Installation**\n\n### **1. Clone the Repository**\nFirst, clone the project repository to your local machine:\n```bash\ngit clone https://github.com/yourusername/wine_quality_prediction.git\ncd wine_quality_prediction\n```\n\n### **2. Install Dependencies**\nMake sure you have Python installed (preferably Python 3.8+). Then, install the project dependencies:\n```bash\npip install -r requirements.txt\n```\n\n### **3. Download Dataset**\nDownload the wine quality dataset (red wine or white wine) from the UCI repository:\n\n- Red Wine: [winequality-red.csv](https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv)\n- White Wine: [winequality-white.csv](https://archive.ics.uci.edu/ml/machine-learning-databases/wine-quality/winequality-white.csv)\n\nPlace the dataset file into the `data/` folder.\n\n---\n\n## **Usage**\n\n### **1. Train the Model**\nTo train the model, use the following command:\n```bash\npython src/model_training.py\n```\nThis will train the model using the RandomForestClassifier and save it in the `model/` directory as `wine_quality_model.pkl`.\n\n### **2. Evaluate the Model**\nTo evaluate the model's performance, run:\n```bash\npython src/evaluate_model.py\n```\nThis will output a classification report with metrics such as precision, recall, and F1-score.\n\n### **3. Make Predictions**\nTo predict wine quality using custom data, edit the sample data in the `src/prediction.py` script and run:\n```bash\npython src/prediction.py\n```\nThis will output the predicted wine quality based on the input features.\n\n---\n\n## **Files and Scripts**\n\n- `src/data_preprocessing.py`: Contains functions for loading, cleaning, and preprocessing the dataset (standardization, train-test split, etc.).\n- `src/model_training.py`: The script for training the machine learning model using RandomForest.\n- `src/evaluate_model.py`: Used to evaluate the trained model on the test set and generate a performance report.\n- `src/prediction.py`: Contains the logic to make predictions using the trained model.\n- `notebooks/data_analysis.ipynb`: Jupyter notebook for exploratory data analysis (EDA) and data visualization.\n- `app.py`: A simple Flask application to deploy the model as a web service (optional for deployment).\n\n---\n\n## **Technologies Used**\n\n- **Python** (3.8+)\n- **Pandas** (for data manipulation)\n- **Scikit-learn** (for machine learning model building)\n- **Flask** (for building a web app)\n- **Jupyter Notebook** (for data exploration)\n- **Docker** (optional, for containerization)\n\n---\n\n## **Future Enhancements**\n\n- **Hyperparameter tuning**: Improve the model's performance by tuning hyperparameters.\n- **Web deployment**: Host the Flask web app on platforms like Heroku or AWS.\n- **Additional Models**: Experiment with other machine learning models like SVM, Gradient Boosting, and XGBoost.\n- **UI/UX**: Add a graphical user interface to allow non-technical users to interact with the model.\n\n---\n\n## **Contributors**\n- [Your Name](https://github.com/yourusername)\n\n---\n\n## **License**\nThis project is licensed under the MIT License - see the `LICENSE` file for details.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuweaec%2Fwine_quality_prediction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuweaec%2Fwine_quality_prediction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuweaec%2Fwine_quality_prediction/lists"}