metadata
tags:
- structured-data-classification
dataset:
- wine-quality
library_name: scikit-learn
Wine Quality classification
A Simple Example of Scikit-learn Pipeline
How to use
from huggingface_hub import hf_hub_url, cached_download
import joblib
import pandas as pd
REPO_ID = "julien-c/wine-quality"
FILENAME = "sklearn_model.joblib"
model = joblib.load(cached_download(
hf_hub_url(REPO_ID, FILENAME)
))
# model is a `sklearn.pipeline.Pipeline`
data_file = cached_download(
hf_hub_url(REPO_ID, "winequality-red.csv")
)
winedf = pd.read_csv(data_file, sep=";")
X = winedf.drop(["quality"], axis=1)
Y = winedf["quality"]
labels = model.predict(X[:3])
^^ get your prediction
Eval
model.score(X, Y)
# 0.6616635397123202
🍷 Disclaimer
No red wine was drunk (unfortunately) while training this model 🍷