Update README.md
Browse filesadding readme.md file
README.md
CHANGED
|
@@ -5,4 +5,39 @@ datasets:
|
|
| 5 |
metrics:
|
| 6 |
- accuracy
|
| 7 |
pipeline_tag: tabular-classification
|
| 8 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
metrics:
|
| 6 |
- accuracy
|
| 7 |
pipeline_tag: tabular-classification
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# Random Forest Model for Wine-Quality Prediction
|
| 11 |
+
|
| 12 |
+
This repository contains a Random Forest model trained on wine-quality data for wine quality prediction. The model has been trained to classify wine quality into six classes. During training, it achieved a 100% accuracy on the training dataset and a 66% accuracy on the validation dataset.
|
| 13 |
+
|
| 14 |
+
## Model Details
|
| 15 |
+
- **Algorithm**: Random Forest
|
| 16 |
+
- **Dataset**: Wine-Quality Data
|
| 17 |
+
- **Objective**: Wine quality prediction (Six classes) - (3,4,5,6,7,8,9) and prediction above 5 is good quality wine
|
| 18 |
+
- **Dataset Size**: 1599 samples with 11 features
|
| 19 |
+
- **Target Variable**: Wine Quality
|
| 20 |
+
- **Data Split**: 80% for training, 20% for validation
|
| 21 |
+
- **Training Accuracy**: 100%
|
| 22 |
+
- **Validation Accuracy**: 66%
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
You can use this model to predict wine quality based on the provided features. Below are some code snippets to help you get started:
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
# Load the model and perform predictions
|
| 29 |
+
import pandas as pd
|
| 30 |
+
from sklearn.ensemble import RandomForestClassifier
|
| 31 |
+
import joblib
|
| 32 |
+
|
| 33 |
+
# Load the trained Random Forest model (assuming 'model.pkl' is your model file)
|
| 34 |
+
model = joblib.load('model/random_forest_model.pkl')
|
| 35 |
+
|
| 36 |
+
# Prepare your data for prediction (assuming 'data' is your input data)
|
| 37 |
+
# Ensure that your input data has the same features as the training data
|
| 38 |
+
|
| 39 |
+
# Perform predictions
|
| 40 |
+
predictions = model.predict(data)
|
| 41 |
+
|
| 42 |
+
# Get the predicted wine quality class
|
| 43 |
+
# The predicted class will be an integer between 0 and 5
|