wine quality
julien-cIntroduction
The Wine Quality Classification model is a simple example of a Scikit-learn pipeline designed for tabular classification tasks. The model is available on Hugging Face's platform and utilizes the wine-quality dataset to predict wine quality based on various chemical properties.
Architecture
The model employs a Scikit-learn pipeline, using the Joblib library for efficient model serialization. The input features include fixed acidity, volatile acidity, citric acid, residual sugar, chlorides, free sulfur dioxide, total sulfur dioxide, density, pH, sulphates, and alcohol.
Training
The model was inspired by a pipeline example in machine learning with Scikit-learn. It was trained using the wine-quality dataset, which includes chemical properties of wine, and is evaluated with a scoring function achieving a performance score of approximately 66.17%.
Guide: Running Locally
-
Install Required Libraries: Ensure you have Python, Scikit-learn, Joblib, and Pandas installed.
-
Download the Model:
from huggingface_hub import hf_hub_url, cached_download import joblib REPO_ID = "julien-c/wine-quality" FILENAME = "sklearn_model.joblib" model = joblib.load(cached_download( hf_hub_url(REPO_ID, FILENAME) ))
-
Download Sample Data:
data_file = cached_download( hf_hub_url(REPO_ID, "winequality-red.csv") ) winedf = pd.read_csv(data_file, sep=";")
-
Prepare Data for Prediction:
X = winedf.drop(["quality"], axis=1) Y = winedf["quality"]
-
Make Predictions:
labels = model.predict(X[:3])
-
Evaluate the Model:
model.score(X, Y)
Cloud GPUs: For resource-intensive tasks or larger datasets, consider using cloud GPU platforms like AWS, Google Cloud, or Azure to enhance performance.
License
The use of this model and code is subject to the terms and conditions outlined in the Hugging Face platform's standard licensing agreements.