codesignal/wine-quality
Viewer • Updated • 6.5k • 1.18k • 1
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.
You can use this model to predict wine quality based on the provided features. Below are some code snippets to help you get started:
# Load the model and perform predictions
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
import joblib
# Load the trained Random Forest model (assuming 'model.pkl' is your model file)
model = joblib.load('model/random_forest_model.pkl')
# Prepare your data for prediction (assuming 'data' is your input data)
# Ensure that your input data has the same features as the training data
# Perform predictions
predictions = model.predict(data)
# Get the predicted wine quality class
# The predicted class will be an integer between 0 and 5