Loading...


Wine Quality classification


A Simple Example of Scikit-learn Pipeline

Inspired by https://towardsdatascience.com/a-simple-example-of-pipeline-in-machine-learning-with-scikit-learn-e726ffbb6976 by Saptashwa Bhattacharyya


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`


Get sample data from this repo

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"]
print(X[:3])
fixed acidity volatile acidity citric acid residual sugar chlorides free sulfur dioxide total sulfur dioxide density pH sulphates alcohol
0 7.4 0.7 0 1.9 0.076 11 34 0.9978 3.51 0.56 9.4
1 7.8 0.88 0 2.6 0.098 25 67 0.9968 3.2 0.68 9.8
2 7.8 0.76 0.04 2.3 0.092 15 54 0.997 3.26 0.65 9.8


Get your prediction

labels = model.predict(X[:3])
# [5, 5, 5]


Eval

model.score(X, Y)
# 0.6616635397123202


? Disclaimer

No red wine was drunk (unfortunately) while training this model ?

数据统计

数据评估

osanseviero/wine-quality浏览人数已经达到698,如你需要查询该站的相关权重信息,可以点击"5118数据""爱站数据""Chinaz数据"进入;以目前的网站数据参考,建议大家请以爱站数据为准,更多网站价值评估因素如:osanseviero/wine-quality的访问速度、搜索引擎收录以及索引量、用户体验等;当然要评估一个站的价值,最主要还是需要根据您自身的需求以及需要,一些确切的数据则需要找osanseviero/wine-quality的站长进行洽谈提供。如该站的IP、PV、跳出率等!

关于osanseviero/wine-quality特别声明

本站Ai导航提供的osanseviero/wine-quality都来源于网络,不保证外部链接的准确性和完整性,同时,对于该外部链接的指向,不由Ai导航实际控制,在2023年5月15日 下午3:21收录时,该网页上的内容,都属于合规合法,后期网页的内容如出现违规,可以直接联系网站管理员进行删除,Ai导航不承担任何责任。

相关导航

暂无评论

暂无评论...